berkerpeksag / astor

Python AST read/write
https://pypi.org/project/astor/
BSD 3-Clause "New" or "Revised" License
810 stars 102 forks source link

Updated to support Python 3.3 #1

Closed rwtolbert closed 10 years ago

rwtolbert commented 11 years ago

There are a few updates to Try, With and a new YieldFrom that are necessary for Python 3.3 support. Also bumped the version to 0.2.2 and changed to setuptools so that 'python setup.py develop' is available.

Tested with Python 2.6, 2.7, 3.2, and 3.3

ztane commented 10 years ago

Bump, astor 0.2.1 did not install cleanly by pip from pypi on 3.3 bc of open('rb') in setup.py

ztane commented 10 years ago

Seems that Patrick Maupin hasn't been to github for well over a year

berkerpeksag commented 10 years ago

Bump, astor 0.2.1 did not install cleanly by pip from pypi on 3.3 bc of open('rb') in setup.py

I've opened a pull request for that: https://github.com/pmaupin/astor/pull/2

pmaupin commented 10 years ago

I was going to transfer the project to berker, but it is not as easy as it seems. I will try to monitor more carefully.

pmaupin commented 10 years ago

And you can email me if I'm not -- my name @gmail...

pmaupin commented 10 years ago

I merged Berker's pull request, which was quite simple.

Please (a) merge against that to make sure things still work for you, and (b) remove the changed copyright line -- I found Armin's code in 2008 and he's never touched this repository.

Then I will merge your new pull request and release 0.2.2

Sorry about the delay. I guess I need to figure out how to make github email me when these conversation happen.

Thanks, Pat

ztane commented 10 years ago

@pmaupin "I was going to transfer the project to berker, but it is not as easy as it seems." Technically, I think the transfer is as easy as give a new maintainer rights to upload to PyPI, and then the README for astor in the new version can designate his github fork as the authoritative one.

I took over python-Levenshtein myself, uploaded a new version with python 3 support, and broke someone's build, well, received a pull request in my brand new github fork in 20 minutes.

And, BTW thanks for this superb lib, I evaluated all AST to source libs and this was way ahead of all competition for Python 3.

pmaupin commented 10 years ago

Technically, I think the transfer is as easy as give a new maintainer rights to upload to PyPI, and then the README for astor in the new version can designate his github fork as the authoritative one.

I'm sure that's true. OTOH, if I'm not maintaining it, I'd just as soon there be a single obvious target. In any case, I think the problem is almost solved -- I accepted Berker's pull request, and then he deleted his branch, and now github tells me that it is just waiting for him to accept the ownership of the main branch, and he is now a co-owner on the project at pypi.

And, BTW thanks for this superb lib, I evaluated all AST to source libs and this was way ahead of all competition for Python 3.

You're welcome! I don't actually use Python 3 yet, but I wasn't happy with the libraries I found for Python 2, so that's really why astor exists. I try to make things Python-3 compatible when possible and easy, though.

berkerpeksag commented 10 years ago

I've rebased @rwtolbert's patch (except the changes in the readdoc() function) and merge it. Thank you Patrick and Bob! :)

https://github.com/berkerpeksag/astor/commit/6794005414bc8de1e81bbcb6beb56beee675896d

I will release 0.3.0 on Monday or Tuesday.