]> granicus.if.org Git - python/log
python
5 years agoFix idlelib typos discovered by min ho, pr 15018. (GH-15029)
Terry Jan Reedy [Tue, 30 Jul 2019 22:14:58 +0000 (18:14 -0400)]
Fix idlelib typos discovered by min ho, pr 15018. (GH-15029)

5 years agobpo-36084: Add threading Native ID information to What's New documentation (GH-14845)
Jake Tesler [Tue, 30 Jul 2019 21:41:46 +0000 (14:41 -0700)]
bpo-36084: Add threading Native ID information to What's New documentation (GH-14845)

5 years agoDon't skip pickle check_frame_opcodes() (GH-15025)
Neil Schemenauer [Tue, 30 Jul 2019 19:08:17 +0000 (12:08 -0700)]
Don't skip pickle check_frame_opcodes() (GH-15025)

This looks like the only place that proto 4 framing gets exercised
so leave it as part of the PGO task.

5 years agobpo-37707: Exclude expensive unit tests from PGO task (GH-15009)
Neil Schemenauer [Tue, 30 Jul 2019 18:08:18 +0000 (11:08 -0700)]
bpo-37707: Exclude expensive unit tests from PGO task (GH-15009)

Mark some individual tests to skip when --pgo is used.  The tests
marked increase the PGO task time significantly and likely don't
help improve optimization of the final executable.

5 years agobpo-37704: Remove Tools/scripts/h2py.py (GH-15000)
Victor Stinner [Tue, 30 Jul 2019 15:45:09 +0000 (17:45 +0200)]
bpo-37704: Remove Tools/scripts/h2py.py (GH-15000)

Use cffi to access a C API in Python.

5 years agobpo-37587: Make json.loads faster for long strings (GH-14752)
Marco Paolini [Tue, 30 Jul 2019 14:16:34 +0000 (15:16 +0100)]
bpo-37587: Make json.loads faster for long strings (GH-14752)

When scanning the string, most characters are valid, so
checking for invalid characters first means never needing
to check the value of strict on valid strings, and only
needing to check it on invalid characters when doing
non-strict parsing of invalid strings.

This provides a measurable reduction in per-character
processing time (~11% in the pre-merge patch testing).

5 years agobpo-37268: Add deprecation notice and a DeprecationWarning for the parser module...
Pablo Galindo [Tue, 30 Jul 2019 11:04:01 +0000 (12:04 +0100)]
bpo-37268: Add deprecation notice and a DeprecationWarning for the parser module (GH-15017)

Deprecate the parser module and add a deprecation warning triggered on import and a warning block in the documentation.

https://bugs.python.org/issue37268

Automerge-Triggered-By: @pablogsal
5 years agobpo-34162: Update idlelib/news.txt. (#15011)
Terry Jan Reedy [Mon, 29 Jul 2019 22:12:14 +0000 (18:12 -0400)]
bpo-34162: Update idlelib/news.txt. (#15011)

5 years agobpo-37706: Disable 3 IDLE scrollbar tests on Mac. (#15010)
Terry Jan Reedy [Mon, 29 Jul 2019 21:57:36 +0000 (17:57 -0400)]
bpo-37706: Disable 3 IDLE scrollbar tests on Mac. (#15010)

They pass with tk 8.5.9 (Azure) but fail with the 8.6.x we install.

5 years agoFix publishing of Windows release (GH-15006)
Steve Dower [Mon, 29 Jul 2019 18:22:27 +0000 (11:22 -0700)]
Fix publishing of Windows release (GH-15006)

5 years agoAdd additional test for multi-line SyntaxError (GH-15003)
Anthony Sottile [Mon, 29 Jul 2019 15:05:55 +0000 (08:05 -0700)]
Add additional test for multi-line SyntaxError (GH-15003)

5 years agoFix `SyntaxError` indicator printing too many spaces for multi-line strings (GH-14433)
Anthony Sottile [Mon, 29 Jul 2019 13:59:13 +0000 (06:59 -0700)]
Fix `SyntaxError` indicator printing too many spaces for multi-line strings (GH-14433)

5 years agobpo-36044: Avoid warnings in Windows PGO build and add lzma, bz2 and sqlite coverage...
Steve Dower [Mon, 29 Jul 2019 01:01:12 +0000 (18:01 -0700)]
bpo-36044: Avoid warnings in Windows PGO build and add lzma, bz2 and sqlite coverage (GH-14985)

https://bugs.python.org/issue36044

Automerge-Triggered-By: @zooba
5 years agobpo-37697: Sync with importlib_metadata 0.19 (#14993)
Jason R. Coombs [Sun, 28 Jul 2019 18:59:24 +0000 (14:59 -0400)]
bpo-37697: Sync with importlib_metadata 0.19 (#14993)

* bpo-37697: Sync with importlib_metadata 0.19

* Run make regen-importlib

* ðŸ“œðŸ¤– Added by blurb_it.

5 years agobpo-37692: Improve highlight config sample (#14983)
Terry Jan Reedy [Sun, 28 Jul 2019 16:04:31 +0000 (12:04 -0400)]
bpo-37692: Improve highlight config sample (#14983)

Use an example shell interaction in the sample and better labels for shell elements.

5 years agoRemove trailing .0 from version changed note (GH-14987)
Nick Coghlan [Sun, 28 Jul 2019 11:40:47 +0000 (21:40 +1000)]
Remove trailing .0 from version changed note (GH-14987)

5 years agobpo-37691: Let math.dist() accept sequences and iterables for coordinates (GH-14975)
Raymond Hettinger [Sat, 27 Jul 2019 21:04:29 +0000 (14:04 -0700)]
bpo-37691: Let math.dist() accept sequences and iterables for coordinates (GH-14975)

5 years agobpo-37628: Fix IDLE config sample sizes (#14958)
Tal Einat [Sat, 27 Jul 2019 16:57:48 +0000 (19:57 +0300)]
bpo-37628: Fix IDLE config sample sizes (#14958)

The boxes for the font and highlight samples are now constrained by the overall config dialog size.  They gain scrollbars when the when a large font size makes the samples too large for the box.

5 years agoAdd Qt GUI example to the logging cookbook. (GH-14978)
Vinay Sajip [Sat, 27 Jul 2019 12:46:53 +0000 (13:46 +0100)]
Add Qt GUI example to the logging cookbook. (GH-14978)

5 years agobpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
Tal Einat [Sat, 27 Jul 2019 03:24:37 +0000 (06:24 +0300)]
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)

5 years agobpo-32910: Remove implementation detail in venv documentation. (GH-14968)
Derek Keeler [Fri, 26 Jul 2019 21:57:11 +0000 (14:57 -0700)]
bpo-32910: Remove implementation detail in venv documentation. (GH-14968)

5 years agobpo-35524: Update Windows installer image in docs (GH-14966)
Steve Dower [Fri, 26 Jul 2019 20:03:58 +0000 (13:03 -0700)]
bpo-35524: Update Windows installer image in docs (GH-14966)

5 years agobpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)
Steve Dower [Fri, 26 Jul 2019 16:06:04 +0000 (09:06 -0700)]
bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)

5 years agobpo-37340: remove free_list for bound method objects (GH-14232)
Inada Naoki [Fri, 26 Jul 2019 06:05:50 +0000 (15:05 +0900)]
bpo-37340: remove free_list for bound method objects (GH-14232)

5 years agobpo-29446: tkinter 'import *' only imports what it should (GH-14864)
Flavian Hautbois [Fri, 26 Jul 2019 01:30:33 +0000 (03:30 +0200)]
bpo-29446: tkinter 'import *' only imports what it should (GH-14864)

Add __all__ to tkinter.__init__ and submodules.  Replace 'import *'
with explicit imports in some submodules.

5 years agobpo-37641 preserve relative file location in embeddable zip (GH-14884)
Bill Collins [Thu, 25 Jul 2019 21:36:58 +0000 (22:36 +0100)]
bpo-37641 preserve relative file location in embeddable zip (GH-14884)

Previously, pyc files in the embeddable distribution reported their
location as <build path>/<file stem>.py. This causes a little confusion
when interpreting stack traces as the file is in a (almost certainly)
incorrect location, and lacks the full relative path to Lib (e.g.
email/mime/image.py will only show image.py).

This change preserves the Lib relative location of the source file as a
path so that stack traces are (hopefully) less misleading and more
informative.

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
5 years agoSwap 'if' branches so content matches to condition in importlib example (GH-14947)
Tzu-ping Chung [Thu, 25 Jul 2019 17:20:33 +0000 (01:20 +0800)]
Swap 'if' branches so content matches to condition in importlib example (GH-14947)

Prior to this change the guard on an 'elif' used an assignment expression whose value was used in a later 'else' block, causing some confusion for people.

(Discussion on Twitter: https://twitter.com/brettsky/status/1153861041068994566.)

Automerge-Triggered-By: @brettcannon
5 years agobpo-37502: handle default parameter for buffers argument of pickle.loads correctly...
Markus Mohrhard [Thu, 25 Jul 2019 16:00:34 +0000 (00:00 +0800)]
bpo-37502: handle default parameter for buffers argument of pickle.loads correctly (GH-14593)

5 years agocloses bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than...
Benjamin Peterson [Wed, 24 Jul 2019 23:38:50 +0000 (16:38 -0700)]
closes bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than listdir. (14942)

5 years agobpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939)
Steve Dower [Wed, 24 Jul 2019 22:13:22 +0000 (15:13 -0700)]
bpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939)

5 years agoRemove duplicate call to strip method in Parser/pgen/token.py (GH-14938)
Hansraj Das [Wed, 24 Jul 2019 20:31:19 +0000 (02:01 +0530)]
Remove duplicate call to strip method in Parser/pgen/token.py (GH-14938)

5 years agobpo-37664: Update bundled pip to 19.2.1 and setuptools to 41.0.1 (GH-14934)
Pradyun Gedam [Wed, 24 Jul 2019 19:08:02 +0000 (00:38 +0530)]
bpo-37664: Update bundled pip to 19.2.1 and setuptools to 41.0.1 (GH-14934)

5 years agobpo-34160: explain how to deal with attribute order in ElementTree (GH-14867)
Stefan Behnel [Wed, 24 Jul 2019 18:22:50 +0000 (20:22 +0200)]
bpo-34160: explain how to deal with attribute order in ElementTree (GH-14867)

* Fix the formatting in the documentation of the tostring() functions.

* bpo-34160: Document that the tostring() and tostringlist() functions also preserve the attribute order now.

* bpo-34160: Add an explanation of how users should deal with the attribute order.

5 years agobpo-37399: Correctly attach tail text to the last element/comment/pi (GH-14856)
Stefan Behnel [Wed, 24 Jul 2019 18:08:02 +0000 (20:08 +0200)]
bpo-37399: Correctly attach tail text to the last element/comment/pi (GH-14856)

* bpo-37399: Correctly attach tail text to the last element/comment/pi, even when comments or pis are discarded.
Also fixes the insertion of PIs when "insert_pis=True" is configured for a TreeBuilder.

5 years agobpo-29548: deprecate PyEval_Call* functions (GH-14804)
Jeroen Demeyer [Wed, 24 Jul 2019 12:02:49 +0000 (14:02 +0200)]
bpo-29548: deprecate PyEval_Call* functions (GH-14804)

5 years agobpo-37667: Add regression test for regrtest. (GH-14929)
Gregory P. Smith [Wed, 24 Jul 2019 05:28:48 +0000 (22:28 -0700)]
bpo-37667: Add regression test for regrtest. (GH-14929)

Verify that it appears to find roughly the right number of tests in the stdlib's testsuite.

5 years agoOnly setup PGO tests when --pgo is enabled. (GH-14927)
Gregory P. Smith [Wed, 24 Jul 2019 04:33:48 +0000 (21:33 -0700)]
Only setup PGO tests when --pgo is enabled. (GH-14927)

5 years agoTouch up venv docs (GH-14922)
Brett Cannon [Tue, 23 Jul 2019 21:34:32 +0000 (14:34 -0700)]
Touch up venv docs (GH-14922)

5 years agobpo-29446: IDLE -- add explicit imports (GH-14919)
Terry Jan Reedy [Tue, 23 Jul 2019 20:14:59 +0000 (16:14 -0400)]
bpo-29446: IDLE -- add explicit imports (GH-14919)

Stop depending on tkinter import *.

5 years agobpo-37653: Fix libinstall target in Makefile (GH-14911)
Erlend Egeberg Aasland [Tue, 23 Jul 2019 16:11:50 +0000 (18:11 +0200)]
bpo-37653: Fix libinstall target in Makefile (GH-14911)

5 years agobpo-17535: IDLE editor line numbers (GH-14030)
Tal Einat [Tue, 23 Jul 2019 12:22:11 +0000 (15:22 +0300)]
bpo-17535: IDLE editor line numbers (GH-14030)

5 years agobpo-33610: validate non-negative integer inputs in IDLE's config (GH-14822)
Tal Einat [Tue, 23 Jul 2019 10:02:11 +0000 (13:02 +0300)]
bpo-33610: validate non-negative integer inputs in IDLE's config (GH-14822)

5 years agobpo-36044: Reduce number of unit tests run for PGO build (GH-14702)
Neil Schemenauer [Mon, 22 Jul 2019 19:54:25 +0000 (12:54 -0700)]
bpo-36044: Reduce number of unit tests run for PGO build (GH-14702)

Reduce the number of unit tests run for the PGO generation task.  This
speeds up the task by a factor of about 15x.  Running the full unit test
suite is slow.  This change may result in a slightly less optimized build
since not as many code branches will be executed.  If you are willing to
wait for the much slower build, the old behavior can be restored using
'./configure [..] PROFILE_TASK="-m test --pgo-extended"'.  We make no
guarantees as to which PGO task set produces a faster build.  Users who
care should run their own relevant benchmarks as results can depend on
the environment, workload, and compiler tool chain.

5 years agoUpdate logging cookbook to show multiple worker processes using the concurrent.future...
Vinay Sajip [Mon, 22 Jul 2019 11:14:50 +0000 (12:14 +0100)]
Update logging cookbook to show multiple worker processes using the concurrent.futures module. (#14905)

5 years agobpo-21478: Record calls to parent when autospecced objects are used as child with...
Xtreak [Mon, 22 Jul 2019 07:38:22 +0000 (13:08 +0530)]
bpo-21478: Record calls to parent when autospecced objects are used as child with attach_mock (GH 14688)

* Clear name and parent of mock in autospecced objects used with attach_mock

* Add NEWS entry

* Fix reversed order of comparison

* Test child and standalone function calls

* Use a helper function extracting mock to avoid code duplication and refactor tests.

5 years agoAdd examples to elucidate the formulas (GH-14898)
Raymond Hettinger [Sun, 21 Jul 2019 23:32:00 +0000 (16:32 -0700)]
Add examples to elucidate the formulas (GH-14898)

5 years agobpo-37627: Add acknowledgment (#14883)
Terry Jan Reedy [Sun, 21 Jul 2019 20:26:24 +0000 (16:26 -0400)]
bpo-37627: Add acknowledgment (#14883)

5 years agoFix typos in docs, comments and test assert messages (#14872)
Min ho Kim [Sun, 21 Jul 2019 20:12:33 +0000 (06:12 +1000)]
Fix typos in docs, comments and test assert messages (#14872)

5 years agoFix typo found by Min ho Kim (#14879)
Terry Jan Reedy [Sun, 21 Jul 2019 19:24:45 +0000 (15:24 -0400)]
Fix typo found by Min ho Kim (#14879)

5 years agoMinor whitespace, indentation, and quoting changes to improve internal consistency...
Raymond Hettinger [Sun, 21 Jul 2019 19:13:07 +0000 (12:13 -0700)]
Minor whitespace, indentation, and quoting changes to improve internal consistency and appease linters (GH-14888)

5 years agoBpo-37644: update suspicious.csv for distutils/examples (GH-14885)
Ned Deily [Sun, 21 Jul 2019 18:01:56 +0000 (20:01 +0200)]
Bpo-37644: update suspicious.csv for distutils/examples (GH-14885)

5 years agobpo-37627: Initialize IDLE Custom Run dialog with previous entries (#14870)
Ngalim Siregar [Sun, 21 Jul 2019 15:37:28 +0000 (22:37 +0700)]
bpo-37627: Initialize IDLE Custom Run dialog with previous entries (#14870)

Repeat the command line arguments most recently entered before so the user can edit them.

5 years agobpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871)
Raymond Hettinger [Sun, 21 Jul 2019 07:34:47 +0000 (00:34 -0700)]
bpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871)

* Make internals private

* Finish making mu and sigma private

* Add missing __hash__() method

* Add blurb

5 years agobpo-37476: Adding tests for asutf8 and asutf8andsize (GH-14531)
Hai Shi [Sat, 20 Jul 2019 07:56:23 +0000 (02:56 -0500)]
bpo-37476: Adding tests for asutf8 and asutf8andsize (GH-14531)

5 years agobpo-36546: Clean-up comments (GH-14857)
Raymond Hettinger [Fri, 19 Jul 2019 08:57:22 +0000 (01:57 -0700)]
bpo-36546:  Clean-up comments (GH-14857)

5 years agobpo-37624: Document weight assumptions for random.choices() (GH-14855)
Raymond Hettinger [Fri, 19 Jul 2019 08:56:42 +0000 (01:56 -0700)]
bpo-37624: Document weight assumptions for random.choices() (GH-14855)

5 years agobpo-37547: Fix a compiler warning in winconsoleio.c (GH-14785)
Zackery Spytz [Fri, 19 Jul 2019 06:07:06 +0000 (00:07 -0600)]
bpo-37547: Fix a compiler warning in winconsoleio.c (GH-14785)

The compiler warning was introduced in
59ad110d7a7784d53d0b502eebce0346597a6bef.

5 years agobpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850)
aldwinaldwin [Fri, 19 Jul 2019 01:23:17 +0000 (09:23 +0800)]
bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850)

Move the Editors and IDE section out of the Unix section, to its own section.

https://bugs.python.org/issue37610

5 years agobpo-33610: IDLE's code-context always shows current context immediately (GH-14821)
Tal Einat [Thu, 18 Jul 2019 20:03:18 +0000 (23:03 +0300)]
bpo-33610: IDLE's code-context always shows current context immediately (GH-14821)

Eliminate delay of up to 100ms and accompanying visual artifact.
Fix bug of never showing context when hide and show.

5 years agobpo-34443: Use __qualname__ instead of __name__ in enum exception messages. (GH-14809)
Walter Dörwald [Thu, 18 Jul 2019 18:37:13 +0000 (20:37 +0200)]
bpo-34443: Use __qualname__ instead of __name__ in enum exception messages. (GH-14809)

* Use __qualname__ instead of __name__ in enum exception messages.

5 years agoAdjust builtins.zip() docstring to better communicate its signature (GH-14833)
Sergey Fedoseev [Thu, 18 Jul 2019 18:19:25 +0000 (23:19 +0500)]
Adjust builtins.zip() docstring to better communicate its signature (GH-14833)

5 years agobpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (...
Paul Monson [Thu, 18 Jul 2019 13:56:59 +0000 (06:56 -0700)]
bpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (#14460)

A bug in MSVC UCRT version 17763.615 (which has been fixed in newer versions) is causing test failures in some strptime/strftime tests when the default code page is c65001. This change selectively skips the tests affected by this.

5 years agobpo-36390: Gather IDLE Format menu functions into format.py (#14827)
Terry Jan Reedy [Thu, 18 Jul 2019 00:48:36 +0000 (20:48 -0400)]
bpo-36390: Gather IDLE Format menu functions into format.py (#14827)

Add two indent spec methods from editor and Rstrip to existing file.
Tests are not added for indent methods because they need change
in lights of 3.x's prohibition on mixing tabs and spaces.

5 years agobpo-34155: Dont parse domains containing @ (GH-13079)
jpic [Wed, 17 Jul 2019 21:54:25 +0000 (23:54 +0200)]
bpo-34155: Dont parse domains containing @ (GH-13079)

Before:

        >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
        (Address(display_name='', username='a', domain='malicious.org'),)

        >>> parseaddr('a@malicious.org@important.com')
        ('', 'a@malicious.org')

    After:

        >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
        (Address(display_name='', username='', domain=''),)

        >>> parseaddr('a@malicious.org@important.com')
        ('', 'a@')

https://bugs.python.org/issue34155

5 years agoFix IndexError when parsing unexpectedly ending quoted-string. (GH-14813)
Abhilash Raj [Wed, 17 Jul 2019 16:48:52 +0000 (09:48 -0700)]
Fix IndexError when parsing unexpectedly ending quoted-string. (GH-14813)

This exception was caused because the input ended unexpectedly with only one
single quote instead of a pair with some value inside it.

5 years agobpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)
Abhilash Raj [Wed, 17 Jul 2019 16:44:27 +0000 (09:44 -0700)]
bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)

* bpo-37461: Fix infinite loop in parsing of specially crafted email headers.

Some crafted email header would cause the get_parameter method to run in an
infinite loop causing a DoS attack surface when parsing those headers. This
patch fixes that by making sure the DQUOTE character is handled to prevent
going into an infinite loop.

5 years agobpo-36390: IDLE: Combine region formatting methods. (GH-12481)
Cheryl Sabella [Wed, 17 Jul 2019 13:44:44 +0000 (09:44 -0400)]
bpo-36390: IDLE: Combine region formatting methods. (GH-12481)

Rename paragraph.py to format.py and add region formatting methods
from editor.py.  Add tests for the latter.

5 years agobpo-37543: optimize pymalloc (#14674)
Inada Naoki [Wed, 17 Jul 2019 12:23:57 +0000 (21:23 +0900)]
bpo-37543: optimize pymalloc (#14674)

PyObject_Malloc() and PyObject_Free() inlines pymalloc_alloc and
pymalloc_free partially.
But when PGO is not used, compiler don't know where is the hot part
in pymalloc_alloc and pymalloc_free.

5 years agobpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)
Tal Einat [Wed, 17 Jul 2019 08:15:53 +0000 (11:15 +0300)]
bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)

* Only create CodeContext instances for "real" editors windows, but
  not e.g. shell or output windows.
* Remove configuration update Tk event fired every second, by having
  the editor window ask its code context widget to update when
  necessary, i.e. upon font or highlighting updates.
* When code context isn't being shown, avoid having a Tk event fired
  every 100ms to check whether the code context needs to be updated.
* Use the editor window's getlineno() method where applicable.
* Update font of the code context widget before the main text widget

5 years agoDocs: Correct formatting of a multiline code block (GH-13806)
Joseph Fox-Rabinovitz [Wed, 17 Jul 2019 08:13:01 +0000 (03:13 -0500)]
Docs: Correct formatting of a multiline code block (GH-13806)

5 years agobpo-27452: IDLE: Cleanup config.py code (GH-14577)
Cheryl Sabella [Tue, 16 Jul 2019 20:58:25 +0000 (16:58 -0400)]
bpo-27452: IDLE: Cleanup config.py code (GH-14577)

5 years agoFix infinite loop in email folding logic (GH-12732)
Paul Ganssle [Tue, 16 Jul 2019 17:50:01 +0000 (19:50 +0200)]
Fix infinite loop in email folding logic (GH-12732)

As far as I can tell, this infinite loop would be triggered if:

1. The value being folded contains a single word (no spaces) longer than
   max_line_length
2. The max_line_length is shorter than the encoding's name + 9
   characters.

bpo-36564: https://bugs.python.org/issue36564

5 years agobpo-37599: Remove a vague statement in documentation of Integer Objects (#14786)
sgal [Tue, 16 Jul 2019 15:15:17 +0000 (08:15 -0700)]
bpo-37599: Remove a vague statement in documentation of Integer Objects (#14786)

* Remove a vague statement in documentation

* Remove another vague sentence

A sentence starting with "So it should be possible..." shouldn't be in the docs either.

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
* Include the removal of the previous line

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
* Remove an extra space

5 years agobpo-37352: Minor word-smithing for design.rst (GH #14730)
Ilya Kamenshchikov [Tue, 16 Jul 2019 15:13:38 +0000 (17:13 +0200)]
bpo-37352: Minor word-smithing for design.rst (GH #14730)

5 years agoReplace backquote with command substitution in subprocess doc example (GH-13941)
David Jones [Tue, 16 Jul 2019 14:55:19 +0000 (15:55 +0100)]
Replace backquote with command substitution in subprocess doc example (GH-13941)

Replace backquotes with POSIXy command substitution in example.

5 years agobpo-37468: make install no longer install wininst-*.exe files (GH-14511)
Victor Stinner [Mon, 15 Jul 2019 15:18:42 +0000 (17:18 +0200)]
bpo-37468: make install no longer install wininst-*.exe files (GH-14511)

make install no longer installs "wininst-*.exe" files used by
distutils bdist_wininst: bdist_wininst only works on Windows.

5 years agobpo-37284: Add note to sys.implementation doc (GH-14328)
Giovanni Cappellotto [Mon, 15 Jul 2019 14:37:09 +0000 (10:37 -0400)]
bpo-37284: Add note to sys.implementation doc (GH-14328)

Add a brief note to indicate that any new required attributes must go through the PEP process.

https://bugs.python.org/issue37284

5 years agobpo-37500: Make sure dead code does not generate bytecode but also detect syntax...
Pablo Galindo [Mon, 15 Jul 2019 09:15:01 +0000 (10:15 +0100)]
bpo-37500: Make sure dead code does not generate bytecode but also detect syntax errors (GH-14612)

https://bugs.python.org/issue37500

Add a new field to the compiler structure that allows to be configured
so no bytecode is emitted. In this way is possible to detect errors by
walking the nodes while preserving optimizations.

https://bugs.python.org/issue37500

5 years agobpo-37593: Swap the positions of posonlyargs and args in the constructor of ast.param...
Pablo Galindo [Sun, 14 Jul 2019 23:32:18 +0000 (01:32 +0200)]
bpo-37593: Swap the positions of posonlyargs and args in the constructor of ast.parameters nodes (GH-14778)

https://bugs.python.org/issue37593

5 years agobpo-37473: Don't import importlib ASAP in tests (GH-14661)
Victor Stinner [Sun, 14 Jul 2019 17:31:12 +0000 (19:31 +0200)]
bpo-37473: Don't import importlib ASAP in tests (GH-14661)

bpo-15386, bpo-37473: test_import, regrtest and libregrtest no longer
import importlib as soon as possible, as the first import, "to test
bpo-15386".

It is tested by test_import.test_there_can_be_only_one().

Sort test_import imports.

5 years agobpo-34749: Improved performance of binascii.a2b_base64(). (GH-9444)
Sergey Fedoseev [Sun, 14 Jul 2019 12:15:32 +0000 (17:15 +0500)]
bpo-34749: Improved performance of binascii.a2b_base64(). (GH-9444)

https://bugs.python.org/issue34749

5 years agoClarify that plistlib's load and dump functions take a binary file object (GH-9825)
Collin Styles [Sun, 14 Jul 2019 09:01:48 +0000 (02:01 -0700)]
Clarify that plistlib's load and dump functions take a binary file object (GH-9825)

The documentation says that the fp parameter to plistlib.load "should be a
readable and binary file object" but the docstring only mentions that it
should be readable. Similarly, plistlib.dump's docstring only mentions
"writable". This commit clarifies that fp should also be binary.

https://docs.python.org/3/library/plistlib.html#plistlib.load
https://docs.python.org/3/library/plistlib.html#plistlib.dump

5 years agobpo-37553: SendfileUsingSendTest tests timeout too short for Windows ARM32 (GH-14716)
Paul Monson [Sun, 14 Jul 2019 08:30:28 +0000 (01:30 -0700)]
bpo-37553: SendfileUsingSendTest tests timeout too short for Windows ARM32 (GH-14716)

5 years agoRemove redundant docs of PyEval_EvalFrameEx (GH-14765)
Hai Shi [Sun, 14 Jul 2019 08:20:57 +0000 (03:20 -0500)]
Remove redundant docs of PyEval_EvalFrameEx (GH-14765)

5 years agobpo-37571: Remove extra space in ctypes docs (GH14764)
Steve Dower [Sun, 14 Jul 2019 08:09:45 +0000 (10:09 +0200)]
bpo-37571: Remove extra space in ctypes docs (GH14764)

5 years agobpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721)
Michele Angrisano [Sun, 14 Jul 2019 07:55:11 +0000 (09:55 +0200)]
bpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721)

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
5 years agobpo-36261: Improve example of the preamble field in email docs (GH-14751)
Carl Bordum Hansen [Sun, 14 Jul 2019 07:46:19 +0000 (09:46 +0200)]
bpo-36261: Improve example of the preamble field in email docs (GH-14751)

5 years agobpo-26967: fix flag grouping with allow_abbrev=False (GH-14316)
Zac Hatfield-Dodds [Sun, 14 Jul 2019 05:35:58 +0000 (00:35 -0500)]
bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316)

The `allow_abbrev` option for ArgumentParser is documented and intended to disable support for unique prefixes of --options, which may sometimes be ambiguous due to deferred parsing.

However, the initial implementation also broke parsing of grouped short flags, such as `-ab` meaning `-a -b` (or `-a=b`).  Checking the argument for a leading `--` before rejecting it fixes this.

This was prompted by pytest-dev/pytest#5469, so a backport to at least 3.8 would be great :smile:
And this is my first PR to CPython, so please let me know if I've missed anything!

https://bugs.python.org/issue26967

5 years agoFix inconsequential typo in math.remainder algorithm comments. (#14746)
Mark Dickinson [Sat, 13 Jul 2019 15:50:03 +0000 (16:50 +0100)]
Fix inconsequential typo in math.remainder algorithm comments. (#14746)

5 years agobpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir...
Sviatoslav Sydorenko [Sat, 13 Jul 2019 14:47:15 +0000 (16:47 +0200)]
bpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir (GH-1163)

Hi,

I've faced an issue w/ `mailbox.Maildir()`. The case is following:
1. I create a folder with `tempfile.TemporaryDirectory()`, so it's empty
2. I pass that folder path as an argument when instantiating `mailbox.Maildir()`
3. Then I receive an exception happening because "there's no such file or directory" (namely `cur`, `tmp` or `new`) during interaction with Maildir

**Expected result:** subdirs are created during `Maildir()` instance creation.

**Actual result:** subdirs are assumed as existing which leads to exceptions during use.

**Workaround:** remove the actual dir before passing the path to `Maildir()`. It will be created automatically with all subdirs needed.

**Fix:** This PR. Basically it adds creation of subdirs regardless of whether the base dir existed before.

https://bugs.python.org/issue30088

5 years agobpo-37358: Use vectorcall for functools.partial (GH-14284)
Jeroen Demeyer [Sat, 13 Jul 2019 14:39:18 +0000 (16:39 +0200)]
bpo-37358: Use vectorcall for functools.partial (GH-14284)

https://bugs.python.org/issue37358

5 years agobpo-37548: Document range of atan, acos and asin (GH-14717)
Giovanni Cappellotto [Sat, 13 Jul 2019 13:59:55 +0000 (09:59 -0400)]
bpo-37548: Document range of atan, acos and asin (GH-14717)

5 years agobpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726)
Xtreak [Sat, 13 Jul 2019 13:22:21 +0000 (18:52 +0530)]
bpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726)

Returns NotImplemented for timedelta and time in __eq__ for different types in Python implementation, which matches the C implementation.

This also adds tests to enforce that these objects will fall back to the right hand side's __eq__ and/or __ne__ implementation.

bpo-37579

5 years agobpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095)
Minmin Gong [Sat, 13 Jul 2019 13:11:43 +0000 (06:11 -0700)]
bpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095)

5 years agobpo-37580: Fix typo in http.cookiejar documentation (GH-14731)
Milan Oberkirch [Sat, 13 Jul 2019 10:17:17 +0000 (12:17 +0200)]
bpo-37580: Fix typo in http.cookiejar documentation (GH-14731)

[bpo-37580](https://bugs.python.org/issue37580): Markup typo in http.cookiejar doc

https://bugs.python.org/issue37580

5 years agoEnable publish of Windows releases through Azure Pipelines (GH-14720)
Steve Dower [Sat, 13 Jul 2019 09:46:16 +0000 (11:46 +0200)]
Enable publish of Windows releases through Azure Pipelines (GH-14720)

5 years agoFix typo in re.escape documentation (GH-14722)
Robert DiPietro [Sat, 13 Jul 2019 08:35:04 +0000 (04:35 -0400)]
Fix typo in re.escape documentation (GH-14722)

5 years agocloses bpo-37347: Fix refcount problem in sqlite3. (GH-14268)
gescheit [Sat, 13 Jul 2019 03:15:49 +0000 (06:15 +0300)]
closes bpo-37347: Fix refcount problem in sqlite3. (GH-14268)

5 years agobpo-37521: No longer treat insertion into sys.modules as optional in importlib exampl...
Brett Cannon [Fri, 12 Jul 2019 22:35:34 +0000 (15:35 -0700)]
bpo-37521: No longer treat insertion into sys.modules as optional in importlib examples (GH-14723)

Fix importlib examples to insert any newly created modules via importlib.util.module_from_spec() immediately into sys.modules instead of after calling loader.exec_module().

Thanks to Benjamin Mintz for finding the bug.

https://bugs.python.org/issue37521

5 years agobpo-19696: Move threaded_import_hangers (GH-14655)
Kyle Stanley [Fri, 12 Jul 2019 21:22:05 +0000 (17:22 -0400)]
bpo-19696: Move threaded_import_hangers (GH-14655)

Move `threaded_import_hangers`, a dependency of `test_threaded_import`, to the directory `test_importlib/`. Also update the import references for `threaded_import_hangers` in `test_threaded_import`.

https://bugs.python.org/issue19696