This is an archive of the discontinued Mercurial Phabricator instance.

bundle2: fixed usage of an attribute that was removed in py3k
ClosedPublic

Authored by alex.gaynor on Aug 22 2017, 9:10 PM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex.gaynor created this revision.Aug 22 2017, 9:10 PM
indygreg accepted this revision.Aug 22 2017, 9:39 PM
indygreg added a subscriber: indygreg.

The commit message should likely say something about how the existing use of string.letters was logically wrong, since it is locale dependent. string.ascii_letters is definitely the variable we should have been using all along.

This revision is now accepted and ready to land.Aug 22 2017, 9:39 PM

Would it be possible to define pycompat.bytestr(string.ascii_letters) at the module level once and for all?

durin42 edited edge metadata.Aug 23 2017, 11:03 AM

Would it be possible to define pycompat.bytestr(string.ascii_letters) at the module level once and for all?

I think I'd bias against this, just because it's only used in six or so places and pycompat is already getting kind of shaggy.

Good for me.

I have the impression that we tend to defined static data (like pycompat.bytestr(string.ascii_letters) or some translations) inside functions while they could be defined once at module level. Is it intentional, is it for reducing startup time?

This revision was automatically updated to reflect the committed changes.