Fri, 02 Feb 2018 10:13:42 -0800 check-commit: allow foo_bar naming in functions
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 02 Feb 2018 10:13:42 -0800] rev 43112
check-commit: allow foo_bar naming in functions nameswithallthewordssmashedtogetherarehardtoread. especiallyifenglishisnotyourprimarylanguage. Let's align with the rest of the programming universe and allow_the_use_of_underscores_in_names. We took a hand poll at the 5.2 sprint regarding this change and all but 1 person supported it. The person who didn't expressed concerns around excessive API breakage if we mass renamed things. But we're not planning to mass rename things for the sake of renaming, so all should be well. Differential Revision: https://phab.mercurial-scm.org/D2010
Tue, 08 Oct 2019 13:38:02 -0400 infinitepush: mark extension as likely to be deleted
Augie Fackler <augie@google.com> [Tue, 08 Oct 2019 13:38:02 -0400] rev 43111
infinitepush: mark extension as likely to be deleted .. bc:: The infinitepush extension is believed to be unused, and will be deleted at the end of 2020 unless users contact mercurial-devel@mercurial-scm.org. Differential Revision: https://phab.mercurial-scm.org/D7022
Mon, 07 Oct 2019 10:34:21 -0400 tests: use range() in generate-churning-module.py
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 07 Oct 2019 10:34:21 -0400] rev 43110
tests: use range() in generate-churning-module.py This is a test-only script. Performance on Python 2 for creating a full list instead of a generator doesn't matter. With this change, test-check-pyflakes.t passes on Python 3! Differential Revision: https://phab.mercurial-scm.org/D7019
Mon, 07 Oct 2019 10:31:11 -0400 tests: allow warning about file
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 07 Oct 2019 10:31:11 -0400] rev 43109
tests: allow warning about file The code is protected by a block that makes it Python 2 only, so use of file is acceptable. Differential Revision: https://phab.mercurial-scm.org/D7018
Mon, 07 Oct 2019 10:28:32 -0400 lsprof: remove __main__ functionality
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 07 Oct 2019 10:28:32 -0400] rev 43108
lsprof: remove __main__ functionality I'm pretty sure nobody uses this. I noticed it because Python 3 linting is complaining about execfile. Differential Revision: https://phab.mercurial-scm.org/D7017
Mon, 07 Oct 2019 10:26:46 -0400 tests: use proper Python 3.8 feature
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 07 Oct 2019 10:26:46 -0400] rev 43107
tests: use proper Python 3.8 feature Fix typo introduced in 830eacef67f8. Differential Revision: https://phab.mercurial-scm.org/D7016
Mon, 07 Oct 2019 00:04:04 -0400 py3: finish porting iteritems() to pycompat and remove source transformer
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 07 Oct 2019 00:04:04 -0400] rev 43106
py3: finish porting iteritems() to pycompat and remove source transformer This commit finishes porting .iteritems() to pycompat.iteritems() for the mercurial package. The translation of .iteritems() to .items() was the last conversion performed by the source transformer. With the porting to pycompat complete, we no longer have a need for the source transformer. So the source transformer has been removed. Good riddance! The code base is now compatible with Python 2 and Python 3. For the record, as the person who introduced the source transformer, it brings me joy to delete it. It accomplished its goal to facilitate a port to Python 3 without overly burdening people on some painful low-level differences between Python 2 and 3. It is unfortunate we still have to wallpaper over many differences with the pycompat shim. But it is what it is. Differential Revision: https://phab.mercurial-scm.org/D7015
Sun, 06 Oct 2019 19:25:18 -0400 py3: define and use pycompat.iteritems() for hgext/
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 06 Oct 2019 19:25:18 -0400] rev 43105
py3: define and use pycompat.iteritems() for hgext/ .iteritems() -> .items() is the last source transform being performed. But it is also the most widely used. This commit adds a pycompat.iteritems symbol and imports it in place of .iteritems() for usage in hgext/. I chose to stop at just hgext/ because the patch will be large and it is an easy boundary to stop at since we can disable source transformation on a per-package basis. There are places where the type does implement items() and we could call items() directly. However, this would require critical thought and I thought it would be easier to just blindly change the code. We know which call sites need to be audited in the future because they have "pycompat.iteritems." With this change, we no longer perform source transformation on hgext! Differential Revision: https://phab.mercurial-scm.org/D7014
Sun, 06 Oct 2019 17:59:15 -0400 py3: define and use pycompat.itervalues()
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 06 Oct 2019 17:59:15 -0400] rev 43104
py3: define and use pycompat.itervalues() .itervalues() only exists on Python 2. Python 3's equivalent is .values(). But we don't want to blindly use .values() everywhere because on Python 2, it will create a list, which will have performance implications. This commit introduces pycompat.itervalues() which will call the appropriate method on the passed object. We update all callers of obj.itervalues() to pycompat.itervalues(obj) instead. With this commit, the only source tranforming remaining is for iteritems(). Victory is near... Differential Revision: https://phab.mercurial-scm.org/D7013
Sun, 06 Oct 2019 17:45:05 -0400 py3: stop normalizing 2nd argument of *attr() to unicode
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 06 Oct 2019 17:45:05 -0400] rev 43103
py3: stop normalizing 2nd argument of *attr() to unicode Now that we don't byteify strings, we can stop normalizing the 2nd string argument to getattr() and remove explicit overrides we were using in the code base. We no longer use some helper functions in the source transformer, so we remove those as well. Differential Revision: https://phab.mercurial-scm.org/D7012
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip