Page MenuHomePhabricator

test_mime_file_container of dry_api_tests.DryMimeTests is failing for Python 3.5+
Closed, ResolvedPublicBUG REPORT

Description

======================================================================
FAIL: test_mime_file_container (tests.dry_api_tests.DryMimeTests)
Test Request._build_mime_request encodes binary.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/wikimedia/pywikibot/tests/dry_api_tests.py", line 302, in test_mime_file_container
    self.assertNotEqual(body.find(file_content), -1)
AssertionError: -1 == -1
----------------------------------------------------------------------

https://travis-ci.org/wikimedia/pywikibot/jobs/562945415 for example

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald Transcript
Xqt triaged this task as High priority.Jul 24 2019, 9:06 AM
Xqt changed the subtype of this task from "Task" to "Bug Report".

Either T113120 isn't really solved or the behaviour is different from Python 2. The fix works for Python 3.4 only since rPWBC07ce5ab6fe67.

Xqt renamed this task from test_mime_file_container of dry_api_tests.DryMimeTests is failing to test_mime_file_container of dry_api_tests.DryMimeTests is failing for Python 3.5+.Jul 24 2019, 9:41 AM
Xqt added subscribers: Dalba, Mpaa.

Either T113120 isn't really solved or the behaviour is different from Python 2. The fix works for Python 3.4 only since rPWBC07ce5ab6fe67.

According to CPython's changelog, the fix for issue19003 has been published in Python 3.5.3 RC1. Therefore 3.5.0, 3.5.1, and 3.5.2 have that issue.
There is also another issue which is still not resolved: BytesGenerator does not handle 'binary' CTE correctly.

Change 525285 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] Revert "[bugfix] T113120 is solved for Python 3.5+"

https://gerrit.wikimedia.org/r/525285

Change 525285 merged by jenkins-bot:
[pywikibot/core@master] Revert "[bugfix] T113120 is solved for Python 3.5+"

https://gerrit.wikimedia.org/r/525285

Xqt claimed this task.