This is an archive of the discontinued Mercurial Phabricator instance.

remotenames: work around move of ABCs in collections
ClosedPublic

Authored by durin42 on Mar 13 2018, 6:14 PM.

Details

Summary

This starts warning in Python 3.7, and will break in 3.8. The import
is performed in a curious place because import collections.abc
explodes badly on Python 2.7, and from collections import abc flunks
our import checker.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

durin42 created this revision.Mar 13 2018, 6:14 PM
durin42 edited the summary of this revision. (Show Details)Mar 13 2018, 11:30 PM
durin42 updated this revision to Diff 7021.
yuja added a subscriber: yuja.Mar 14 2018, 9:55 AM

Could be either import collections.abc or adding collections.abc to
list_stdlib_modules.

durin42 edited the summary of this revision. (Show Details)Mar 14 2018, 1:18 PM
durin42 updated this revision to Diff 7037.
In D2847#45947, @yuja wrote:

Could be either import collections.abc or adding collections.abc to
list_stdlib_modules.

Sadly, neither worked :(

The import checker currently bans /all/ from ... import ... statements on stdlib modules (sigh, probably my fault), and import collections.abc goes sideways on Python 2. What I've done seems to work though...

yuja accepted this revision.Mar 15 2018, 10:32 AM
This revision is now accepted and ready to land.Mar 15 2018, 10:32 AM
This revision was automatically updated to reflect the committed changes.