Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Change names of ast* modules #18

Closed

Description

@ddfisher

Instead of adding a new ast3x module for every new Python version, we're now planning on updating the ast35 module with the Python changes. Accordingly, the ast27 and ast35 modules should probably be renamed to ast2 and ast3, respectively.

Activity

  1. ddfisher commented on Feb 13, 2017

    @ddfisher
    CollaboratorAuthor

    ast35 has been renamed ast3 as part of the Python 3.6 rebuild.

  2. gvanrossum commented on Feb 13, 2017

    @gvanrossum
    Member

    Let's decide whether we want to rename ast27 -> ast2 as well, or whether we'll stick with that -- in the latter case we can close this issue.

  3. ambv commented on Feb 23, 2017

    @ambv

    FYI, currently the source tarball of 1.0.1 contains both ast2.py and ast27.py which makes the bundled tests fail (there's no _ast2, just _ast27).

  4. ddfisher commented on Feb 23, 2017

    @ddfisher
    CollaboratorAuthor

    That's unfortunate. Will PyPI let me upload a fixed sdist if I remove the old one?

  5. ambv commented on Feb 23, 2017

    @ambv

    Not a .tar.gz. Fortunately, there's a trick.

    1. Go to PyPI and delete the .tar.gz.
    2. Build and upload a .zip:
    python3 setup.py sdist --formats=zip upload
    
  6. ambv commented on Feb 23, 2017

    @ambv

    Oh, and FWIW my opinion on the matter is to leave the name "ast27", unless GvR is secretly planning to release 2.8 ;) The point of "ast3" is forward-compatibility, not backwards-compatibility, right?

  7. gvanrossum commented on Feb 23, 2017

    @gvanrossum
    Member
  8. ddfisher commented on Feb 24, 2017

    @ddfisher
    CollaboratorAuthor

    @ambv: Fixed using that trick, thanks.

  9. keszybz commented on Jun 11, 2017

    @keszybz

    When changing the names of the modules, please consider moving them out the common namespace, i.e. moving them to typed_ast._ast3, typed_ast._ast2. "Polluting" the global namespace is not nice and raises the chances of conflict in the future.

  10. msullivan commented on Jan 23, 2019

    @msullivan
    Collaborator

    This happened a while ago

  11. gvanrossum commented on Jan 23, 2019

    @gvanrossum
    Member

    When changing the names of the modules, please consider moving them out the common namespace, i.e. moving them to typed_ast._ast3, typed_ast._ast2. "Polluting" the global namespace is not nice and raises the chances of conflict in the future.

    Note that this hasn't happened yet -- IIUC this is asking to rename the extension modules from toplevel _ast27 and _ast3 into the typed_ast namespace. I think that's possible though I don't recall how. It would need a separate issue though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions