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

use importlib.machinery when available #4928

Merged
merged 1 commit into from Jan 29, 2014
Merged

Conversation

minrk
Copy link
Member

@minrk minrk commented Jan 29, 2014

avoids deprecation warning on startup, and allows tests to pass with
PYTHONWARNINGS=d

closes #4051

candidate for backport to 1.2

import inspect
import os
import re
import sys

try:
Copy link
Member

Choose a reason for hiding this comment

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

Do we want some comments here for which versions of Python take which paths?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, noted.

Choose a reason for hiding this comment

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

This comment should mention Python >=3.3, not just 3, since e.g. 3.2 does not have importlib.machinery.all_suffixes.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, fixed in 40495fa.

avoids deprecation warning on startup, and allows tests to pass with PYTHONWARNINGS=d

closes ipython#4051

candidate for backport to 1.2
takluyver added a commit that referenced this pull request Jan 29, 2014
use importlib.machinery when available
@takluyver takluyver merged commit f85192c into ipython:master Jan 29, 2014
@takluyver
Copy link
Member

Backported

@Arfrever
Copy link

You forgot to change re.escape(s[0]) to re.escape(s) in commit on 1.x branch.

takluyver added a commit that referenced this pull request Jan 29, 2014
@takluyver
Copy link
Member

Oops, thanks @Arfrever. Should be fixed now.

pankajp pushed a commit to pankajp/ipython that referenced this pull request Feb 19, 2014
pankajp pushed a commit to pankajp/ipython that referenced this pull request Feb 19, 2014
@minrk minrk deleted the suffixes branch March 31, 2014 23:36
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
use importlib.machinery when available
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.

Test failures with Python 3 and enabled warnings
3 participants