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

File "yarl/_quoting.pyx", line 192, in yarl._quoting._Quoter.__init__ #485

Closed
remort opened this issue Jul 27, 2020 · 41 comments · Fixed by #489
Closed

File "yarl/_quoting.pyx", line 192, in yarl._quoting._Quoter.__init__ #485

remort opened this issue Jul 27, 2020 · 41 comments · Fixed by #489
Assignees

Comments

@remort
Copy link

remort commented Jul 27, 2020

Facing this issue with any version of aiohttp starting from 3.4.0 and with recently released yarl 1.5.0.
Using previous yarl==1.4.2 solves this issue (error is gone).
Thought it was old bug bubbling out: aio-libs/aiohttp#1364, but it seems that this issue is new.

@remort
Copy link
Author

remort commented Jul 27, 2020

Full trace:

Traceback (most recent call last):
  File "/requirements/bin/pytest", line 8, in <module>
    sys.exit(main())
  File "/requirements/_pytest/config/__init__.py", line 73, in main
    config = _prepareconfig(args, plugins)
  File "/requirements/_pytest/config/__init__.py", line 224, in _prepareconfig
    pluginmanager=pluginmanager, args=args
  File "/requirements/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/requirements/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/requirements/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/requirements/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/requirements/_pytest/helpconfig.py", line 89, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/requirements/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/requirements/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/requirements/_pytest/config/__init__.py", line 794, in pytest_cmdline_parse
    self.parse(args)
  File "/requirements/_pytest/config/__init__.py", line 1000, in parse
    self._preparse(args, addopts=addopts)
  File "/requirements/_pytest/config/__init__.py", line 948, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/requirements/pluggy/manager.py", line 299, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/requirements/importlib_metadata/__init__.py", line 94, in load
    module = import_module(match.group('module'))
  File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "/requirements/_pytest/assertion/rewrite.py", line 143, in exec_module
    exec(co, module.__dict__)
  File "/requirements/pytest_aiohttp/__init__.py", line 4, in <module>
    from aiohttp.pytest_plugin import *
  File "/requirements/aiohttp/__init__.py", line 6, in <module>
    from .client import BaseConnector as BaseConnector
  File "/requirements/aiohttp/client.py", line 30, in <module>
    from yarl import URL
  File "/requirements/yarl/__init__.py", line 1, in <module>
    from ._url import URL, cache_clear, cache_configure, cache_info
  File "/requirements/yarl/_url.py", line 56, in <module>
    @rewrite_module
  File "/requirements/yarl/_url.py", line 132, in URL
    _QUERY_PART_QUOTER = _Quoter(safe="?/:@", qs=True, requote=False)
  File "yarl/_quoting.pyx", line 192, in yarl._quoting._Quoter.__init__
TypeError: __init__() got an unexpected keyword argument 'requote'

Packages:

aiohttp-3.6.1 aiohttp-cors-0.7.0 yarl-1.5.0

Python 3.6

@DustyArmstrong
Copy link

I have the same issue above, with the same trace back.

Using previous yarl==1.4.2 solves this issue.

I am running this in conjunction with Discord.py, on a Raspberry Pi 2.

@ikegami
Copy link

ikegami commented Jul 28, 2020

Same issue using discord.py

Traceback (most recent call last):
  File "./numenera_roller.py", line 13, in <module>
    import discord
  File "/home/ikegami/.local/lib/python3.6/site-packages/discord/__init__.py", line 23, in <module>
    from .client import Client
  File "/home/ikegami/.local/lib/python3.6/site-packages/discord/client.py", line 34, in <module>
    import aiohttp
  File "/home/ikegami/.local/lib/python3.6/site-packages/aiohttp/__init__.py", line 6, in <module>
    from .client import BaseConnector as BaseConnector
  File "/home/ikegami/.local/lib/python3.6/site-packages/aiohttp/client.py", line 30, in <module>
    from yarl import URL
  File "/home/ikegami/.local/lib/python3.6/site-packages/yarl/__init__.py", line 1, in <module>
    from ._url import URL, cache_clear, cache_configure, cache_info
  File "/home/ikegami/.local/lib/python3.6/site-packages/yarl/_url.py", line 56, in <module>
    @rewrite_module
  File "/home/ikegami/.local/lib/python3.6/site-packages/yarl/_url.py", line 132, in URL
    _QUERY_PART_QUOTER = _Quoter(safe="?/:@", qs=True, requote=False)
  File "yarl/_quoting.pyx", line 192, in yarl._quoting._Quoter.__init__
TypeError: __init__() got an unexpected keyword argument 'requote'

Python 3.6 on Ubuntu 18.04.4 LTS on Windows Subsystem for Linux (WSL)

@AHassanSOS
Copy link

I'm getting the same issue with aiohttp

  File "/usr/local/lib/python3.6/dist-packages/aiohttp/__init__.py", line 6, in <module>
    from .client import BaseConnector as BaseConnector
  File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 30, in <module>
    from yarl import URL
  File "/usr/local/lib/python3.6/dist-packages/yarl/__init__.py", line 1, in <module>
    from ._url import URL, cache_clear, cache_configure, cache_info
  File "/usr/local/lib/python3.6/dist-packages/yarl/_url.py", line 56, in <module>
    @rewrite_module
  File "/usr/local/lib/python3.6/dist-packages/yarl/_url.py", line 132, in URL
    _QUERY_PART_QUOTER = _Quoter(safe="?/:@", qs=True, requote=False)
  File "yarl/_quoting.pyx", line 192, in yarl._quoting._Quoter.__init__
TypeError: __init__() got an unexpected keyword argument 'requote'

@nihaals
Copy link

nihaals commented Jul 30, 2020

See this SO answer.
So far everyone who has had this issue that I've spoken to have been on pip 9.0.1, which is years out date. Try updating your pip (pip install -U pip) and then force reinstalling (pip install yarl --force-reinstall --no-cache-dir)

@nihaals
Copy link

nihaals commented Jul 30, 2020

I'm also unable to reproduce this in a docker container. Do you have any consistent repro steps? I've tried installing pip 9.0.1, installing yarl 1.4.2 then updating to 1.5.0 but don't get the error. It seems to be some weird cache issue relating to old pip versions

@ikegami
Copy link

ikegami commented Jul 30, 2020

@nihaals, I upgraded pip and I still get the problem.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic

$ pip3 --version
pip 20.2 from /home/ikegami/.local/lib/python3.6/site-packages/pip (python 3.6)

$ python3 --version
Python 3.6.9

$ pip3 install yarl --force-reinstall --no-cache-dir
Defaulting to user installation because normal site-packages is not writeable
Collecting yarl
  Downloading yarl-1.5.0-cp36-cp36m-manylinux1_x86_64.whl (257 kB)
     |████████████████████████████████| 257 kB 575 kB/s
Collecting multidict>=4.0
  Downloading multidict-4.7.6-cp36-cp36m-manylinux1_x86_64.whl (148 kB)
     |████████████████████████████████| 148 kB 585 kB/s
Collecting typing-extensions>=3.7.4
  Downloading typing_extensions-3.7.4.2-py3-none-any.whl (22 kB)
Collecting idna>=2.0
  Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 712 kB/s
Installing collected packages: multidict, typing-extensions, idna, yarl
  Attempting uninstall: multidict
    Found existing installation: multidict 4.7.6
    Uninstalling multidict-4.7.6:
      Successfully uninstalled multidict-4.7.6
  Attempting uninstall: typing-extensions
    Found existing installation: typing-extensions 3.7.4.2
    Uninstalling typing-extensions-3.7.4.2:
      Successfully uninstalled typing-extensions-3.7.4.2
  Attempting uninstall: idna
    Found existing installation: idna 2.10
    Uninstalling idna-2.10:
      Successfully uninstalled idna-2.10
  Attempting uninstall: yarl
    Found existing installation: yarl 1.5.0
    Uninstalling yarl-1.5.0:
      Successfully uninstalled yarl-1.5.0
Successfully installed idna-2.10 multidict-4.7.6 typing-extensions-3.7.4.2 yarl-1.5.0

$ python3 -c 'import yarl'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ikegami/.local/lib/python3.6/site-packages/yarl/__init__.py", line 1, in <module>
    from ._url import URL, cache_clear, cache_configure, cache_info
  File "/home/ikegami/.local/lib/python3.6/site-packages/yarl/_url.py", line 56, in <module>
    @rewrite_module
  File "/home/ikegami/.local/lib/python3.6/site-packages/yarl/_url.py", line 132, in URL
    _QUERY_PART_QUOTER = _Quoter(safe="?/:@", qs=True, requote=False)
  File "yarl/_quoting.pyx", line 192, in yarl._quoting._Quoter.__init__
TypeError: __init__() got an unexpected keyword argument 'requote'

I don't get the problem if I downgrade to 1.4.2.

If you want more info, just give me the commands to run.

@nihaals
Copy link

nihaals commented Jul 30, 2020

You should backup and maybe post a tar of your yarl site-packages folder to help repro before you do this
Try uninstalling yarl, deleting the yarl site-packages folder then installing again
It appears to be a weird cache issue, so I'm assuming a fresh venv wouldn't have this problem, but it would still be useful to try and fix this as I haven't seen anyone have this issue after updating pip or force reinstalling, and you've done both

@ikegami
Copy link

ikegami commented Jul 30, 2020

Fixed as follows:

mkdir ~/backup
mv ~/.local/lib/python3.6/site-packages/yarl* ~/backup/
pip3 install yarl --force-reinstall --no-cache-dir

Original contents of ~/.local/lib/python3.6/site-packages/yarl:

-rw------- 1 ikegami ikegami    154 Jul 30 11:56 __init__.py
-rw------- 1 ikegami ikegami   3536 Jul 30 11:56 __init__.pyi
drwx------ 1 ikegami ikegami   4096 Jul 30 11:56 __pycache__/
-rw------- 1 ikegami ikegami 467308 Jul 28 10:24 _quoting.c
-rwx--x--x 1 ikegami ikegami 544710 Jul 28 10:24 _quoting.cpython-36m-x86_64-linux-gnu.so*
-rw------- 1 ikegami ikegami    519 Jul 30 11:56 _quoting.py
-rw------- 1 ikegami ikegami  11701 Jul 28 10:24 _quoting.pyx
-rw------- 1 ikegami ikegami 476396 Jul 30 11:56 _quoting_c.c
-rwx--x--x 1 ikegami ikegami 570989 Jul 30 11:56 _quoting_c.cpython-36m-x86_64-linux-gnu.so*
-rw------- 1 ikegami ikegami    447 Jul 30 11:56 _quoting_c.pyi
-rw------- 1 ikegami ikegami  11812 Jul 30 11:56 _quoting_c.pyx
-rw------- 1 ikegami ikegami   6516 Jul 30 11:56 _quoting_py.py
-rw------- 1 ikegami ikegami  34589 Jul 30 11:56 _url.py
-rw------- 1 ikegami ikegami     13 Jul 30 11:56 py.typed
-rw------- 1 ikegami ikegami   6856 Jul 28 10:24 quoting.py

Correct contents of ~/.local/lib/python3.6/site-packages/yarl:

-rw------- 1 ikegami ikegami    154 Jul 30 12:13 __init__.py
-rw------- 1 ikegami ikegami   3536 Jul 30 12:13 __init__.pyi
drwx------ 1 ikegami ikegami   4096 Jul 30 12:13 __pycache__/
-rw------- 1 ikegami ikegami    519 Jul 30 12:13 _quoting.py
-rw------- 1 ikegami ikegami 476396 Jul 30 12:13 _quoting_c.c
-rwx--x--x 1 ikegami ikegami 570989 Jul 30 12:13 _quoting_c.cpython-36m-x86_64-linux-gnu.so*
-rw------- 1 ikegami ikegami    447 Jul 30 12:13 _quoting_c.pyi
-rw------- 1 ikegami ikegami  11812 Jul 30 12:13 _quoting_c.pyx
-rw------- 1 ikegami ikegami   6516 Jul 30 12:13 _quoting_py.py
-rw------- 1 ikegami ikegami  34589 Jul 30 12:13 _url.py
-rw------- 1 ikegami ikegami     13 Jul 30 12:13 py.typed

(Updated: I originally posted the same listing twice.)

Let me know if you want more information.

@nihaals
Copy link

nihaals commented Jul 30, 2020

Could you post a tar with the original broken files? Also, your message seems to show the same output

@ikegami
Copy link

ikegami commented Jul 30, 2020

Sorry, copy and paste error. The following are the correct contents:

-rw------- 1 ikegami ikegami    154 Jul 30 12:13 __init__.py
-rw------- 1 ikegami ikegami   3536 Jul 30 12:13 __init__.pyi
drwx------ 1 ikegami ikegami   4096 Jul 30 12:13 __pycache__/
-rw------- 1 ikegami ikegami    519 Jul 30 12:13 _quoting.py
-rw------- 1 ikegami ikegami 476396 Jul 30 12:13 _quoting_c.c
-rwx--x--x 1 ikegami ikegami 570989 Jul 30 12:13 _quoting_c.cpython-36m-x86_64-linux-gnu.so*
-rw------- 1 ikegami ikegami    447 Jul 30 12:13 _quoting_c.pyi
-rw------- 1 ikegami ikegami  11812 Jul 30 12:13 _quoting_c.pyx
-rw------- 1 ikegami ikegami   6516 Jul 30 12:13 _quoting_py.py
-rw------- 1 ikegami ikegami  34589 Jul 30 12:13 _url.py
-rw------- 1 ikegami ikegami     13 Jul 30 12:13 py.typed

Will create the requested archive immediately.

@nihaals
Copy link

nihaals commented Jul 30, 2020

CC @Harmon758

@ikegami
Copy link

ikegami commented Jul 30, 2020

http://www.adaelis.com/misc/temp/yarl_issue_485.tar.gz @nihaals (Update: Removed. See following message.)

@nihaals
Copy link

nihaals commented Jul 30, 2020

yarl_issue_485.tar.gz
Just to have it on GitHub

@ikegami
Copy link

ikegami commented Jul 30, 2020

Ah, did not know I could do that. I'll remove it from my server.

@nihaals
Copy link

nihaals commented Jul 30, 2020

Did you update your pip after updating to 1.5.0 or before?

@webknjaz
Copy link
Member

Have you tried wiping the pip cache?

@ikegami
Copy link

ikegami commented Jul 31, 2020

Did you update your pip after updating to 1.5.0 or before?

After I started having problems, so after updating to 1.5.0 @nihaals

Have you tried wiping the pip cache?

No. No idea what that means. @webknjaz

