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

[BUG] Releases 1.8.1 and 1.8.2 on PyPI don't work when installed with_$EXTRA or with-$EXTRA #545

Closed
volans- opened this issue Dec 1, 2022 · 11 comments · Fixed by #559
Closed
Milestone

Comments

@volans-
Copy link
Contributor

volans- commented Dec 1, 2022

Describe the bug

When trying to install the latest version of Prospector from PyPI 1.8.1 with some extras like with_everything or with_pyroma a warning is printed and Prospector is installed without the extras.

To Reproduce

$ pip install "prospector[with_pyroma]"
Collecting prospector[with_pyroma]
  Using cached prospector-1.8.1-py3-none-any.whl (85 kB)
WARNING: prospector 1.8.1 does not provide the extra 'with_pyroma'
...

or

$ pip install "prospector[with_everything]"
Collecting prospector[with_everything]
  Using cached prospector-1.8.1-py3-none-any.whl (85 kB)
WARNING: prospector 1.8.1 does not provide the extra 'with_everything'
...

Expected behavior

It should install Prospector with the selected extras.

Environment:

  • OS: macOS 12.6.1
  • Prospector version 1.8.1
  • Python versions: 3.9.15 and 3.10.8
wmfgerrit pushed a commit to wikimedia/operations-cookbooks that referenced this issue Dec 1, 2022
* The latest release of prospector doesn't ship the with_* extras.
  See: prospector-dev/prospector#545

Change-Id: I6092bf0d5cf2143d216d9bf6a06b166feaa14e1e
@sbrunner
Copy link
Member

sbrunner commented Dec 1, 2022

Isn't it related to this issue?
python-poetry/poetry#6819

@Pierre-Sassoulas
Copy link
Collaborator

Does [with-everything] works ?

@volans-
Copy link
Contributor Author

volans- commented Dec 1, 2022

Isn't it related to this issue? python-poetry/poetry#6819

It looks like it, [with-everything] does actually work.

@Pierre-Sassoulas
Copy link
Collaborator

I think we have to upgrade the doc, this is a poetry behavior that will be painful to change.

@ckleemann
Copy link
Contributor

This issue also happens when installing from pip. There is a glitch in the doc. Before it was [with _ everything] now it is [with - everything]

@volans-
Copy link
Contributor Author

volans- commented Dec 1, 2022

It looks like it, [with-everything] does actually work.

Actually I have to correct myself, although the pip installation works, prospector is not able to run the extra tool though.

Repro steps:

$ pip install "prospector[with-everything]"
...

$ pip freeze | grep -E '(pyroma|prospector)'
prospector==1.8.1
pyroma==4.1

$ cat prospector.yaml
pyroma:
  run: true

$ prospector --profile prospector.yaml test/

Cannot run tool pyroma as support was not installed.
Please install by running 'pip install prospector[with_pyroma]'

@sbrunner
Copy link
Member

sbrunner commented Dec 2, 2022

For me, you should publish prospector with on older version of poetry since it is fixed in pip...

@Pierre-Sassoulas
Copy link
Collaborator

I think you mean we should use an old version of poetry when releasing but I did not understand "this is fixed in pip" @sbrunner ?

@sbrunner
Copy link
Member

sbrunner commented Dec 2, 2022

In this issue python-poetry/poetry#6819
It says that an issue in pip about PEP 685.
Issue in pip: pypa/pip#11445
Merged pull request in packaging: pypa/packaging#545
Release issue in packaging: pypa/packaging#569
In the last message we see that should be done soon :-)

@Pierre-Sassoulas
Copy link
Collaborator

Thanks for tracking the root cause 👍 So if I understand we should release using an old poetry and wait for the 22.2 release in pip and use the latest poetry only then ?

wmfgerrit pushed a commit to wikimedia/operations-software-spicerack that referenced this issue Dec 5, 2022
* Add python_requires metadata. The latest pyroma does check for its
  presence and it makes sense to add it to prevent from installing
  the package on the wrong Python version.
* Revert old upper limit for GitPython, there are no more issue with
  more recent versions.
* Set an upper limit for pylint and prospector. A change in pylint broke
  prospector, but we can't upgrade prospector because of an upstream
  bug, see:
  prospector-dev/prospector#545
* Split the python auto-formatter test dependencies on their own extra
  group so that they can be installed alone in the already split virtual
  environment for the tox envs py3-style and py3-format.
  This way there are no conflicts between other test dependencies and
  black and isort.
* Add specific style tox environments for each Python version to avoid
  the CI jobs to pick Python 3.7 that has a pip backtracking issue with
  the latest versions of the dependencies. Keep the py3-{style,format}
  environments for ease of use locally and to not break compatibility
  but make the py3-style one not run automatically in CI.

Change-Id: I6ce05223df3bf17e269994ee7501ec16e35c76dd
wmfgerrit pushed a commit to wikimedia/cumin that referenced this issue Dec 5, 2022
* Add python_requires metadata. The latest pyroma does check for its
  presence and it makes sense to add it to prevent from installing
  the package on the wrong Python version.
* Set an upper limit for pylint and prospector. A change in pylint broke
  prospector, but we can't upgrade prospector because of an upstream
  bug, see: prospector-dev/prospector#545

Change-Id: I2cae1d503639ba35bb0f93515988aff8a207b4f6
@volans- volans- changed the title [BUG] Release 1.8.1 on PyPI is missing the extras with_$NAME [BUG] Releases 1.8.1 and 1.8.2 on PyPI don't work when installed with_$EXTRA or with-$EXTRA Dec 7, 2022
@volans-
Copy link
Contributor Author

volans- commented Dec 7, 2022

@Pierre-Sassoulas I took the liberty to rename the task to be more clear. Do you happen to have an ETA for the resolution of this problem?
I was also wondering if there should be some other label applied to this task in addition to Documentation.

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.

4 participants