Page MenuHomePhabricator

Cryptography is going to drop support for python 2.7.6 and before
Closed, ResolvedPublic


Support for Python 2.7.x without hmac.compare_digest has been deprecated. We will require Python 2.7.7 or higher (or 2.7.6 on Ubuntu) in the next cryptography release.

We need to pin the cryptography version to 2.3 or less for those Python versions.

This has already caused multiple errors in our tests, all script tests are failing on 2.7_with_system_site_packages because of the deprecation warning:

FAIL: test_add_text (tests.script_tests.TestScriptHelp)
Test running add_text -help.
Traceback (most recent call last):
  File "/home/travis/build/wikimedia/pywikibot/tests/", line 288, in testScript
AssertionError: u'Use -help for further information.' not found in [u'/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/cryptography/hazmat/primitives/ CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.', u'  utils.DeprecatedIn23,', u'family and mylang are not set.', u"Defaulting to family='test' and mylang='test'."]


Related Gerrit Patches:

Event Timeline

Dalba created this task.Jul 19 2018, 2:18 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJul 19 2018, 2:18 AM
Dalba triaged this task as High priority.Jul 19 2018, 2:48 AM

Change 447040 had a related patch set uploaded (by Dalba; owner: dalba):
[pywikibot/core@master] Require cryptography<2.3 for Python 2.7.7 or older

Dalba claimed this task.Jul 20 2018, 8:09 AM

Change 447040 merged by jenkins-bot:
[pywikibot/core@master] Require cryptography<2.3 for Python 2.7.6 or older

Dalba closed this task as Resolved.Jul 21 2018, 9:31 AM

I believe we should deprecate Python versions older than 2.7.6, too, but that is better left for another task.

Xqt changed the status of subtask T203471: Drop support for Python 2.7.6 and lower from Open to Stalled.Oct 26 2018, 3:00 AM
Xqt changed the status of subtask T203471: Drop support for Python 2.7.6 and lower from Stalled to Open.Feb 13 2019, 3:29 PM