(I've literally written one program in Python.)

@remort
Copy link
Author

remort commented Jul 31, 2020

I was rebuilding containers and packages were downloading and building from scratch. Container is based on alpine-3.6 image.

@webknjaz
Copy link
Member

No. No idea what that means. @webknjaz

rm -rf ~/.cache/pip

@webknjaz
Copy link
Member

webknjaz commented Jul 31, 2020

Ah, I see what's happening here:

$ wget https://github.com/aio-libs/yarl/releases/download/v1.5.0/yarl-1.5.0-cp36-cp36m-manylinux1_x86_64.whl
[...]
Saving to: ‘yarl-1.5.0-cp36-cp36m-manylinux1_x86_64.whl’

yarl-1.5.0-cp36-cp3 100%[=================>] 251.50K   565KB/s    in 0.4s

2020-07-31 12:38:08 (565 KB/s) - ‘yarl-1.5.0-cp36-cp36m-manylinux1_x86_64.whl’ saved [257534/257534]

$ wheel unpack yarl-1.5.0-cp36-cp36m-manylinux1_x86_64.whl
Unpacking to: ./yarl-1.5.0...OK

$ ls -l yarl-1.5.0/yarl/
total 1.1M
-rw-r--r-- 1 wk wk  154 Jul 31 12:38 __init__.py
-rw-r--r-- 1 wk wk 3.5K Jul 31 12:38 __init__.pyi
-rw-r--r-- 1 wk wk   13 Jul 31 12:38 py.typed
-rw-r--r-- 1 wk wk 466K Jul 31 12:38 _quoting_c.c
-rw-r--r-- 1 wk wk 558K Jul 31 12:38 _quoting_c.cpython-36m-x86_64-linux-gnu.so
-rw-r--r-- 1 wk wk  447 Jul 31 12:38 _quoting_c.pyi
-rw-r--r-- 1 wk wk  12K Jul 31 12:38 _quoting_c.pyx
-rw-r--r-- 1 wk wk  519 Jul 31 12:38 _quoting.py
-rw-r--r-- 1 wk wk 6.4K Jul 31 12:38 _quoting_py.py
-rw-r--r-- 1 wk wk  34K Jul 31 12:38 _url.py

There's just one C-extension shared object being shipped in pre-compiled platform-specific wheel.
It must be related to #483. It appears that @asvetlov has forgotten to update MANIFEST.in or something else related to packaging.
Will need to fix that and publish a hotfix release.

Oh, and we'll need to mark 1.5.0 as "yanked" on PyPI after the release.

@asvetlov
Copy link
Member

Sorry, guys.
I'll publish the fix ASAP

@webknjaz
Copy link
Member

@asvetlov feel free to tag me for review, I think you need to also update https://github.com/aio-libs/yarl/blob/88559d4/.gitignore#L95-L96 and drop that Cython-generated C-file from the repo.

@helpr helpr bot added pr-merged and removed pr-available labels Jul 31, 2020
@nihaals
Copy link

nihaals commented Jul 31, 2020

@asvetlov When will you be doing a release? Seems like a pretty urgent hotfix

@asvetlov
Copy link
Member

asvetlov commented Aug 1, 2020

Just now

@webknjaz
Copy link
Member

webknjaz commented Aug 4, 2020

@asvetlov this suggests that there may still be some problems aio-libs/aiohttp#4880 (comment).

@nihaals could you confirm that this has been fixed for you?

@nihaals
Copy link

nihaals commented Aug 4, 2020

The issue is an out of date pip version when installing (every report I've seen has used 9.0.1 when first installing 1.5.0). I was never able to repro it which I found especially strange since I tried in a docker container using pip 9.0.1, installing 1.4.2, updating to 1.5.0, and still didn't get the error. It seems to be more in-depth than simply an old pip version and updating, but when I saw the PR and comments from members here I assumed you were confident of the source so never shared my findings

@nihaals
Copy link

nihaals commented Aug 4, 2020

@kirknorthrop do you have a MWE dockerfile that can repro this?

@kirknorthrop
Copy link

kirknorthrop commented Aug 5, 2020

OK, so I've tried to replicate this this morning, and I found that if I rebuilt our base docker image (which installs some build tools like gcc, and a set of base requirements) then it is no longer present. The base requirements are all fixed to version, but not all subrequirements are - I've included at the bottom a list of ones that had changed between the two images. Our base docker image is based on python:3.7-slim

We then take the base image, immediately upgrade pip (which in the failing version took us from 20.1 to 20.2.1) and install further requirements.

Therefore I'm not very sure at all where the issue came from here, although it does appear to be some sort of failure in upgrading. I can't release the docker image unfortunately as it has a password embedded in it, but I am happy to help trace this as best as I can, and if I can try anything out to help then I will do so.

I have a dockerfile which does the bare minimum and uses all the correct versions, but unfortunately still does not replicate! I can assure you that I'm very annoyed - I don't usually file reports unless there is good reason and I'm fairly sure it's not an issue at my end!

Packages upgraded in the newer docker image:
cachetools-4.1.1, certifi-2020.6.20, cffi-1.14.1, cryptography-3.0, google-auth-1.20.0, importlib-metadata-1.7.0, joblib-0.16.0, more-itertools-8.4.0, multidict-4.7.6, py-1.9.0, rsa-4.6, six-1.15.0, typing-extensions-3.7.4.2, urllib3-1.25.10, yarl-1.5.1

@asvetlov
Copy link
Member

asvetlov commented Aug 5, 2020

Talking about the very first bug report (and the following ls outputs):

  File "yarl/_quoting.pyx", line 192, in yarl._quoting._Quoter.__init__
TypeError: __init__() got an unexpected keyword argument 'requote'

The problem is: neither GitHub nor yarl==1.5.1 has yarl/_quoting.pyx file at all.
In yarl 1.5 the file was renamed to yarl/_quoting_c.pyx

I have no idea how did you get it honestly.
Version 1.5.0 had some untidiness in archived files though, this problem was fixed with help of @webknjaz

@kirknorthrop
Copy link

It's all very odd. Sorry for a false report - I'm not sure how it has happened either, given I've spent two hours now failing to replicate it!

@asvetlov
Copy link
Member

asvetlov commented Aug 5, 2020

No problem!

@nihaals
Copy link

nihaals commented Aug 5, 2020

I think the file could be there due to an out of date pip version which for some reason either left the file there when updating or it somehow found it and tried adding it. Maybe someone more familiar with pip bug reports would know?

Has anyone with pip 9.0.1 and yarl 1.5.0 updated to 1.5.1 and still had the issue? If updating solved it in this weird case I guess it's fixed, otherwise, may need to get some more insight from someone working on pip and maybe give a notice that anyone who has this issue should uninstall, delete all site-packages folders related to yarl, update pip then install yarl again (hopefully it doesn't come to that)

@kirknorthrop
Copy link

Here's a dockerfile which seems to do all that, and even includes the exact base docker image we had the issue with... but which still doesn't exhibit that behaviour. (And we were on pip 20.1)

The -m way of running python is because that's what our final image does - just in case it made a difference!

FROM python@sha256:1a4107b19f36d7749f226439c59bec63fd7aa6dedeb132d43bbb0c761b21634e

RUN pip install pip==9.0.1
RUN pip install yarl==1.4.2
RUN pip freeze

RUN pip install --upgrade pip
RUN pip install aiohttp==3.6.2 yarl==1.5.0
RUN pip freeze

RUN echo "from aiohttp import web\nprint('Hello World')" >> test.py

RUN ["python", "-m", "test"]

@jackra1n
Copy link

Hello. Just want to say I got this error today after updating discord.py to 1.4.1 with yarl 1.5.0 and 1.5.1. I was able to fix it by downloading yarl 1.4.2.

@webknjaz
Copy link
Member

@DziQus it'd be great if you could come up with some stable reproducer

@Harmon758
Copy link
Member

This is late, but since there's still some discord.py users encountering this issue:

Since it's possible that force reinstalling v1.5.0 even without using the cache can fail, I think it's plausible that this is because there are files that are mistakenly no longer associated with the library by pip that will not be uninstalled during the reinstall. This means that it's also possible that upgrading from v1.5.0 to v1.5.1 will not fix the issue (see also aio-libs/aiohttp#4880 (comment)), since those files will not be uninstalled during the upgrade process either.

Since yarl v1.4.2's MANIFEST.in is correct, downgrading to v1.4.2 fixes the issue.
Additionally, there should be no issue with upgrading to a version > 1.5.0 (e.g. v1.5.1) afterwards, since the incorrect MANIFEST.in in v1.5.0 would be skipped.

@webknjaz
Copy link
Member

@Harmon758 I'm pretty sure pip tracks the files correctly unless they are installed with unsupported and discouraged methods like setup.py install in which case there's nothing anybody can do about it.

@Harmon758
Copy link
Member

Even if the MANIFEST.in is incorrect? I'm not sure why else pip would leave the files in place through a reinstall and upgrade.

@webknjaz
Copy link
Member

@Harmon758 I'm almost sure that pip only installs files listed in the manifest but then it tracks the old release files according to the older manifest so it should be fine.

@webknjaz
Copy link
Member

Actually, pip doesn't really know about MANIFEST.in. There's other files in metadata in wheels. And for sdists, it's setuptools that uses the manifest on the build stage, not pip. Pip would use dist-info/egg-info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants