-
Notifications
You must be signed in to change notification settings - Fork 105
TypeError when patching a dictionary with a Unicode string literal on Python 2 #458
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
Comments
@tirkarthi - any ideas on a fix? |
Thanks for the quick resolution. Will there be a new release containing the fix? |
3.0.3 should be out shortly. |
Nice. We won't even have to freeze the version of mock to 2.0.0 then. |
@cjw296 Good catch! I think backports should be little more careful since Python 3 has no basestring and the upstream would be using There is also a large PR to add asyncio support for mock : python/cpython#9296 |
We just have to hope for test coverage to catch things, or add test coverage when bug reports come in. Backporting is only automated in so much as the path renaming and iteration over patches since the last sync. There's no code re-writing and I don't think there'd be much of a win with this. Still, the new CI for the backport will exercise all our supported versions before a merge, and will fail if an incoming patch drops coverage below 100%. That async patch will be fun to backport :-/ |
Uh oh!
There was an error while loading. Please reload this page.
Patching a dictionary with a Unicode string literal on Python 2 raises the exception
TypeError: string indices must be integers
. Running atest.py
file containing the following coderesults in
This is a regression introduced by commit 5268eda.
The text was updated successfully, but these errors were encountered: