Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: python/cpython
Choose a Base Repository
python/cpython
1st1/cpython
Acidburn0zzz/cpython
AlvinRenNo1/cpython
Andreasyin/cpython
ApproximateIdentity/cpython
AraHaan/cpython
Atishay990/cpython
CLANNADHH/cpython
CNXTEoEorg/cpython-1
ChyiYaqing/cpython
CuriousLearner/cpython
DalavanCloud/cpython
DarkmaneTheRobot/cpython
Darshan-excellence/cpython
EpicWink/cpython
ErikHendriks/cpython
Frankenstein1836/cpython
FrostyFeng/cpython
HeidiWindkraft/strict_cpython
JacksonKearl/cpython
Jesse-Bakker/cpython
Kamos86/cpython
KanesAccount/cpython
KrzysztofSzewczyk/Zaskroniec
LALINUX2019/cpython
LenochkaNSK18/cpython
Li-Michael/cpython
Longinushadow/cpython
Longturd/cpython
MuhammadZubair210/cpython
Munyola/cpython
Neo23x0/cpython
NoahGWood/cpython
OnePPCDev/cpython
OpenGemini/cpython
PadmajaVB/cpython
PatrickRudgeri/cpython
PraveenChaudhary/cpython
RekGRpth/cpython
Rosuav/cpython
Seluj78/cpython
Silver-Taurus/cpython
SimiCode/cpython
SystemicCypher/cpython
Uberi/cpython
VIP21/cpython
VisualMemory/cpython
VonBluebaugh/cpython
Wind-River/cpython
Xhollo/cpython
XuZhongCN/cpython
ZhangYunfang/cpython
aclements/cpython
agoose77/cpython
ahcub/cpython
airboat/cpython
aixtools/cpython
ajayjoshi879/cpython
amey589/cpython
andrekorol/cpython
animenon/cpython
arantebw/cpython
babara34r/cpython
badrkamel/cpython
berkerpeksag/cpython
bharel/cpython
bmeck/cpython
bmoffatt/cpython
borisuvarov/cpython
bytebuild/cpython
cagney/cpython
cannibal-4852/cpython
cccl/cpython
christopherkang/cpython
codeanynote/cpython
contail/cpython
damngamerz/cpython
delimitry/cpython
delivrance/cpython
deltaIncrement/cpython
devesh-verma/cpython
dhimmel/cpython
dilenondelfino/cpython
dk1978/cpython
dsoprea/cpython
dstanek/cpython
ethanhs/cpython
fishing161/cpython
fonsp/cpython
frankmadao/cpython
freakboy3742/cpython
freddrake/andresdelfino-cpython
fredrikaverpil/cpython
gowtham5699/cpython
greatspider135/cpython
gvanrossum/cpython
hackfengJam/cpython
hkkhuang/cpython
hongweipeng/cpython
imzhong/cpython
jackass0528/cpython
jansure/cpython
jaraco/cpython
jdemeyer/cpython
jishanshaikh4/cpython
jmzanker/cpython
jnwlkr/cpython
jonejiang/cpython
kadler/cpython
khanhqthai/cpython
koreindian/cpython
kovidgoyal/cpython
kripken/cpython
kuhlenough/cpython-for-VxWorks
kushaldas/cpython
kw-andy/cpython
leost99/cpython
longshifeng/cpython
luojun001/cpython
luoshuxiao/cpython
marcosmagno/cpython
markshannon/cpython
miss-islington/cpython
mkiever/cpython
ml451953014/cpython
mohisen/cpython
nanjekyejoannah/cpython
nhuduy/cpython
niubanjin/cpython
oconnor663/cpython
oranav/cpython
pablogsal/cpython
passengeryjy/cpython
pedrorhian944/cpython
podshumok/cpython
pomidoroshev/cpython
pxinwr/cpython
pynickle/cpython
pythoncapi/cpython
ratnania/cpython
rdb/cpython
refoo/cpython
remitamine/cpython
rhettinger/cpython
rkialashaki/cpython
rohitsr24/cpython
samuelcolvin/cpython
scharron/cpython
schedutron/cpython
seanharr11/cpython
sebospc/cpython
serhiy-storchaka/cpython
shabnam99/cpython
shangzhipei/cpython
sheldonzeng/cpython
shlomif/cpython
sisuad/cpython
snjypl/cpython
stackless-dev/stackless
stealthcopter/cpython
sthagen/cpython
subhashissuara/cpython
sudonitesh/cpython
supitchayapat/cpython
swizl/cnpython
taborda11/cpython
thomascherickal/cpython
tiangolo/cpython
tim-one/cpython
tonybaloney/cpython
tonydapiza/cpython
tovrstra/cpython
trenchmortar/cpython
tripmani/cpython
trishnaguha/cpython
tvikneshwar/cpython
tzickel/cpython
ukbaranwal/cpython
ukysung/cpython
unscientific/cpython
val314159/cpython
veltata/cpython
vlad-tokarev/cpython
vmsp/cpython
vsajip/cpython
vstinner/cpython
worldhema/cpython
wylllorenz/cpython
xmanrui/cpython
ycq091044/cpython
yewsGitHub/cpython
yuc8939/cpython
yutiansut/cpython
yyang42/cpython
zhang-hong-yang/cpython
zhangch9/cpython
zhangyangyu/cpython
zooba/cpython
zsxmatthew/cpython
Nothing to show
base: master
head repository: python/cpython
Choose a Head Repository
python/cpython
1st1/cpython
Acidburn0zzz/cpython
AlvinRenNo1/cpython
Andreasyin/cpython
ApproximateIdentity/cpython
AraHaan/cpython
Atishay990/cpython
CLANNADHH/cpython
CNXTEoEorg/cpython-1
ChyiYaqing/cpython
CuriousLearner/cpython
DalavanCloud/cpython
DarkmaneTheRobot/cpython
Darshan-excellence/cpython
EpicWink/cpython
ErikHendriks/cpython
Frankenstein1836/cpython
FrostyFeng/cpython
HeidiWindkraft/strict_cpython
JacksonKearl/cpython
Jesse-Bakker/cpython
Kamos86/cpython
KanesAccount/cpython
KrzysztofSzewczyk/Zaskroniec
LALINUX2019/cpython
LenochkaNSK18/cpython
Li-Michael/cpython
Longinushadow/cpython
Longturd/cpython
MuhammadZubair210/cpython
Munyola/cpython
Neo23x0/cpython
NoahGWood/cpython
OnePPCDev/cpython
OpenGemini/cpython
PadmajaVB/cpython
PatrickRudgeri/cpython
PraveenChaudhary/cpython
RekGRpth/cpython
Rosuav/cpython
Seluj78/cpython
Silver-Taurus/cpython
SimiCode/cpython
SystemicCypher/cpython
Uberi/cpython
VIP21/cpython
VisualMemory/cpython
VonBluebaugh/cpython
Wind-River/cpython
Xhollo/cpython
XuZhongCN/cpython
ZhangYunfang/cpython
aclements/cpython
agoose77/cpython
ahcub/cpython
airboat/cpython
aixtools/cpython
ajayjoshi879/cpython
amey589/cpython
andrekorol/cpython
animenon/cpython
arantebw/cpython
babara34r/cpython
badrkamel/cpython
berkerpeksag/cpython
bharel/cpython
bmeck/cpython
bmoffatt/cpython
borisuvarov/cpython
bytebuild/cpython
cagney/cpython
cannibal-4852/cpython
cccl/cpython
christopherkang/cpython
codeanynote/cpython
contail/cpython
damngamerz/cpython
delimitry/cpython
delivrance/cpython
deltaIncrement/cpython
devesh-verma/cpython
dhimmel/cpython
dilenondelfino/cpython
dk1978/cpython
dsoprea/cpython
dstanek/cpython
ethanhs/cpython
fishing161/cpython
fonsp/cpython
frankmadao/cpython
freakboy3742/cpython
freddrake/andresdelfino-cpython
fredrikaverpil/cpython
gowtham5699/cpython
greatspider135/cpython
gvanrossum/cpython
hackfengJam/cpython
hkkhuang/cpython
hongweipeng/cpython
imzhong/cpython
jackass0528/cpython
jansure/cpython
jaraco/cpython
jdemeyer/cpython
jishanshaikh4/cpython
jmzanker/cpython
jnwlkr/cpython
jonejiang/cpython
kadler/cpython
khanhqthai/cpython
koreindian/cpython
kovidgoyal/cpython
kripken/cpython
kuhlenough/cpython-for-VxWorks
kushaldas/cpython
kw-andy/cpython
leost99/cpython
longshifeng/cpython
luojun001/cpython
luoshuxiao/cpython
marcosmagno/cpython
markshannon/cpython
miss-islington/cpython
mkiever/cpython
ml451953014/cpython
mohisen/cpython
nanjekyejoannah/cpython
nhuduy/cpython
niubanjin/cpython
oconnor663/cpython
oranav/cpython
pablogsal/cpython
passengeryjy/cpython
pedrorhian944/cpython
podshumok/cpython
pomidoroshev/cpython
pxinwr/cpython
pynickle/cpython
pythoncapi/cpython
ratnania/cpython
rdb/cpython
refoo/cpython
remitamine/cpython
rhettinger/cpython
rkialashaki/cpython
rohitsr24/cpython
samuelcolvin/cpython
scharron/cpython
schedutron/cpython
seanharr11/cpython
sebospc/cpython
serhiy-storchaka/cpython
shabnam99/cpython
shangzhipei/cpython
sheldonzeng/cpython
shlomif/cpython
sisuad/cpython
snjypl/cpython
stackless-dev/stackless
stealthcopter/cpython
sthagen/cpython
subhashissuara/cpython
sudonitesh/cpython
supitchayapat/cpython
swizl/cnpython
taborda11/cpython
thomascherickal/cpython
tiangolo/cpython
tim-one/cpython
tonybaloney/cpython
tonydapiza/cpython
tovrstra/cpython
trenchmortar/cpython
tripmani/cpython
trishnaguha/cpython
tvikneshwar/cpython
tzickel/cpython
ukbaranwal/cpython
ukysung/cpython
unscientific/cpython
val314159/cpython
veltata/cpython
vlad-tokarev/cpython
vmsp/cpython
vsajip/cpython
vstinner/cpython
worldhema/cpython
wylllorenz/cpython
xmanrui/cpython
ycq091044/cpython
yewsGitHub/cpython
yuc8939/cpython
yutiansut/cpython
yyang42/cpython
zhang-hong-yang/cpython
zhangch9/cpython
zhangyangyu/cpython
zooba/cpython
zsxmatthew/cpython
Nothing to show
compare: 3.7
Checking mergeability… Don’t worry, you can still create the pull request.
This comparison is big! We’re only showing the most recent 250 commits
Commits on Sep 25, 2019
The private keys for test_ssl were encrypted with 3DES in traditional
PKCSGH-5 format. 3DES and the digest algorithm of PKCSGH-5 are blocked by
some strict crypto policies. Use PKCSGH-8 format with AES256 encryption
instead.

Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue38271

Automerge-Triggered-By: @tiran
(cherry picked from commit bfd0c96)

Co-authored-by: Christian Heimes <christian@python.org>
…ng. (GH-16381) (GH-16400)

(cherry picked from commit c64af8f)
Commits on Sep 26, 2019
…6407)

Fixes CVE-2019-15903. See full changelog at https://github.com/libexpat/libexpat/blob/R_2_2_8/expat/Changes..
(cherry picked from commit 52b9408)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
…GH-16271) (GH-16413)

(cherry picked from commit 5d326ab)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
…-16016) (GH-16416)

Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>
(cherry picked from commit 1ad7be2)

Co-authored-by: Mohammad Dehghan <md.unicorn@gmail.com>
…H-16426)

(cherry picked from commit 64b4a3a)
test_ssl now handles disabled TLS/SSL versions better. OpenSSL's crypto
policy and run-time settings are recognized and tests for disabled versions
are skipped.

Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue38275
(cherry picked from commit df6ac7e)
Commits on Sep 27, 2019
Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.
(cherry picked from commit e8650a4)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Commits on Sep 28, 2019
…H-16446) (#16450)

(cherry picked from commit 52d1b86)

Co-authored-by: Jesús Cea <jcea@jcea.es>
…alidation and encoding behavior (GH-16448) (GH-16461)

* bpo-38216: Allow bypassing input validation

* bpo-36274: Also allow the URL encoding to be overridden.

* bpo-38216, bpo-36274: Add tests demonstrating a hook for overriding validation, test demonstrating override encoding, and a test to capture expectation of the interface for the URL.

* Call with skip_host to avoid tripping on the host checking in the URL.

* Remove obsolete comment.

* Make _prepare_path_encoding its own attr.

This makes overriding just that simpler.

Also, don't use the := operator to make backporting easier.

* Add a news entry.

* _prepare_path_encoding -> _encode_prepared_path()

* Once again separate the path validation and request encoding, drastically simplifying the behavior. Drop the guarantee that all processing happens in _prepare_path..
(cherry picked from commit 7774d78)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Commits on Sep 29, 2019
…ix pipe (GH-16472)

(cherry picked from commit 58498bc)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Commits on Oct 01, 2019
(cherry picked from commit e407013)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* Windows: Fix counter name in WindowsLoadTracker. Counter names are
  localized: use the registry to get the counter name. Original
  change written by Lorenz Mende.
* Regrtest.main() now ensures that the Windows load tracker is also
  killed if an exception is raised
* TestWorkerProcess now ensures that worker processes are no longer
  running before exiting: kill also worker processes when an
  exception is raised.
* Enhance regrtest messages and warnings: include test name,
  duration, add a worker identifier, etc.
* Rename MultiprocessRunner to TestWorkerProcess
* Use print_warning() to display warnings.

Co-Authored-By: Lorenz Mende <Lorenz.mende@gmail.com>
(cherry picked from commit 982bfa4)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
(cherry picked from commit 891e9e3)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Commits on Oct 02, 2019
test.pythoninfo now logs environment variables used by OpenSSL and
Python ssl modules, and logs attributes of 3 SSL contexts
(SSLContext, default HTTPS context, stdlib context).
(cherry picked from commit b3e7045)

Co-authored-by: Victor Stinner <vstinner@python.org>
Commits on Oct 03, 2019
…H-16550) (GH-16560)

* bpo-36670, regrtest: Fix WindowsLoadTracker() for partial line (GH-16550)

WindowsLoadTracker.read_output() now uses a short buffer for
incomplete line.

(cherry picked from commit 3e04cd2)

* bpo-36670: Enhance regrtest WindowsLoadTracker (GH-16553)

The last line is now passed to the parser even if it does not end
with a newline, but only if it's a valid value.

(cherry picked from commit c65119d)

* bpo-36670: Enhance regrtest (GH-16556)

* Add log() method: add timestamp and load average prefixes
  to main messages.
* WindowsLoadTracker:

  * LOAD_FACTOR_1 is now computed using SAMPLING_INTERVAL
  * Initialize the load to the arithmetic mean of the first 5 values
    of the Processor Queue Length value (so over 5 seconds), rather
    than 0.0.
  * Handle BrokenPipeError and when typeperf exit.

* format_duration(1.5) now returns '1.5 sec', rather than
  '1 sec 500 ms'

(cherry picked from commit 098e256)
(cherry picked from commit de3195c)

Co-authored-by: Victor Stinner <vstinner@python.org>
)

(cherry picked from commit b23a842)

Co-authored-by: idomic <michael.ido@gmail.com>
Commits on Oct 04, 2019
…16571) (GH-16577)

(cherry picked from commit 3142c66)

Co-authored-by: Ashley Whetter <AWhetter@users.noreply.github.com>
…cl. (GH-16545)

On Windows use UTF-16 (or UTF-32 for 32-bit Tcl_UniChar) with the
"surrogatepass" error handler for converting to/from Tcl Unicode objects.

On Linux use UTF-8 with the "surrogateescape" error handler for converting
to/from Tcl String objects.

Converting strings from Tcl to Python and back now never fails
(except MemoryError).
(cherry picked from commit 06cb94b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Commits on Oct 06, 2019
… bytearray. (GH-16603)

(cherry picked from commit 24ddd9c)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
Commits on Oct 07, 2019
…16588)

The `required` argument to `argparse.add_subparsers` was added in GH-3027. This PR specifies the earliest version of Python where it is available.

https://bugs.python.org/issue26510

Automerge-Triggered-By: @merwok
(cherry picked from commit 9e71917)

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
(cherry picked from commit 038503e)

Co-authored-by: Krishna Oza <krishoza15sep@gmail.com>
(cherry picked from commit e310af9)

Co-authored-by: James Abel <j@abel.co>
Commits on Oct 08, 2019
(cherry picked from commit 5dfbb4d)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
…o stderr. (GH-16583)

It now escapes them with a backslash, as the regular Python interpreter.
Added the "errors" field to the standard streams.
(cherry picked from commit b690a27)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Valgrind emits "Conditional jump or move depends on uninitialised
value(s)" false alarms on GCC builtin strcmp() function. The GCC code
is correct.

Valgrind bug: https://bugs.kde.org/show_bug.cgi?id=264936
(cherry picked from commit 03ab6b4)

Co-authored-by: Victor Stinner <vstinner@python.org>
…umentation. (GH-16442) (GH-16647)

Prior to 3.7, re.escape escaped many characters that don't have
special meaning in Python, but that use to require escaping in other
tools and languages. This commit aims to make it clear which characters
were, but are no longer escaped.
(cherry picked from commit 15ae75d)
Commits on Oct 09, 2019
(cherry picked from commit 01171eb)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
…/unions. (GH-16589) (GH-16672)

(cherry picked from commit e8bedbd)
Bump the removal to 3.9, indicate collections.abc available since 3.3,
replace version-changed directive to deprecated-removed.

https://bugs.python.org/issue36953
(cherry picked from commit eea47e0)

Co-authored-by: Matthias Bussonnier <mbussonnier@ucmerced.edu>
…le. (GH-16641). (GH-16674)

(cherry picked from commit 13abda4)
…6644). (GH-16673)

(cherry picked from commit 8252c52)
bpo-37531, bpo-38207: On timeout, regrtest no longer attempts to call
`popen.communicate() again: it can hang until all child processes
using stdout and stderr pipes completes. Kill the worker process and
ignores its output.

Reenable test_regrtest.test_multiprocessing_timeout().

bpo-37531: Change also the faulthandler timeout of the main process
from 1 minute to 5 minutes, for Python slowest buildbots.
(cherry picked from commit 0ec618a)

Co-authored-by: Victor Stinner <vstinner@python.org>
…H-16658) (GH-16685)

* [bpo-38379](https://bugs.python.org/issue38379):  when a finalizer resurrects an object,
nothing is actually collected in this run of gc.
Change the stats to relect that truth..
(cherry picked from commit ecbf35f)

Co-authored-by: Tim Peters <tim.peters@gmail.com>





https://bugs.python.org/issue38379



Automerge-Triggered-By: @pablogsal
…16686)

(cherry picked from commit 09895c2)
Commits on Oct 10, 2019
(cherry picked from commit a05fcd3)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
PR GH-4906 changed the typing.Generic class hierarchy, leaving an
outdated comment in the library reference. User-defined Generic ABCs now
must get a abc.ABCMeta metaclass from something other than typing.Generic
inheritance.
(cherry picked from commit d47f0dd)

Co-authored-by: M. Eric Irrgang <mei2n@virginia.edu>
Add missing stat.S_IFDOOR, stat.S_IFPORT, stat.S_IFWHT,
stat.S_ISDOOR, stat.S_ISPORT, and stat.S_ISWHT values to
the Python implementation of the stat module.
(cherry picked from commit 7bb1431)

Co-authored-by: Ronan Lamy <ronan.lamy@gmail.com>
Commits on Oct 11, 2019
(cherry picked from commit a8e0d31)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
…H-16536) (GH-16719)

pathfix.py: Assume all files that end on '.py' are Python scripts when working recursively.

(cherry picked from commit 2b7dc40)
We no longer use AppVeyor in 3.x, and others were still pointed at master.
…H-16663)

The implementation of weakref.proxy's methods call back into the Python
API using a borrowed references of the weakly referenced object
(acquired via PyWeakref_GET_OBJECT). This API call may delete the last
reference to the object (either directly or via GC), leaving a dangling
pointer, which can be subsequently dereferenced.

To fix this, claim a temporary ownership of the referenced object when
calling the appropriate method. Some functions because at the moment they
do not need to access the borrowed referent, but to protect against
future changes to these functions, ownership need to be fixed in
all potentially affected methods..
(cherry picked from commit 10cd00a)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>





https://bugs.python.org/issue38395
Commits on Oct 12, 2019
)

Add SMTPNotSupportedError in the exports of smtplib

Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit 3faf826)

Co-authored-by: nde <denayer.norman@gmail.com>
KeyError should cause a failure in parsing the encoded word and should be caught and raised as a _InvalidEWError instead.
(cherry picked from commit 65dcc8a)

Co-authored-by: Andrei Troie <andreitroie90@gmail.com>
Commits on Oct 13, 2019
…ocs (GH-16743)

Metaclass was removed in Python 3.7 (there is already a `versionchanged` item about this).

https://bugs.python.org/issue28556
(cherry picked from commit 8144095)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
Commits on Oct 14, 2019
)

(cherry picked from commit b23a842)

Co-authored-by: idomic <michael.ido@gmail.com>
…16571) (GH-16577)

(cherry picked from commit 3142c66)

Co-authored-by: Ashley Whetter <AWhetter@users.noreply.github.com>
…16588)

The `required` argument to `argparse.add_subparsers` was added in GH-3027. This PR specifies the earliest version of Python where it is available.

https://bugs.python.org/issue26510

Automerge-Triggered-By: @merwok
(cherry picked from commit 9e71917)

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
(cherry picked from commit 038503e)

Co-authored-by: Krishna Oza <krishoza15sep@gmail.com>
(cherry picked from commit e310af9)

Co-authored-by: James Abel <j@abel.co>
(cherry picked from commit 5dfbb4d)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
…umentation. (GH-16442) (GH-16647)

Prior to 3.7, re.escape escaped many characters that don't have
special meaning in Python, but that use to require escaping in other
tools and languages. This commit aims to make it clear which characters
were, but are no longer escaped.
(cherry picked from commit 15ae75d)
(cherry picked from commit 01171eb)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
Bump the removal to 3.9, indicate collections.abc available since 3.3,
replace version-changed directive to deprecated-removed.

https://bugs.python.org/issue36953
(cherry picked from commit eea47e0)

Co-authored-by: Matthias Bussonnier <mbussonnier@ucmerced.edu>
PR GH-4906 changed the typing.Generic class hierarchy, leaving an
outdated comment in the library reference. User-defined Generic ABCs now
must get a abc.ABCMeta metaclass from something other than typing.Generic
inheritance.
(cherry picked from commit d47f0dd)

Co-authored-by: M. Eric Irrgang <mei2n@virginia.edu>
(cherry picked from commit a8e0d31)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
We no longer use AppVeyor in 3.x, and others were still pointed at master.
…ocs (GH-16743)

Metaclass was removed in Python 3.7 (there is already a `versionchanged` item about this).

https://bugs.python.org/issue28556
(cherry picked from commit 8144095)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2 authors and ned-deily
(cherry picked from commit 4504b45)

Co-authored-by: Julien Palard <julien@palard.fr>
Commits on Oct 15, 2019
(cherry picked from commit 2798b60)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
(cherry picked from commit 3f36043)

Co-authored-by: Ned Deily <nad@python.org>
Commits on Oct 16, 2019
…16818)

main() is now responsible to send the ANSWER, rather than
ServerProto. main() now waits until it got the HELLO before sending
the ANSWER over the new transport.

Previously, there was a race condition between main() replacing the
protocol and the protocol sending the ANSWER once it gets the HELLO.

TLSv1.3 was disabled for the test: reenable it.

(cherry picked from commit fab4ef2)
Commits on Oct 18, 2019
* bpo-27657: Fix urlparse() with numeric paths

Revert parsing decision from bpo-754016 in favor of the documented
consensus in bpo-16932 of how to treat strings without a // to
designate the netloc.

* bpo-22891: Remove urlsplit() optimization for 'http' prefixed inputs.
(cherry picked from commit 5a88d50)

Co-authored-by: Tim Graham <timograham@gmail.com>
Commits on Oct 19, 2019
The Nose package is no longer maintained.
(cherry picked from commit 88eeda6)

Co-authored-by: Jon Dufresne <jon.dufresne@gmail.com>
Commits on Oct 21, 2019
…H-16869)

(cherry picked from commit 5bc6a7c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…H-16860)

(cherry picked from commit 10ecbad)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Commits on Oct 22, 2019
(cherry picked from commit dfe726b)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Fix stdatomic.h header check for ICC compiler: the ICC implementation
lacks atomic_uintptr_t type which is needed by Python.

Test:

* atomic_int and atomic_uintptr_t types
* atomic_load_explicit() and atomic_store_explicit()
* memory_order_relaxed and memory_order_seq_cst constants

But don't test ATOMIC_VAR_INIT(): it's not used in Python.
(cherry picked from commit 028f734)

Co-authored-by: Victor Stinner <vstinner@python.org>
Commits on Oct 23, 2019
(cherry picked from commit d34ac30)

Co-authored-by: Peter Bittner <django@bittner.it>
(cherry picked from commit 01659ca)

Co-authored-by: Ned Deily <nad@python.org>
Commits on Oct 24, 2019
These are valid even in python 2.7

https://bugs.python.org/issue33348

Automerge-Triggered-By: @gpshead
(cherry picked from commit 96b06ae)

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
Commits on Oct 25, 2019
numbers's -> number's
(cherry picked from commit 7320ec0)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
Commits on Oct 26, 2019
…nts in decorators. (GH-16861). (GH-16930)

(cherry picked from commit 26ae9f6)
(cherry picked from commit d898d20)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Commits on Oct 27, 2019
(cherry picked from commit e3f90b2)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit e31a79a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
…H-16937)

Test by Daniel Hillier.
(cherry picked from commit 5c32af7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
)

(cherry picked from commit 85c6f8c)

Co-authored-by: Marco Rougeth <marco@rougeth.com>
Commits on Oct 28, 2019
…C drive (GH-16968)

(cherry picked from commit 0ac6137)

Co-authored-by: Steve Dower <steve.dower@python.org>
Commits on Oct 29, 2019
…data. (GH-14656)

(cherry picked from commit da6ce58)

Co-authored-by: Daniel Hillier <daniel.hillier@gmail.com>
Update open() documentation.
(cherry picked from commit 1d2862a)

Co-authored-by: Victor Stinner <vstinner@python.org>
Commits on Oct 30, 2019
…n. (GH-16950) (GH-17000)

Replace all *NULL* with ``NULL``.
(cherry picked from commit 25fc088)
Also fix some other formatting.
(cherry picked from commit e835b31)
Commits on Oct 31, 2019
Change the url from docs.python-requests.org to requests.readthedocs.io
(cherry picked from commit 112f2b8)

Co-authored-by: Simon Legner <Simon.Legner@gmail.com>
(cherry picked from commit 65c7382)

Co-authored-by: MaT1g3R <peijun.ma@protonmail.com>
…H-16799) (GH-17017)

(cherry picked from commit 79d4ed1)
Commits on Nov 02, 2019
Whenever I use `path.suffix` I have to check again whether it includes the dot or not. I decided to add it to the docstring so I won't have to keep checking.

https://bugs.python.org/issue38422

Automerge-Triggered-By: @pitrou
(cherry picked from commit 8d4fef4)

Co-authored-by: Ram Rachum <ram@rachum.com>
Commits on Nov 05, 2019
s/pathing/patching/
(cherry picked from commit 25fa3ec)

Co-authored-by: Michael Haas <micha2718l@gmail.com>
GH-17027)

This was never intented to be called manually from PyInit_*.

Also, clarify PyState_RemoveModule return value.
(cherry picked from commit 9bc94ec)


Co-authored-by: Petr Viktorin <encukou@gmail.com>


https://bugs.python.org/issue38159



Automerge-Triggered-By: @encukou
Fixed what seemed to be a weird phrasing.

(cherry picked from commit 5e01a65)

Co-authored-by: Jules Lasne (jlasne) <jules.lasne@gmail.com>.
(cherry picked from commit 1eac437)

Co-authored-by: Jules Lasne (jlasne) <jules.lasne@gmail.com>
Commits on Nov 06, 2019
(cherry picked from commit 56698d5)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
The master and 3.8 versions of the previous change work as expected
because we perform the lookup for the `from_param` after the union
check. However, in 3.7, this lookup happens before the union
validation and so we must decrease the reference for `cnv` before
returning.
Commits on Nov 09, 2019
(cherry picked from commit befa032)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Commits on Nov 12, 2019
(cherry picked from commit 98480ce)

Co-authored-by: Jonathan Scholbach <j.scholbach@posteo.de>
(cherry picked from commit 8341a4d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
…H-17103)

(cherry picked from commit c8b53dc)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Updates documentation around email.utils.parsedate_tz().

Currently, the documentation specifies that when a string without a is timezone passed to parsedate_tz(), the last tuple is returned as ```None```.

This is no longer true since Python 3.3


https://bugs.python.org/issue38421
(cherry picked from commit a12255d)


Co-authored-by: David K <dave@paddez.com>


https://bugs.python.org/issue38421



Automerge-Triggered-By: @encukou
* "Return true/false" is replaced with "Return ``True``/``False``"
  if the function actually returns a bool.
* Fixed formatting of some True and False literals (now in monospace).
* Replaced "True/False" with "true/false" if it can be not only bool.
* Replaced some 1/0 with True/False if it corresponds the code.
* "Returns <bool>" is replaced with "Return <bool>".
(cherry picked from commit 138ccbb)
…mode files. (GH-17137)

This change, which follows the behavior of C stdio's fdopen and Python 2's file object, allows pipes to be opened in append mode..
(cherry picked from commit 74fa9f7)
Commits on Nov 13, 2019
(cherry picked from commit 2d56af7)

Co-authored-by: Shu <23287722+susan-shu-c@users.noreply.github.com>
This immediately toggles shell, editor, and output windows, but does not affect other input widgets.
(cherry picked from commit 9c28449)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
if parent `__init__` is not called from a constructor of object derived from `asyncio.Future`

https://bugs.python.org/issue38785
(cherry picked from commit dad6be5)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Commits on Nov 15, 2019
…H-17162)

(cherry picked from commit e8acc86)

Co-authored-by: Andrey Doroschenko <dorosch.github.io@yandex.ru>
(cherry picked from commit 0fe0b88)

Co-authored-by: Jules Lasne (jlasne) <jules.lasne@gmail.com>
Commits on Nov 16, 2019
changed 'This is bad class design, but save some typing'
into 'This is bad class design, but saves some typing'.
(cherry picked from commit d0acdfc)

Co-authored-by: Jason (Perry) Taylor <jtaylor@seek.com.au>
https://bugs.python.org/issue38823
(cherry picked from commit c3f6bdc)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Commits on Nov 17, 2019
https://bugs.python.org/issue38823
(cherry picked from commit 143a97f)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit 4544e78)

Co-authored-by: alclarks <57201106+alclarks@users.noreply.github.com>
Commits on Nov 18, 2019
(cherry picked from commit 04c79d6)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
…-17222)

(cherry picked from commit 5383956)
https://bugs.python.org/issue38823
(cherry picked from commit 289cf0f)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
…7065)

`~` is now treated as an unreserved character (i.e. it doesn't get quoted), not a reserved one.
(cherry picked from commit f49f6ba)

Co-authored-by: Роман Донченко <dpb@corrigendum.ru>
…-17164)

https://bugs.python.org/issue38809
(cherry picked from commit ee703cb)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
Commits on Nov 19, 2019
Ignore `GeneratorExit` exceptions when throwing an exception into the `aclose` coroutine of an asynchronous generator.

https://bugs.python.org/issue35409
(cherry picked from commit 8e0de2a)

Co-authored-by: Vincent Michel <vxgmichel@gmail.com>
…H-17250)

(cherry picked from commit ac22354)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Commits on Nov 20, 2019
These Format menu functions (default shortcuts Alt-T and Alt-U)
were mistakenly disabled in 3.7.5 and 3.8.0.
(cherry picked from commit b846247)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 33b671e)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit d51a363)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit be5c79e)

Co-authored-by: Federico Bond <federicobond@gmail.com>
Commits on Nov 21, 2019
Fixed an incorrect sentence in Doc/c-api/mapping.rst I fell on
while translating the file.

skip issue

Automerge-Triggered-By: @csabella
(cherry picked from commit 06ca2a2)

Co-authored-by: Aveheuzed <a.masson555@ntymail.com>
https://bugs.python.org/issue36277

Automerge-Triggered-By: @csabella
(cherry picked from commit 9391f6c)

Co-authored-by: Dave Nguyen <dv@dvnguyen.com>
GH-17126)

https://bugs.python.org/issue37838
(cherry picked from commit 0aca3a3)

Co-authored-by: benedwards14 <53377856+benedwards14@users.noreply.github.com>
Commits on Nov 22, 2019
Increment properly Py_True/Py_False reference counter for
_testcapi.WITH_PYMALLOC variable.
(cherry picked from commit 84c36c1)

Co-authored-by: Victor Stinner <vstinner@python.org>
…-17253)

(cherry picked from commit 9960230)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
The regex http.cookiejar.LOOSE_HTTP_DATE_RE was vulnerable to regular
expression denial of service (REDoS).

LOOSE_HTTP_DATE_RE.match is called when using http.cookiejar.CookieJar
to parse Set-Cookie headers returned by a server.
Processing a response from a malicious HTTP server can lead to extreme
CPU usage and execution will be blocked for a long time.

The regex contained multiple overlapping \s* capture groups.
Ignoring the ?-optional capture groups the regex could be simplified to

    \d+-\w+-\d+(\s*\s*\s*)$

Therefore, a long sequence of spaces can trigger bad performance.

Matching a malicious string such as

    LOOSE_HTTP_DATE_RE.match("1-c-1" + (" " * 2000) + "!")

caused catastrophic backtracking.

The fix removes ambiguity about which \s* should match a particular
space.

You can create a malicious server which responds with Set-Cookie headers
to attack all python programs which access it e.g.

    from http.server import BaseHTTPRequestHandler, HTTPServer

    def make_set_cookie_value(n_spaces):
        spaces = " " * n_spaces
        expiry = f"1-c-1{spaces}!"
        return f"b;Expires={expiry}"

    class Handler(BaseHTTPRequestHandler):
        def do_GET(self):
            self.log_request(204)
            self.send_response_only(204)  GH- Don't bother sending Server and Date
            n_spaces = (
                int(self.path[1:])  GH- Can GET e.g. /100 to test shorter sequences
                if len(self.path) > 1 else
                65506  GH- Max header line length 65536
            )
            value = make_set_cookie_value(n_spaces)
            for i in range(99):  GH- Not necessary, but we can have up to 100 header lines
                self.send_header("Set-Cookie", value)
            self.end_headers()

    if __name__ == "__main__":
        HTTPServer(("", 44020), Handler).serve_forever()

This server returns 99 Set-Cookie headers. Each has 65506 spaces.
Extracting the cookies will pretty much never complete.

Vulnerable client using the example at the bottom of
https://docs.python.org/3/library/http.cookiejar.html :

    import http.cookiejar, urllib.request
    cj = http.cookiejar.CookieJar()
    opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
    r = opener.open("http://localhost:44020/")

The popular requests library was also vulnerable without any additional
options (as it uses http.cookiejar by default):

    import requests
    requests.get("http://localhost:44020/")

* Regression test for http.cookiejar REDoS

If we regress, this test will take a very long time.

* Improve performance of http.cookiejar.ISO_DATE_RE

A string like

"444444" + (" " * 2000) + "A"

could cause poor performance due to the 2 overlapping \s* groups,
although this is not as serious as the REDoS in LOOSE_HTTP_DATE_RE was.
(cherry picked from commit 1b779bf)

Co-authored-by: bcaller <bcaller@users.noreply.github.com>
The Y2K reference is not needed as it only points out that Python's use
of C standard functions doesn't generally suffer from Y2K issues; the
point regarding conventions for conversion of 2-digit years in
:func:`strptime` is still valid.
(cherry picked from commit 42bc60e)

Co-authored-by: Callum Ward <wards.callum@gmail.com>
* fix HTTP Digest handling in request.py

There is a bug triggered when server replies to a request with `WWW-Authenticate: Digest` where `qop="auth,auth-int"` rather than mere `qop="auth"`. Having both `auth` and `auth-int` is legitimate according to the `qop-options` rule in §3.2.1 of [[https://www.ietf.org/rfc/rfc2617.txt|RFC 2617]]:
>      qop-options       = "qop" "=" <"> 1GH-qop-value <">
>      qop-value         = "auth" | "auth-int" | token
> **qop-options**: [...] If present, it is a quoted string **of one or more** tokens indicating the "quality of protection" values supported by the server.  The value `"auth"` indicates authentication; the value `"auth-int"` indicates authentication with integrity protection

This is description confirmed by the definition of the [//n//]`GH-`[//m//]//rule// extended-BNF pattern defined in §2.1 of [[https://www.ietf.org/rfc/rfc2616.txt|RFC 2616]] as 'a comma-separated list of //rule// with at least //n// and at most //m// items'.

When this reply is parsed by `get_authorization`, request.py only tests for identity with `'auth'`, failing to recognize it as one of the supported modes the server announced, and claims that `"qop 'auth,auth-int' is not supported"`.

* 📜🤖 Added by blurb_it.

* bpo-38686 review fix: remember why.

* fix trailing space in Lib/urllib/request.py

Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit 14a89c4)

Co-authored-by: PypeBros <PypeBros@users.noreply.github.com>
Commits on Nov 26, 2019
(cherry picked from commit 386d00c)

Co-authored-by: David Coles <coles.david@gmail.com>
(cherry picked from commit f8a6316)

Co-authored-by: Sanchit Khurana <54467174+GeniusLearner@users.noreply.github.com>
Commits on Nov 27, 2019
…H-17366) (#17379)

Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.
(cherry picked from commit 6bf644e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
…et_name__ (GH-17364)

(cherry picked from commit 1bddf89)

Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
Commits on Nov 28, 2019
SpooledTemporaryFile.rollback() might cause data corruption
when it is in text mode.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>.
(cherry picked from commit ea9835c)
(cherry picked from commit 02519f7)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
Commits on Dec 01, 2019
(cherry picked from commit fdafa1d)

Co-authored-by: idomic <michael.ido@gmail.com>
* bpo-38449: Add tricky test cases

* bpo-38449: Reflect codereview
(cherry picked from commit 2fe4c48)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Commits on Dec 02, 2019
Make ssl tests less strict and also accept TLSv3 as the default maximum
version. This change unbreaks test_min_max_version on Fedora 32.

https://bugs.python.org/issue38815
(cherry picked from commit 34864d1)

Co-authored-by: torsava <torsava@redhat.com>
…put format (GH-17418)

(cherry picked from commit a62ad47)

Co-authored-by: Matthew Rollings <1211162+stealthcopter@users.noreply.github.com>
Commits on Dec 03, 2019
Update docstring for `multiprocessing.Pool.map` to mention `pool.starmap()`.

Prev PR: #17367  @aeros

https://bugs.python.org/issue27873
(cherry picked from commit eb48a45)

Co-authored-by: An Long <aisk@users.noreply.github.com>
Commits on Dec 04, 2019
(cherry picked from commit 808769f)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Use the "volatile" keyword to prevent tail call optimization
on any compiler, rather than relying on compiler specific pragma.
(cherry picked from commit 8b78796)

Co-authored-by: Victor Stinner <vstinner@python.org>
Commits on Dec 06, 2019
GH-13135)

Break cycle generated when saving an exception in socket.py, codeop.py and dyld.py as they keep alive not only the exception but user objects through the ``__traceback__`` attribute.

https://bugs.python.org/issue36820

Automerge-Triggered-By: @pablogsal
(cherry picked from commit b64334c)

Co-authored-by: Mario Corchero <mcorcherojim@bloomberg.net>
Commits on Dec 07, 2019
… pure Python version (GH-17484) (GH-17494)

(cherry picked from commit 969ae7a)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
…unctions (GH-16457)

https://bugs.python.org/issue37404
(cherry picked from commit 892f9e0)

Co-authored-by: idomic <michael.ido@gmail.com>
test_openssl_version now accepts version 3.0.0.

getpeercert() no longer returns IPv6 addresses with a trailing new line.

Signed-off-by: Christian Heimes <christian@python.org>


https://bugs.python.org/issue38820
(cherry picked from commit 2b7de66)


Co-authored-by: Christian Heimes <christian@python.org>


https://bugs.python.org/issue38820



Automerge-Triggered-By: @tiran
Commits on Dec 08, 2019
now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None.

https://bugs.python.org/issue38979

Automerge-Triggered-By: @asvetlov
(cherry picked from commit 28c9163)

Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
Commits on Dec 09, 2019
This means a clearer message is now shown when patch.object is called with two string arguments, rather than a class and a string argument.
(cherry picked from commit cd90a52)

Co-authored-by: Elena Oat <oat.elena@gmail.com>
Fix test_pty: if the process is the session leader, closing the
master file descriptor raises a SIGHUP signal: simply ignore SIGHUP
when running the tests.
(cherry picked from commit a1838ec)

Co-authored-by: Victor Stinner <vstinner@python.org>
…espace (GH-17421) (GH-17522)

https://bugs.python.org/issue38673
(cherry picked from commit 109fc27)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
array.array: Document that tostring() and fromstring() deprecated
aliases will be removed in Python 3.9.
(cherry picked from commit 0381ea7)

Co-authored-by: Victor Stinner <vstinner@python.org>
Fix asyncio when the ssl module is missing: only check for
ssl.SSLSocket instance if the ssl module is available.
(cherry picked from commit 82b4950)

Co-authored-by: Victor Stinner <vstinner@python.org>
…H-9518) (#17532)

(cherry picked from commit d219cc4)

Co-authored-by: Yury Selivanov <yury@magic.io>
(cherry picked from commit 232689b)

Co-authored-by: JohnnyNajera <58344607+JohnnyNajera@users.noreply.github.com>
Commits on Dec 10, 2019
This has happened on some versions of Ubuntu.
(cherry picked from commit bbc4162)

Co-authored-by: JohnnyNajera <58344607+JohnnyNajera@users.noreply.github.com>
Commits on Dec 11, 2019
GH-17311) (GH-17570)

(cherry picked from commit ab513a3)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Commits on Dec 13, 2019
…t info for if_stmt (GH-17582) (#17584)

When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.

https://bugs.python.org/issue39031

Automerge-Triggered-By: @pablogsal.
(cherry picked from commit 025a602)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
(cherry picked from commit 8289e27)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
Commits on Dec 14, 2019
Co-Authored-By: Victor Stinner <vstinner@python.org>
(cherry picked from commit 95826c7)
…H-17596) (GH-17601)

(cherry picked from commit 5936a4c)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Commits on Dec 17, 2019
…nt()'s *reuse_address* parameter (GH-17595). (GH-17631)

(cherry picked from commit f501db2)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Co-authored-by: tirkarthi
(cherry picked from commit 1988344)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
…acOS Catalina (GH-17636)

(cherry picked from commit bf3aa10)

Co-authored-by: Ned Deily <nad@python.org>
Commits on Dec 18, 2019
Co-Authored-By: Victor Stinner <vstinner@python.org>
(cherry picked from commit 95826c7)
…nt()'s *reuse_address* parameter (GH-17595). (GH-17631)

(cherry picked from commit f501db2)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Co-authored-by: tirkarthi
(cherry picked from commit 1988344)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
…acOS Catalina (GH-17636)

(cherry picked from commit bf3aa10)

Co-authored-by: Ned Deily <nad@python.org>
…H-17652) (GH-17655)

Fix test_ressources_gced_in_workers() of test_concurrent_futures:
explicitly stop the manager to prevent leaking a child process
running in the background after the test completes.

(cherry picked from commit 673c393)
(cherry picked from commit b0eb046)

Co-authored-by: Victor Stinner <vstinner@python.org>
Commits on Dec 19, 2019
(cherry picked from commit d587272)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>





https://bugs.python.org/issue38316



Automerge-Triggered-By: @vstinner
Commits on Dec 20, 2019
… docs table (GH-17408)

Adds` __module__ ` entries for function & method types in inspect docs table.

https://bugs.python.org/issue38918
(cherry picked from commit f522a6d)

Co-authored-by: Parth Sharma <parthsharma2@users.noreply.github.com>
Commits on Dec 25, 2019
The added parentheses around the PyIter_Next assignment suppress the following warning which gcc throws without:
```
warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
```
The other change is a typo fix
(cherry picked from commit 5c7ed75)

Co-authored-by: William Ayd <william.ayd@icloud.com>
Commits on Dec 27, 2019
…bute. (GH-17702)

(cherry picked from commit c0052f3)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
Commits on Dec 28, 2019
…e Python stdlib files (GH-17721)

(cherry picked from commit ef7eaaf)

Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Commits on Dec 29, 2019
focusses -> focuses; follwing -> following; Excape -> Escape.

(cherry picked from commit 6c7bb38)
(cherry picked from commit 32a12ae)

Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>
Commits on Dec 30, 2019
…) (GH-17759)

Hold strong references to list elements while calling PyObject_RichCompareBool()..
(cherry picked from commit d9e561d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Tag memoryview, range, and tuple as classes, the same as list, etcetera, in
the library manual built-in functions list.
(cherry picked from commit ee9ff05)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Commits on Dec 31, 2019
GH-17765)

* [3.7] bpo-38588: Fix possible crashes in dict and list when calling PyObject_RichCompareBool (GH-17734)

Take strong references before calling PyObject_RichCompareBool to protect against the case
where the object dies during the call..
(cherry picked from commit 2d5bf56)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

* methane's suggestion

methane's suggestion

Co-Authored-By: Inada Naoki <songofacandy@gmail.com>

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
(cherry picked from commit ba82ee8)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Commits on Jan 01, 2020
Remove extra space to fix formatting and avoid from splitting text in to strings.

https://bugs.python.org/issue39183
(cherry picked from commit 149175c)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Commits on Jan 03, 2020
(cherry picked from commit 946b29e)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
(cherry picked from commit 32f1443)

Co-authored-by: Ned Deily <nad@python.org>
Commits on Jan 04, 2020
(cherry picked from commit 3a5de51)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Commits on Jan 05, 2020
Ignore leading dots and no longer ignore a trailing newline.
(cherry picked from commit 6a265f0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…rue. (GH-17616)

(cherry picked from commit b19c0d7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…H-17618)

No longer import the re module if it is not needed.
(cherry picked from commit 41ec17e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
tkinter.ttk.Scale().configure([name]) now returns a configuration tuple for name
or a list thereof for all options. Based on patch Giovanni Lombardo.
(cherry picked from commit 5ea7bb2)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Signed-off-by: Oleg Höfling <oleg.hoefling@gmail.com>
(cherry picked from commit e6ae90d)

Co-authored-by: Oleg Höfling <hoefling@users.noreply.github.com>
(cherry picked from commit abc0c4f)

Co-authored-by: HongWeipeng <961365124@qq.com>
Commits on Jan 06, 2020
(cherry picked from commit d6c08db)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
(cherry picked from commit a76ba36)

Co-authored-by: Steve Dower <steve.dower@python.org>
https://bugs.python.org/issue39041

Automerge-Triggered-By: @zooba
(cherry picked from commit b1ce22d)

Co-authored-by: Steve Dower <steve.dower@python.org>
Commits on Jan 07, 2020
(cherry picked from commit f4800b8)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
(cherry picked from commit ca94677)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
…nabledFor (GH-17689) (GH-17898)

(cherry picked from commit 950c679)
GH-17780)

Correctly parenthesize filter-based statements that contain lambda
expressions in lib2to3.
(cherry picked from commit b821173)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Commits on Jan 08, 2020
(cherry picked from commit 2e6a8ef)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Commits on Jan 10, 2020
* Add test cases for dataclasses.

* Add test for repr output of field.
* Add test for ValueError to be raised when both default and default_factory are passed.
(cherry picked from commit eef1b02)


Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>

Automerge-Triggered-By: @ericvsmith
Commits on Jan 12, 2020
Copying property objects results in a TypeError. Steps to reproduce:

```
>>> import copy
>>> obj = property()
>>> copy.copy(obj)
````

