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

PendingDeprecationWarning in Python 3.4 #5849

Closed
charris opened this issue May 7, 2015 · 4 comments
Closed

PendingDeprecationWarning in Python 3.4 #5849

charris opened this issue May 7, 2015 · 4 comments
Labels
03 - Maintenance 57 - Close? Issues which may be closable unless discussion continued

Comments

@charris
Copy link
Member

charris commented May 7, 2015

The imp module will be deprecated in favor of importlib. It is used in

  • setupegg.py
  • runtests.py
  • numpy/_import_tools.py
  • numpy/testing/utils.py
  • numpy/distutils/misc_util.py
  • numpy/core/setup.py
@charris
Copy link
Member Author

charris commented May 7, 2015

I suggest putting off dealing with this until Python 3.6 or some such. The importlib module looks to be changing version to version and the documentation sucks.

@enlighter
Copy link

I was thinking about contributing through this bug, so went looking and would like to confirm the status for this issue @charris .
I see that in numpy/core/setup.py, the current master code uses _import__(), i.e. using the importlib module. Code snippet from numpy/core/setup.py :

> def generate_api(ext, build_dir):
>             script = join(codegen_dir, module_name + '.py')
>             sys.path.insert(0, codegen_dir)
>             try:
>                 m = __import__(module_name)
>                 log.info('executing %s', script)
>                 h_file, c_file, doc_file = m.generate_api(os.path.join(build_dir, header_dir))
> 

So my question is, has this issue automatically been solved through all the stacked code changes to the repository over the 3 years since? If so, then please close this issue as resolved.

@enlighter
Copy link

From the documentation https://docs.python.org/3/library/imp.html, imp module was deprecated in Python 3.4, so what I suggested above seems to be the case.

@eric-wieser eric-wieser added the 57 - Close? Issues which may be closable unless discussion continued label May 24, 2018
@mattip
Copy link
Member

mattip commented Aug 8, 2018

closing. Our code now only uses imp in test_reloading.py and numpy/compat/py3k.py, and only on python before 3.4 (including 2.7)

@mattip mattip closed this as completed Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
03 - Maintenance 57 - Close? Issues which may be closable unless discussion continued
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants