Skip to content

Conversation

@jesseops
Copy link

I've tested my changes using the tests.py module and using it in my own Python3 code, this maintains backwards compatibility while also being Python 3 compatible. Read to merge.

@richin13
Copy link

richin13 commented Apr 9, 2016

This should be merged

if not silent:
raise ImportStringError(import_name, e), None, sys.exc_info()[2]
if sys.version_info.major == 2:
exec("raise ImportStringError(import_name, e), None, sys.exc_info()[2]") # Get around SyntaxError in Py3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Came here to submit exactly the same patch. Minor note here -- you could replace this whole if/else block with

six.reraise(ImportStringError, ImportStringError(import_name, e), sys.exc_info()[2])

assuming you've imported six and added it to the dependencies in setup.py

@jesseops
Copy link
Author

At this point it looks like this project has been completely abandoned. Due to that, I wrote my own library (YACT) to address my concerns. I hate to publicize on another libs project, but there it is.

https://github.com/dreadpirate15/yact

Unittests run against 2.7 and currently released versions of Python3. It's available on PyPi, I'm currently working on a couple small features and making documentation actually useful (sorry folks), but I consider the current API stable.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants