Commit Graph

371 Commits

Author SHA1 Message Date
Serhiy Storchaka
3e3e1a27f7 [2.7] bpo-35133: Fix mistakes when concatenate string literals on different lines. (GH-10284) (GH-10335) (GH-10336)
Two kind of mistakes:

1. Missed space. After concatenating there is no space between words.

2. Missed comma. Causes unintentional concatenating in a list of strings.
(cherry picked from commit 34fd4c2019)
(cherry picked from commit 7054e5c80b6e98cd44e22d1bc2d7f0a94343089d)
2018-11-05 18:16:26 +02:00
Mickaël Schoentgen
30af2e737a bpo-34500: Fix ResourceWarning in difflib.py (GH-8926)
The change to Tools/scripts/diff.py effectively backports part of
a2637729f2.
The test code changed in Doc/library/difflib.rst is not present in current 3.x.
2018-09-02 21:48:08 -04:00
Benjamin Peterson
9bbb8e21ca [2.7] remove hg support from patchcheck (GH-7440). (GH-7444)
(cherry picked from commit b8c0845fee)
2018-06-05 22:55:10 -07:00
Antoine Pitrou
36af11877a [2.7] Update make patchcheck for blurb and NEWS.d (GH-2381) (GH-6576)
(cherry picked from commit 1ba9469)
2018-04-23 14:22:15 +02:00
Serhiy Storchaka
17cec70a38 bpo-30109: Fix reindent.py for non-ASCII files. (#5637)
It now processes files as binary streams.

This also fixes "make reindent".
2018-02-12 20:16:42 +02:00
Victor Stinner
d45cb040b9 [2.7] bpo-31221: patchcheck ignores external libraries (#3109) (#3118)
* bpo-31221: patchcheck ignores external libraries (#3109)

Tools/scripts/patchcheck.py now ignores changes in directories which
are copies of external libraries:

* Modules/_ctypes/libffi_msvc/
* Modules/_ctypes/libffi_osx/
* Modules/_decimal/libmpdec/
* Modules/expat/
* Modules/zlib/

Drop also support for Mercurial, since CPython migrated to Git.

Exclude also libmpdec

patchcheck: exclude also libffi_osx and libffi_msvc
(cherry picked from commit 4a347ce426)

* Exclude also Modules/_ctypes/libffi on Python 2.7

* Remove _decimal/libmpdec, not in Python 2.7
2017-08-17 17:13:01 +02:00
Nick Coghlan
d6d943a090 Issue #29798: Handle git worktree in patchcheck (#1057)
The original attempted fix missed an `isdir()` call in
`get_base_branch()`.
2017-04-09 18:32:48 +10:00
Nick Coghlan
ee10fb9c5b bpo-29798: Handle git worktree in make patchcheck (#629) (#635)
In git worktree directories, `.git` is a configuration
file rather than a subdirectory
(cherry picked from commit 6a6d090612)
2017-03-12 20:03:45 +10:00
Nick Coghlan
c8869af89e [2.7] bpo-29656: Handle PR branches in 'make patchcheck' (#302) (#628)
Additional changes needed to backport:

- dropped legacy SVN support from patchcheck
- use subprocess.PIPE to silence expected error output
- don't try to use subprocess.Popen as a context manager
- don't try to pass a keyword argument to str.split()

(cherry picked from commit 482f7a274f)
2017-03-12 19:34:16 +10:00
Serhiy Storchaka
f8cc2870f1 Issue #28515: Fixed py3k warnings. 2016-10-25 09:51:38 +03:00
Martin Panter
8f7d36ba9a Issue #27952: Get fixcid.py working with the re module 2016-09-11 09:48:57 +00:00
Martin Panter
a850ef698e Issue #27626: Spelling fixes in docs, comments and internal names
Based on patch by Ville Skyttä.
2016-07-28 01:11:04 +00:00
Serhiy Storchaka
6d297cbec4 Issue #26581: Use the first coding cookie on a line, not the last one. 2016-03-20 23:36:29 +02:00
Terry Jan Reedy
cfad18dbdb Issue #25505: Remove unused buggy method. 2015-10-30 19:25:28 -04:00
Serhiy Storchaka
aa767a555b Issue #23330: h2py now supports arbitrary filenames in #include. 2015-05-03 15:35:02 +03:00
Benjamin Peterson
35452b3f95 delete old ftpmirror script, which now has security bugs (closes #23130) 2014-12-30 10:08:16 -06:00
Donald Stufft
8aaff54db3 Implement PEP 477 - Backport ensurepip (PEP 453) to 2.7
* Backports ensurepip to the 2.7 branch
* Backports some of the improved documentation to the 2.7 branch.
* Adds a private backport of the 3.x mock library as test._mock_backport
  to enable saner testing of ensurepip.

Key Differences from 3.x:

* Ensurepip does not have any Makefile integration, specifically
  it is not ran by default in the Makefile.
* There is no venv module in 2.7, so downstream distributors can
  completely disable ensurepip, ideally with a message redirecting
  to the correct way to install pip.
* To match the ``python`` command in 2.7, ensurepip will install
  the unversioned ``pip`` command as well.
* No-op and hide --default-pip and add --no-default-pip to restore
  the 3.x behavor on 2.7.
2014-11-11 10:24:11 -05:00
Georg Brandl
6a1184c024 Closes #22663: patchcheck: only modify text files under Doc/ 2014-10-19 11:54:08 +02:00
Serhiy Storchaka
3eb554fc82 Issue #22221: Backported fixes from Python 3 (issue #18960).
* Now the source encoding declaration on the second line isn't effective if
  the first line contains anything except a comment.  This affects compile(),
  eval() and exec() too.

* IDLE now ignores the source encoding declaration on the second line if the
  first line contains anything except a comment.

* 2to3 and the findnocoding.py script now ignore the source encoding
  declaration on the second line if the first line contains anything except
  a comment.
2014-09-05 10:22:05 +03:00
Serhiy Storchaka
e0ed2d75c8 Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them.  Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.
2014-01-16 18:59:17 +02:00
Serhiy Storchaka
e4818f6937 Remove the use of non-existing re.ASCII.
(fixes a regression in 3d46ef0c62c5, issue #18873)
2013-09-17 10:09:08 +03:00
Serhiy Storchaka
e787bce79c Issue #18873: IDLE, 2to3, and the findnocoding.py script now detect Python
source code encoding only in comment lines.
2013-09-17 00:00:46 +03:00
Ezio Melotti
6d0f0f299b #18803: fix more typos. Patch by Févry Thibault. 2013-08-26 01:31:30 +03:00
Terry Jan Reedy
68ad1d1372 Issue #18439: Make patchcheck work on Windows for ACKS, NEWS. 2013-07-21 20:57:44 -04:00
Ned Deily
69f051c33c Issue #17801: fix shebang line of gprof2html.py 2013-04-20 14:07:05 -07:00