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

Depricationwarning in simple test case #8046

Closed
djhenderson opened this issue May 9, 2021 · 6 comments
Closed

Depricationwarning in simple test case #8046

djhenderson opened this issue May 9, 2021 · 6 comments
Labels
meta Meta topics, e.g. repo organisation and issue management

Comments

@djhenderson
Copy link

Depricationwarning in simple test case:

> py
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import spacy
>>> nlp = spacy.load("en_core_web_sm")
C:\Program Files\Python39\lib\site-packages\packaging\version.py:127: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
>>>
  • Operating System: Windows 10 Pro
  • Python Version Used: Python
  • spaCy Version Used: 3.0.0
  • Environment Information:
CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2
CUDA_PATH_V11_2=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2
PYTHONDEVMODE=1
PYTHONUTF8=1
@polm polm added the meta Meta topics, e.g. repo organisation and issue management label May 9, 2021
@polm
Copy link
Contributor

polm commented May 9, 2021

Thanks for the report. On Linux I get the output described in #7036 (only when using PYTHONDEVMODE=1), but not the DeprecationWarning. Can you give the full output of pip freeze? It might be an interaction with another package.

Also would be great if you could try in a fresh environment with the latest spaCy.

@djhenderson
Copy link
Author

This is a first time install of spaCy, CuPy, CUDA, etc.

I think this is a packaging warning that may be unique to the Windows packages.

attached is output from py -m pip freeze.
freeze.txt

It looks like this message is generated from the packaging package at line 127. This is triggered when the regexp at about line 256 is not matched for a version string. HTH.

BTW: py -V gives Python 3.9.5

@polm
Copy link
Contributor

polm commented May 10, 2021

I think you are referring to this line:

https://github.com/pypa/packaging/blob/8c78c35bc20fc7b4aacb7a71ad5f5db9817630c1/packaging/version.py#L112

Looking at your requirements.txt, it's not clear to me that any of them have a Legacy Version. I tried parsing all the versions on lines with == and they all seem fine. Maybe the model packages, which have a @ instead, are causing the issue... We'll need to look at this more.

@adrianeboyd
Copy link
Contributor

For python 3.9 in particular, it's possible that some of these warnings might come from packaging / pkg_resources / setuptools, I think, and there are open bug reports related to it.

This warning could also come from a bug in the current version of transformers, since I also see it when I run the test suite in python 3.7. They do some internal version checking of dependencies and v4.5.1 has a bug in how it parses some version ranges. It's already fixed in master, so hopefully v4.6.0 won't have this problem. You could try the same thing in a venv without transformers and see if you still see the warning. If not, I bet transformers is the cause.

@polm
Copy link
Contributor

polm commented May 31, 2021

Looks like the pip setuptools bug may be the one described in pypa/pip#9250.

Since it's not clear we're doing anything wrong here, and since this is just a warning, I'm going to close this for now, but feel free to add further information at any time. We can re-open it if there is actually something for us to fix.

@polm polm closed this as completed May 31, 2021
@github-actions
Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
meta Meta topics, e.g. repo organisation and issue management
Projects
None yet
Development

No branches or pull requests

3 participants