This affects both shallow and deep copying.
My idea for a fix is to add property objects to the list of "atomic" objects in the copy module.
These already include types like functions and type objects.

I also added property objects to the unit tests test_copy_atomic and test_deepcopy_atomic. This is my first PR, and it's highly likely I've made some mistake, so please be kind :)

https://bugs.python.org/issue38293
(cherry picked from commit 9f3fc6c)

Co-authored-by: Guðni Natan Gunnarsson <1493259+GudniNatan@users.noreply.github.com>
…n the AST docs (GH-17172)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 6680f4a)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
…e. (GH-17960) (GH-17970)

Although the underlying libffi issue remains open, adding these
checks have caused problems in third-party projects which are in
widespread use. See the issue for examples.

The corresponding tests have also been skipped.
(cherry picked from commit c12440c)
Commits on Jan 13, 2020
Specify that sys.float_info.min is only the minimum normalized float.
(cherry picked from commit 9362f85)

Co-authored-by: Victor Stinner <vstinner@python.org>
Commits on Jan 14, 2020
(cherry picked from commit b4cdb3f)

Co-authored-by: Kyle Pollina <kylepollina@protonmail.com>
Commits on Jan 15, 2020
…H-17932) (GH-18016)

Since 3.7 `successful` raises a `ValueError` as explained in the next text block from the documentation:

_Changed in version 3.7: If the result is not ready, ValueError is raised instead of AssertionError._

No issue associated with this PR.
Should be backported in 3.7 and 3.8.
(cherry picked from commit dc0284e)


Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>

Automerge-Triggered-By: @pitrou
Commits on Jan 16, 2020
The previous double colon was wrongly place directly after Therefore.
Which produced a block without syntax highlighting. This fixes it
by separating the double colon from the text. As a result, sphinx now
properly highlights the python code.

https://bugs.python.org/issue39348
(cherry picked from commit fad8b56)

Co-authored-by: Oz N Tiram <oz.tiram@noris.de>
Commits on Jan 17, 2020
(cherry picked from commit ef8844f)

Co-authored-by: Grant Jenks <grant.jenks@gmail.com>

Co-authored-by: Grant Jenks <grant.jenks@gmail.com>
Commits on Jan 19, 2020
(cherry picked from commit 558f078)

Co-authored-by: Michael Haas <micha2718l@gmail.com>
Update Misc/valgrind-python.supp to suppress the false alarm.
(cherry picked from commit d8ef644)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
…eed (GH-16630)

Some objects like Py_None are not initialized with conventional means
that prepare the circular linked list pointers, leaving them unlinked
from the rest of the objects. For those objects, NULL pointers does
not mean that they are freed, so we need to skip the check in those
cases.
(cherry picked from commit 36e33c3)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Commits on Jan 20, 2020
Mention that the function implicitly creates new event loop only if called from the main thread.
(cherry picked from commit 2c49bec)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit a96e06d)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
…H-18054)

(cherry picked from commit 8d57a41)

Co-authored-by: Peter Bittner <django@bittner.it>
Commits on Jan 21, 2020
(cherry picked from commit 8698b34)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
Fix comments and add tests for editor newline_and_indent_event method.
Remove unused None default for function parameter of pyparse find_good_parse_start method
and code triggered by that default.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit ec64640)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
(cherry picked from commit 47be7d0)

Co-authored-by: Keith Erskine <toastie604@gmail.com>

Co-authored-by: Keith Erskine <toastie604@gmail.com>
Commits on Jan 22, 2020
Update os.unsetenv() documentation: it is not available on Windows.
(cherry picked from commit f84f65b)

Co-authored-by: Victor Stinner <vstinner@python.org>
https://bugs.python.org/issue39425

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 14d80d0)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Commits on Jan 23, 2020
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 2e43b64)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
IDLE does not pass a non-default _synchre in any of its calls to
pyparse.find_good_parse_start.
(cherry picked from commit f9e07e1)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
GH-18118)

* bpo-39421: Fix posible crash in heapq with custom comparison operators

* fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators

* fixup! fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators
(cherry picked from commit 79f89e6)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 7142df5)

Co-authored-by: Shanavas M <shanavas.m2@gmail.com>
…GH-18117) (GH-18151)

When communicate() is called in a loop, it crashes when the child process
has already closed any piped standard stream, but still continues to be running

Co-authored-by: Andriy Maletsky <andriy.maletsky@gmail.com>.
(cherry picked from commit d3ae95e)

Co-authored-by: Alex Rebert <alex@forallsecure.com>





https://bugs.python.org/issue35182



Automerge-Triggered-By: @gpshead
Showing 1,692 changed files with 135,364 additions and 73,357 deletions.
@@ -0,0 +1,162 @@
variables:
manylinux: false
coverage: false

resources:
containers:
- container: manylinux1
image: pyca/cryptography-manylinux1:x86_64

