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

'python2 -3' prints lots of deprecation warnings #3365

Closed
tiran opened this issue Jan 24, 2017 · 2 comments
Closed

'python2 -3' prints lots of deprecation warnings #3365

tiran opened this issue Jan 24, 2017 · 2 comments

Comments

@tiran
Copy link
Contributor

tiran commented Jan 24, 2017

Are these warnings worse fixing?

$ .tox/py27/bin/python -3
Python 2.7.12 (default, Sep 29 2016, 12:52:02) 
[GCC 6.2.1 20160916 (Red Hat 6.2.1-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cryptography
>>> cryptography
<module 'cryptography' from '/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/__init__.pyc'>
>>> import cryptography.x509.extensions
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/hazmat/primitives/asymmetric/dsa.py:150: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class DSAParameterNumbers(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/hazmat/primitives/asymmetric/dsa.py:189: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class DSAPublicNumbers(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/hazmat/primitives/asymmetric/dsa.py:227: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class DSAPrivateNumbers(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/ipaddress.py:82: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class _TotalOrderingMixin(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/hazmat/primitives/constant_time.py:9: DeprecationWarning: CObject type is not supported in 3.x. Please use capsule objects instead.
  from cryptography.hazmat.bindings._constant_time import lib
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/general_name.py:93: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class DNSName(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/general_name.py:166: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class DirectoryName(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/general_name.py:189: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class RegisteredID(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/general_name.py:212: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class IPAddress(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/general_name.py:247: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class OtherName(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:165: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class AuthorityKeyIdentifier(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:275: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class AuthorityInformationAccess(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:389: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class CRLDistributionPoints(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:426: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class DistributionPoint(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:529: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class PolicyConstraints(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:585: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class CertificatePolicies(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:620: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class PolicyInformation(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:662: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class UserNotice(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:696: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class NoticeReference(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:730: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class ExtendedKeyUsage(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:798: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class KeyUsage(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:884: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class NameConstraints(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:952: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class Extension(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:988: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class GeneralNames(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:1031: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class SubjectAlternativeName(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:1063: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class IssuerAlternativeName(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/extensions.py:1095: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class CertificateIssuer(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib/python2.7/site-packages/cryptography/x509/base.py:179: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  class CertificateRevocationList(object):
/home/heimes/dev/py/cryptography/.tox/py27/lib64/python2.7/abc.py:87: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
  cls = super(ABCMeta, mcls).__new__(mcls, name, bases, namespace)
@reaperhulk
Copy link
Member

#2578 covers most of these, but that list does appear to show that we should implement __hash__ on DSAParameterNumbers, DSAPublicNumbers, and DSAPrivateNumbers

@alex
Copy link
Member

alex commented Feb 14, 2017

I'm going to close this -- all our code works under both 2 and 3, and there's an existing issue that tracks __hash__.

@alex alex closed this as completed Feb 14, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants