New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multisegment imports in some Python 2 revisions. #34

Merged
merged 1 commit into from May 28, 2013

Conversation

Projects
None yet
2 participants
@kgaughan
Member

kgaughan commented May 27, 2013

I discovered upon deploying waitress 0.8.4 in production that there was an issue with waitress.runner whereby __import__ would raise the following error:

TypeError: Item in ``fromlist'' not a string

The error didn't manifest itself under Python 2.6.8 (which is what the test suite was ran against), but did manifest itself under 2.6.6 (the version I was using in production). I believe this is a consequence of the use of the unicode_literals feature import, which is required so that it can run on both Python 2 and Python 3.

While I was able to reproduce the error reliably, I wasn't able to track down of any mention of this issue in the NEWS file. I think it was silently fixed some time between the release of 2.6.6 and 2.6.8.

After some research, I found that this bug also affects some revisions of Python 2.7 as well.

Given this is something of a weird, obscure bug, I've included documentation of the issue in the resolve() function as the need for the cast is non-obvious.

Fix multisegment imports in some Python 2 revisions.
I discovered upon deploying waitress 0.8.4 in production that there was
an issue with waitress.runner whereby __import__ would raise the
following error:

    TypeError: Item in ``fromlist'' not a string

The error didn't manifest itself under Python 2.6.8 (which is what the
test suite was ran against), but did manifest itself under 2.6.6 (the
version I was using in production). I believe this is a consequence of
the use of the unicode_literals feature import, which is required so
that it can run on both Python 2 and Python 3.

While I was able to reproduce the error reliably, I wasn't able to track
down of any mention of this issue in the NEWS file. I think it was
silently fixed some time between the release of 2.6.6 and 2.6.8.

Given this is something of a weird, obscure bug, I've included
documentation of the issue in the resolve() function as the need for the
cast is non-obvious.

@mcdonc mcdonc merged commit 72cfa09 into Pylons:master May 28, 2013

@mcdonc

This comment has been minimized.

Show comment
Hide comment
@mcdonc

mcdonc May 28, 2013

Member

Thanks!

Member

mcdonc commented May 28, 2013

Thanks!

@kgaughan kgaughan deleted the kgaughan:unicode-imports branch May 28, 2013

@pyup-bot pyup-bot referenced this pull request Sep 15, 2017

Merged

Initial Update #13

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