sphinx-contrib / fulltoc

Extension for Sphinx to make the sidebar show a full table of contents instead of just the local headings
Apache License 2.0
38 stars 20 forks source link

Blacklist pbr 3.1.1 from setup #17

Closed electrofelix closed 4 years ago

electrofelix commented 6 years ago

Pbr release 3.1.1 is broken and causes problems with install via pip if it is used, so make sure to prevent it being used.

Pbr 3.1.1 will result in the following error during a pip install:

TypeError: super() argument 1 must be type, not None

fixes: #14

electrofelix commented 6 years ago

@dhellmann is this ok to get merged?

dhellmann commented 6 years ago

I'm not sure that setuptools honors the version specifiers in the setup_requires field. Does it? Does the newest version of pbr still have this problem? What is causing the older version of pbr to be installed?

dhellmann commented 6 years ago

I should make it clear that I'm not opposed to merging the change, I'm just not sure it's going to help either so I want to understand a bit more before we go ahead.

electrofelix commented 6 years ago

@dhellmann it appears to, when I tweak the setup.py locally with the following change:

diff --git a/setup.py b/setup.py
index de94cdb..e9476a1 100644
--- a/setup.py
+++ b/setup.py
@@ -25,5 +25,5 @@ except ImportError:
     pass

 setuptools.setup(
-    setup_requires=['pbr!=3.1.1'],
+    setup_requires=['pbr!=3.1.1,<4.0.0'],
     pbr=True)

Which should prevent version 4 and later from being used meaning that if 3.1.1 is blocked, then 3.1.0 should be used.

Setup a venv and then install the local tree:

virtualenv test
source test/bin/activate
pip install -e .

I discover that under a .eggs directory pip has downloaded pbr-3.1.0:

ls -1 .eggs/
pbr-3.1.0-py2.7.egg
README.txt

Wipe the .eggs directory, checkout to discard the local change and re-run the pip install

rm -rf .eggs/
git checkout -- .
pip install -e .

And then list the .eggs directory and I see:

pbr-4.2.0-py2.7.egg
README.txt

So it looks like this does blacklist pbr 3.1.1 for package install which should make sure that if someone happens to have installed that version locally, the setuptools will ignore it for the installation and as it's not required at runtime, all is good.

In general though it shouldn't be needed as it should only be a fairly odd case were someone has pbr 3.1.1 installed any more instead of the more recent 4.x.x series.

electrofelix commented 4 years ago

presumably this is long enough ago that no one will have the broken version, so closing