jobs:
- job: Prebuild
displayName: Pre-build checks

pool:
vmImage: ubuntu-16.04

steps:
- template: ./prebuild-checks.yml


- job: Docs_PR
displayName: Docs PR
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))

pool:
vmImage: ubuntu-16.04

steps:
- template: ./docs-steps.yml
parameters:
upload: true


- job: macOS_CI_Tests
displayName: macOS CI Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

variables:
testRunTitle: '$(build.sourceBranchName)-macos'
testRunPlatform: macos

pool:
vmImage: macos-10.14

steps:
- template: ./macos-steps.yml


- job: Ubuntu_CI_Tests
displayName: Ubuntu CI Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: ubuntu-16.04

variables:
testRunTitle: '$(build.sourceBranchName)-linux'
testRunPlatform: linux
openssl_version: 1.1.1d

steps:
- template: ./posix-steps.yml
parameters:
dependencies: apt


- job: ManyLinux1_CI_Tests
displayName: ManyLinux1 CI Tests
dependsOn: Prebuild
condition: |
and(
and(
succeeded(),
eq(variables['manylinux'], 'true')
),
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
)
pool:
vmImage: ubuntu-16.04

container: manylinux1

variables:
testRunTitle: '$(build.sourceBranchName)-manylinux1'
testRunPlatform: manylinux1
openssl_version: ''

steps:
- template: ./posix-steps.yml
parameters:
dependencies: yum
sudo_dependencies: ''
xvfb: false
patchcheck: false


- job: Ubuntu_Coverage_CI_Tests
displayName: Ubuntu CI Tests (coverage)
dependsOn: Prebuild
condition: |
and(
and(
succeeded(),
eq(variables['coverage'], 'true')
),
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
)
pool:
vmImage: ubuntu-16.04

variables:
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
testRunPlatform: linux-coverage
openssl_version: 1.1.1d

steps:
- template: ./posix-steps.yml
parameters:
dependencies: apt
coverage: true


- job: Windows_CI_Tests
displayName: Windows CI Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: vs2017-win2016

strategy:
matrix:
win32:
arch: win32
buildOpt:
testRunTitle: '$(Build.SourceBranchName)-win32'
testRunPlatform: win32
win64:
arch: amd64
buildOpt: '-p x64'
testRunTitle: '$(Build.SourceBranchName)-win64'
testRunPlatform: win64
maxParallel: 2

steps:
- template: ./windows-steps.yml

- template: ./windows-layout-steps.yml
parameters:
kind: nuget
- template: ./windows-layout-steps.yml
parameters:
kind: embed
- template: ./windows-layout-steps.yml
parameters:
kind: appx
fulltest: true
@@ -0,0 +1,46 @@
parameters:
latex: false
upload: false

steps:
- checkout: self
clean: true
fetchDepth: 5

- task: UsePythonVersion@0
displayName: 'Use Python 3.6 or later'
inputs:
versionSpec: '>=3.6'

- script: python -m pip install sphinx==1.8.2 blurb python-docs-theme
displayName: 'Install build dependencies'

- ${{ if ne(parameters.latex, 'true') }}:
- script: make check suspicious html PYTHON=python
workingDirectory: '$(build.sourcesDirectory)/Doc'
displayName: 'Build documentation'

- ${{ if eq(parameters.latex, 'true') }}:
- script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full
displayName: 'Install LaTeX'

- script: make dist PYTHON=python SPHINXBUILD='python -m sphinx' BLURB='python -m blurb'
workingDirectory: '$(build.sourcesDirectory)/Doc'
displayName: 'Build documentation'

- ${{ if eq(parameters.upload, 'true') }}:
- task: PublishBuildArtifacts@1
displayName: 'Publish docs'

inputs:
PathToPublish: '$(build.sourcesDirectory)/Doc/build'
ArtifactName: docs
publishLocation: Container

- ${{ if eq(parameters.latex, 'true') }}:
- task: PublishBuildArtifacts@1
displayName: 'Publish dist'
inputs:
PathToPublish: '$(build.sourcesDirectory)/Doc/dist'
ArtifactName: docs_dist
publishLocation: Container
@@ -0,0 +1,27 @@
steps:
- checkout: self
clean: true
fetchDepth: 5

- script: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-azdev
displayName: 'Configure CPython (debug)'

- script: make -s -j4
displayName: 'Build CPython'

- script: make pythoninfo
displayName: 'Display build info'

- script: make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
displayName: 'Tests'
continueOnError: true
timeoutInMinutes: 30

- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
mergeTestResults: true
testRunTitle: $(testRunTitle)
platform: $(testRunPlatform)
condition: succeededOrFailed()
@@ -0,0 +1,26 @@
apt-get update

apt-get -yq install \
build-essential \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libncurses5-dev \
libreadline6-dev \
libsqlite3-dev \
libssl-dev \
libgdbm-dev \
tk-dev \
lzma \
lzma-dev \
liblzma-dev \
libffi-dev \
uuid-dev \
xvfb

if [ ! -z "$1" ]
then
echo ##vso[task.prependpath]$PWD/multissl/openssl/$1
echo ##vso[task.setvariable variable=OPENSSL_DIR]$PWD/multissl/openssl/$1
python3 Tools/ssl/multissltests.py --steps=library --base-directory $PWD/multissl --openssl $1 --system Linux
fi
@@ -0,0 +1,81 @@
parameters:
coverage: false
sudo_dependencies: sudo
dependencies: apt
patchcheck: true
xvfb: true

steps:
- checkout: self
clean: true
fetchDepth: 5

# Work around a known issue affecting Ubuntu VMs on Pipelines
- script: sudo setfacl -Rb /home/vsts
displayName: 'Workaround ACL issue'

- script: ${{ parameters.sudo_dependencies }} ./.azure-pipelines/posix-deps-${{ parameters.dependencies }}.sh $(openssl_version)
displayName: 'Install dependencies'

- script: ./configure --with-pydebug
displayName: 'Configure CPython (debug)'

- script: make -s -j4
displayName: 'Build CPython'

- ${{ if eq(parameters.coverage, 'true') }}:
- script: ./python -m venv venv && ./venv/bin/python -m pip install -U coverage
displayName: 'Set up virtual environment'

- script: ./venv/bin/python -m test.pythoninfo
displayName: 'Display build info'

- script: |
$COMMAND -m coverage run --pylib -m test \
--fail-env-changed \
-uall,-cpu \
--junit-xml=$(build.binariesDirectory)/test-results.xml" \
-x test_multiprocessing_fork \
-x test_multiprocessing_forkserver \
-x test_multiprocessing_spawn \
-x test_concurrent_futures
displayName: 'Tests with coverage'
env:
${{ if eq(parameters.xvfb, 'true') }}:
COMMAND: xvfb-run ./venv/bin/python
${{ if ne(parameters.xvfb, 'true') }}:
COMMAND: ./venv/bin/python
- script: ./venv/bin/python -m coverage xml
displayName: 'Generate coverage.xml'

- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash)
displayName: 'Publish code coverage results'


- ${{ if ne(parameters.coverage, 'true') }}:
- script: make pythoninfo
displayName: 'Display build info'

- script: $COMMAND buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
displayName: 'Tests'
env:
${{ if eq(parameters.xvfb, 'true') }}:
COMMAND: xvfb-run make
${{ if ne(parameters.xvfb, 'true') }}:
COMMAND: make

- ${{ if eq(parameters.patchcheck, 'true') }}:
- script: ./python Tools/scripts/patchcheck.py --travis true
displayName: 'Run patchcheck.py'
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))


- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
mergeTestResults: true
testRunTitle: $(testRunTitle)
platform: $(testRunPlatform)
condition: succeededOrFailed()

No commit comments for this range

You can’t perform that action at this time.