Skip to content
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

Rename _asyncio.py to _asyncio_utils.py to avoid name conflicts on Python 3.6+ #426

Merged
merged 1 commit into from
Aug 31, 2019

Conversation

edisongustavo
Copy link
Contributor

The name _asyncio is reserved to Python, which can lead to naming
conflicts when running the tests depending on the setup of the machine.

On PyCharm this is specially painful where tests would fail for no good
reason (specially the ones that try to instantiate a remote kernel).

Some tests though would give the following error message:

E             File "/home/edisongustavo/miniconda3/envs/ipykernel/lib/python3.7/asyncio/futures.py", line 387, in <module>
E               Future = _CFuture = _asyncio.Future
E           AttributeError: module '_asyncio' has no attribute 'Future'

So I've setup a debugger and a breakpoint at that specific line and I
found that it import from this _asyncio.py file under the tests
directory.

…thon 3.7

The name _asyncio is reserved to Python, which can lead to naming
conflicts when running the tests depending on the setup of the machine.

On PyCharm this is specially painful.
@edisongustavo edisongustavo changed the title Rename _asyncio.py to _asyncio_utils.py to avoid name conflicts on Python 3.7 Rename _asyncio.py to _asyncio_utils.py to avoid name conflicts on Python 3.6+ Aug 31, 2019
@blink1073
Copy link
Contributor

Thanks @edisongustavo and congratulations on your first PR here!

@blink1073 blink1073 merged commit 18f2ef7 into ipython:master Aug 31, 2019
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.

2 participants