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

Change names of ast* modules #18

Closed
ddfisher opened this issue Sep 27, 2016 · 11 comments
Closed

Change names of ast* modules #18

ddfisher opened this issue Sep 27, 2016 · 11 comments

Comments

@ddfisher
Copy link
Collaborator

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.

@mbdevpl mbdevpl mentioned this issue Dec 28, 2016
@ddfisher
Copy link
Collaborator Author

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

@gvanrossum
Copy link
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.

@ambv
Copy link

ambv commented Feb 23, 2017

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).

@ddfisher
Copy link
Collaborator Author

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

@ambv
Copy link

ambv commented Feb 23, 2017

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

@ambv
Copy link

ambv commented Feb 23, 2017

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?

@gvanrossum
Copy link
Member

gvanrossum commented Feb 23, 2017 via email

@ddfisher
Copy link
Collaborator Author

@ambv: Fixed using that trick, thanks.

@keszybz
Copy link

keszybz commented Jun 11, 2017

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.

@msullivan
Copy link
Collaborator

This happened a while ago

@gvanrossum
Copy link
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants