question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to access `get_info` without `DeprecationWarning`

See original GitHub issue

Describe the issue:

get_info is needed to locate various libraries and headers for building extension modules. It is located in from numpy.distutils.misc_util, and importing it seems to lead to a DeprecationWarning

Reproduce the code example:

from numpy.distutils.misc_util import get_info

Error message:

`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
    of the deprecation of `distutils` itself. It will be removed for
    Python >= 3.12. For older Python versions it will remain present.
    It is recommended to use `setuptools < 60.0` for those Python versions.
    For more details, see:
      https://numpy.org/devdocs/reference/distutils_status_migration.html


### NumPy/Python version information:

From CI so not easy to run command directly

Python 3.10.4 x64 (Linux) 1.23.0.dev0+1087.g0eaa40db3


Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:21 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
bashtagecommented, May 4, 2022

@rgommers Thanks, that work around should help. I suspect that get_info is widely used by libraries that link to NumPy, so it would be good to have a replacement or a clearly documented path forward somewhere.

1reaction
charriscommented, Oct 20, 2022

We’re still a month or so away, aren’t we?

I like to branch about 6 weeks before the release deadlines (end of June, end of December), so sometime in the middle of November.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to ignore deprecation warnings in Python - Stack Overflow
I get a /usr/bin/env: python -W ignore::DeprecationWarning: No such file or directory error. It works if I run python with the -W ignore:: ......
Read more >
Node.js v19.3.0 Documentation
Features are marked as legacy rather than being deprecated if their use does no harm, and they are widely relied upon within the...
Read more >
warnings — Warning control — Python 3.11.1 documentation
This allows you to use known-deprecated code without having to see the warning while not suppressing the warning for other code that might...
Read more >
Cant run pytest -m connection , deprecation warning - MongoDB
You could try downgrading to pytest 3.1.0 (add pytest==3.10.1 to requirements.txt) , then reinstall pytest with pip. Or, you can add pytest.ini ...
Read more >
DeprecationWarning - Seed.run
(node:8) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found