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

new version of six (1.11.0) breaks pgpy with python2.7 #217

Closed
drebs opened this issue Sep 18, 2017 · 12 comments
Closed

new version of six (1.11.0) breaks pgpy with python2.7 #217

drebs opened this issue Sep 18, 2017 · 12 comments
Labels
Milestone

Comments

@drebs
Copy link

drebs commented Sep 18, 2017

six just released version 1.11.0, which seems to break pgpy when using python2.7:

$ virtualenv -p python2.7 /tmp/venv
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /tmp/venv/bin/python2.7
Also creating executable in /tmp/venv/bin/python
Installing setuptools, pip, wheel...done.
$ source /tmp/venv/bin/activate
$ python --version
Python 2.7.13
$ pip install pgpy
Collecting pgpy
Collecting pyasn1 (from pgpy)
  Using cached pyasn1-0.3.5-py2.py3-none-any.whl
Collecting six>=1.9.0 (from pgpy)
  Using cached six-1.11.0-py2.py3-none-any.whl
Collecting singledispatch (from pgpy)
  Using cached singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting enum34 (from pgpy)
  Using cached enum34-1.1.6-py2-none-any.whl
Collecting cryptography>=1.1 (from pgpy)
  Using cached cryptography-2.0.3-cp27-cp27mu-manylinux1_x86_64.whl
Collecting ipaddress (from cryptography>=1.1->pgpy)
  Using cached ipaddress-1.0.18-py2-none-any.whl
Collecting idna>=2.1 (from cryptography>=1.1->pgpy)
  Using cached idna-2.6-py2.py3-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=1.1->pgpy)
  Using cached asn1crypto-0.22.0-py2.py3-none-any.whl
Collecting cffi>=1.7 (from cryptography>=1.1->pgpy)
  Using cached cffi-1.11.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting pycparser (from cffi>=1.7->cryptography>=1.1->pgpy)
Installing collected packages: pyasn1, six, singledispatch, enum34, ipaddress, idna, asn1crypto, pycparser, cffi, cryptography, pgpy
Successfully installed asn1crypto-0.22.0 cffi-1.11.0 cryptography-2.0.3 enum34-1.1.6 idna-2.6 ipaddress-1.0.18 pgpy-0.4.3 pyasn1-0.3.5 pycparser-2.18 singledispatch-3.4.0.3 six-1.11.0
$ python -c "import pgpy"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/venv/local/lib/python2.7/site-packages/pgpy/__init__.py", line 5, in <module>
    from .pgp import PGPKey
  File "/tmp/venv/local/lib/python2.7/site-packages/pgpy/pgp.py", line 24, in <module>
    from .constants import CompressionAlgorithm
  File "/tmp/venv/local/lib/python2.7/site-packages/pgpy/constants.py", line 22, in <module>
    from .types import FlagEnum
  File "/tmp/venv/local/lib/python2.7/site-packages/pgpy/types.py", line 260, in <module>
    class PGPObject(six.with_metaclass(abc.ABCMeta, object)):
  File "/tmp/venv/lib/python2.7/abc.py", line 87, in __new__
    cls = super(ABCMeta, mcls).__new__(mcls, name, bases, namespace)
TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

If I force six version 1.10.0 it works:

$ pip install six==1.10.0
Collecting six==1.10.0
  Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six
  Found existing installation: six 1.11.0
    Uninstalling six-1.11.0:
      Successfully uninstalled six-1.11.0
Successfully installed six-1.10.0
$ python -c "import pgpy"
leap-code-o-matic pushed a commit to leapcode/soledad that referenced this issue Sep 18, 2017
New six version (1.11.0) breaks pgpy, so we pin to previous version
(1.10.0). See: SecurityInnovation/PGPy#217
Commod0re added a commit that referenced this issue Sep 18, 2017
@Commod0re Commod0re added the bug label Sep 18, 2017
@Commod0re Commod0re added this to the 0.5.0 milestone Sep 18, 2017
gdchamal added a commit to CaliOpen/Caliopen that referenced this issue Sep 20, 2017
leap-code-o-matic pushed a commit to leapcode/soledad that referenced this issue Sep 24, 2017
New six version (1.11.0) breaks pgpy, so we pin to previous version
(1.10.0). See: SecurityInnovation/PGPy#217
leap-code-o-matic pushed a commit to leapcode/leap_mx that referenced this issue Sep 28, 2017
add the version of with_metaclass found in six==1.10.0

See SecurityInnovation/PGPy#217

- Resolves: #8672
jhford added a commit to taskcluster/taskcluster-client.py that referenced this issue Oct 17, 2017
jhford added a commit to taskcluster/taskcluster-client.py that referenced this issue Oct 18, 2017
@jhford
Copy link

jhford commented Oct 18, 2017

Hey, thanks for fixing this! I was wondering what the time frame is for a new release which would have this patch included?

@Commod0re
Copy link
Contributor

I was hoping six would have had a patch released by now to fix their forward compatibility (it sounded like they were planning on it), but since that has not happened, I will do another patch release that will include this fix very soon

@edmorley
Copy link

edmorley commented Nov 5, 2017

I was hoping six would have had a patch released by now to fix their forward compatibility (it sounded like they were planning on it), but since that has not happened, I will do another patch release that will include this fix very soon

I've pinged benjaminp/six#210 again asking for a revert, however it's worth noting the usage here was broken, so the fix to PGPy was needed either way.

@Commod0re
Copy link
Contributor

It actually worked prior to six 1.11.0, so it clearly was not "broken" prior to 1.11.0, even if it was not the intended usage. The "correct" code did not work as it was supposed to when I originally wrote that stuff, which is why it was that way. The supposedly "broken" code had no adverse side effects prior to six 1.11.0, so I'm not even sure what value the changes that caused it to become broken actually have.

@Commod0re Commod0re modified the milestones: 0.5.0, 0.4.4 Nov 8, 2017
@edmorley
Copy link

Hi! I don't suppose it would be possible to cut a new point release including the fix for this at some point soon? Many thanks :-)

@jhford
Copy link

jhford commented Nov 24, 2017

heh, I just came here to check the same thing!

@Commod0re
Copy link
Contributor

Commod0re commented Nov 27, 2017

Working on it! :)

@edmorley
Copy link

If there's anything we can do to help, let us know :-)

hpk42 added a commit to hpk42/muacrypt that referenced this issue Jan 3, 2018
- the tests on py27 are currently broken due to the
  long pending issue SecurityInnovation/PGPy#217

- this autocrypt repository is not going to drop the dependency on
  and default of gpg or gpg2 any time soon (stability, missing keyring support)
  and there are a number of upcoming refactorings where all not-used code
  requires more effort to keep working.

- there is a separate "pyac" effort aiming for implementing autocrypt
  with pgpy https://github.com/juga0/pyac and it -- it probably makes
  sense to try merge/converge between the two efforts once pgpy is
  usable and stable enough.
@edmorley
Copy link

Perhaps to simplify the release, just these commits (and not the newer ones) could be released, reducing the amount of testing/prep required?
0.4.3...28920bc

@NCommander
Copy link

NCommander commented Jul 30, 2018

Is there any chance we can get a fix released for this sometime in the near future? I just slammed into this while working on a project that needs to support Py2/Py3 on Ubuntu Bionic.

@sayoojsamuel
Copy link

This issue is popping back up now. I have six==1.12.0 now, and the error message is

TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

Please note that reverting the six version to 1.10.0 is causing other apps to crash
Any plans to reopen this issue?

@Commod0re
Copy link
Contributor

this is fixed and will be available shortly in PGPy v0.5.0

memory pushed a commit to memory/repoman that referenced this issue Dec 2, 2019
- Update pydpkg dependency to handle xz-compressed control files

- Update PGPy dependency to 0.5.2 to resolve build errors.
  (cf: SecurityInnovation/PGPy#217)

- Deprecate Python 3.3 support

- Add support for python 3.6, 3.7

- fix setup.py long description handling

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

No branches or pull requests

6 participants