cleanup after python 3 migration
Categories
(Socorro :: General, task, P3)
Tracking
(Not tracked)
People
(Reporter: willkg, Assigned: jwhitlock)
Details
Attachments
(3 files)
| Reporter | ||
Updated•7 years ago
|
| Reporter | ||
Comment 1•7 years ago
|
||
| Reporter | ||
Comment 2•7 years ago
|
||
| Reporter | ||
Comment 3•7 years ago
|
||
I'm adjusting the scope here to all Python 3 migration cleanup.
- remove usage of six library
- switch from mock to unittest.mock
- anything else we discover before closing this bug out
| Reporter | ||
Comment 4•7 years ago
|
||
| Reporter | ||
Comment 5•7 years ago
|
||
| Assignee | ||
Comment 6•7 years ago
|
||
Convert most six usage to native Python 3, with the exception of six.reraise.
| Assignee | ||
Comment 7•7 years ago
|
||
| Assignee | ||
Comment 8•7 years ago
|
||
jwhitlock merged PR #4935: "bug 1513346: Migrate six.reraise to standard raise" in 750dece.
Deployed to stage, and tested with reprocessing https://crash-stats.allizom.org/report/index/594c512e-561d-4d05-92b0-992b20190519. It continues to have the ElasticSearch indexing error (bug 1503344). It results in 2 Sentry events. The first is a KeyError traceback, and the second is the wrapping PolyStorageError. The logs include a traceback, as well as the "error in processing or saving crash 594c512e-561d-4d05-92b0-992b20190519" message.
| Assignee | ||
Comment 9•7 years ago
|
||
Deployed to production, six library is no longer used by Socorro code (although it is used by installed packages). Remaining issues that I know about.
- Switch from mock to unittest.mock
- Switch from
class Foo(object):toclass Foo:
willkg and I also discussed removing some empty __init__.py files, to use the implicit namespaced packages added in Python 3.3 (see PEP 420). Some could be removed, such as webapp-django/crashstats/*/management/__init__.py, but removing all of them starts breaking tests. We'll stick with the Python 2 convention of always including it for now.
| Reporter | ||
Comment 10•7 years ago
|
||
This bug was specifically about removing six-isms which were there to help us migrate from Python 2 to Python 3. Now that six use is gone, we're good, so I'm going to mark this FIXED.
Description
•