Commit Graph

101950 Commits

Author SHA1 Message Date
Miss Islington (bot) e3f20828f6 bpo-34171: Fix test_trace. (GH-8940) (GH-8951)
Remove "trace.cover" left from previous test runs before testing
that it is no longer created.
(cherry picked from commit b44a1d4f71)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-08-28 11:41:43 +03:00
Miss Islington (bot) 2cf33161f7
bpo-33635: Handling Bad file descriptor in Path.is_file and related. (GH-8542)
(cherry picked from commit 216b745eaf)

Co-authored-by: Przemysław Spodymek <przemyslaw@spodymek.com>
2018-08-27 18:37:18 -04:00
Miss Islington (bot) fa3fd4cb18
bpo-34434: Update doc for bool(), float() and int() arguments (GH-8834)
(cherry picked from commit 3fe89dac42)

Co-authored-by: Louis Sautier <sautier.louis@gmail.com>
2018-08-27 06:58:56 -04:00
Miss Islington (bot) 55b8c4bff8
Remove AIX workaround test_subprocess (GH-8939)
An old apparent AIX behavior workaround in test_subprocess's
test_undecodable_env is no longer needed.
(cherry picked from commit 89d79b1449)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
2018-08-26 20:32:48 -04:00
Miss Islington (bot) 2caf86ff6d
bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934)
(cherry picked from commit a2eefa6754)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-26 13:13:47 -04:00
Miss Islington (bot) d6725fcdd5
closes bpo-34504: Remove the useless NULL check in PySequence_Check(). (GH-8935)
Reported by Svace static analyzer.
(cherry picked from commit b57b4ac042)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-25 20:03:48 -04:00
Miss Islington (bot) 15dadacabf
closes bpo-34501: PyType_FromSpecWithBases: Check spec->name before dereferencing it. (GH-8930)
Reported by Svace static analyzer.
(cherry picked from commit 5f79b50763)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-25 15:11:29 -04:00
Miss Islington (bot) 42a1ca65d0
closes bpo-34502: Remove a note about utf8_mode from sys.exit() docs. (GH-8928)
(cherry picked from commit 44838be9f7)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-25 14:36:18 -04:00
Alexey Izbyshev 388bd4bd76 [3.7] bpo-34492: Modules/main.c: Fix copy_wstrlist() (GH-8910) (GH-8922)
* Add missing NULL check reported by Svace static analyzer.
* Fix clear_wstrlist() call on a wrong list.

(cherry picked from commit eb746dbae8)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-25 18:46:58 +02:00
Miss Islington (bot) 6dc8f05437
Fix markup in stdtypes documentation (GH-8905)
(cherry picked from commit 2e5d2ea208)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-08-25 10:22:00 -04:00
Miss Islington (bot) 80e9fedcf5
bpo-34171: Prevent creating Lib/trace.cover when run the trace module. (GH-8841)
(cherry picked from commit c406d5cd74)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-08-25 03:47:22 -04:00
Miss Islington (bot) 46af206ea4
closes bpo-34493: Objects/genobject.c: Add missing NULL check to compute_cr_origin() (GH-8911)
(cherry picked from commit 8fdd331bbf)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-25 03:36:34 -04:00
Miss Islington (bot) d5f017bbd6
bpo-13312: Avoid int underflow in time year. (GH-8912)
Avoids an integer underflow in the time module's year handling code.
(cherry picked from commit 76be0fffff)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-08-25 01:53:00 -04:00
Miss Islington (bot) 1f9621cb9b
Fixed typo with asynccontextmanager code example (GH-8845)
`yield conn`, instead of just `yield`.
(cherry picked from commit 416cbce22d)

Co-authored-by: Alexander Vasin <hi@alvass.in>
2018-08-24 22:51:10 -04:00
Miss Islington (bot) 7b0ed43af5 bpo-33550: Warn not to set SIGPIPE to SIG_DFL (GH-6773)
(cherry picked from commit a2510732da)

Co-authored-by: Alfred Perlstein <alfred@freebsd.org>
2018-08-24 19:28:58 -07:00
Miss Islington (bot) 0dc75f0457
bpo-34426: fix typo (__lltrace__ -> __ltrace__) (GH-8822)
(cherry picked from commit 09efe49c07)

Co-authored-by: Danish Prakash <grafitykoncept@gmail.com>
2018-08-24 22:14:11 -04:00
Miss Islington (bot) 4973f76789
bpo-34448: Improve output of usable wchar_t check (GH-8846)
(cherry picked from commit 3738fadc67)

Co-authored-by: Michael Osipov <1983-01-06@gmx.net>
2018-08-24 12:36:30 -04:00
Miss Islington (bot) c7f5435201
closes bpo-34471: _datetime: Add missing NULL check to tzinfo_from_isoformat_results. (GH-8869)
Reported by Svace static analyzer.
(cherry picked from commit 498845368f)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-24 12:13:57 -04:00
Miss Islington (bot) 3e6020c4dd
bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks (GH-8864)
(cherry picked from commit 91cb298f81)

Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
2018-08-24 10:44:47 -04:00
Miss Islington (bot) a8c749df59 Fix typo in the dataclasses's doc (GH-8896) (GH-8897)
(cherry picked from commit 075b3c3259)

Co-authored-by: Daniel Dương <dduong42@users.noreply.github.com>
2018-08-24 05:37:19 -04:00
Miss Islington (bot) d9e1abf8d3
closes bpo-34468: Objects/rangeobject.c: Fix an always-false condition in range_repr() (GH-8880)
Also, propagate the error from PyNumber_AsSsize_t() because we don't care
only about OverflowError which is not reported if the second argument is NULL.

Reported by Svace static analyzer.
(cherry picked from commit 7ecae3ca0b)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-24 01:34:06 -04:00
Miss Islington (bot) a59036365b
closes bpo-34474: Python/bltinmodule.c: Add missing NULL check in builtin_sum_impl() (GH-8872)
Reported by Svace static analyzer.
(cherry picked from commit 2b824b2538)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-24 00:59:16 -04:00
Miss Islington (bot) 609062a23f
closes bpo-34477: Objects/typeobject.c: Add missing NULL check to type_init() (GH-8876)
Reported by Svace static analyzer.
(cherry picked from commit f6247aac08)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-24 00:38:16 -04:00
Miss Islington (bot) 1d3d688b98
Fix doc for `add_subparsers` arguments (GH-8884)
There was a missing comma.
(cherry picked from commit cc18258daf)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2018-08-23 23:22:17 -04:00
Miss Islington (bot) 609c033f43
Fix typo in asyncio.BoundedSemaphore docs (GH-8882)
semapthores -> semaphores
(cherry picked from commit b8a181f4ae)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2018-08-23 22:03:23 -04:00
Miss Islington (bot) 89b1654e0b
bpo-34454: fix .fromisoformat() methods crashing on inputs with surrogate code points (GH-8862)
The current C implementations **crash** if the input includes a surrogate
Unicode code point, which is not possible to encode in UTF-8.

Important notes:

1.  It is possible to pass a non-UTF-8 string as a separator to the
    `.isoformat()` methods.
2.  The pure-Python `datetime.fromisoformat()` implementation accepts
    strings with a surrogate as the separator.

In `datetime.fromisoformat()`, in the special case of non-UTF-8 separators,
this implementation will take a performance hit by making a copy of the
input string and replacing the separator with 'T'.

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Co-authored-by: Paul Ganssle <paul@ganssle.io>
(cherry picked from commit 096329f0b2)

Co-authored-by: Paul Ganssle <pganssle@users.noreply.github.com>
2018-08-23 11:54:33 -04:00
Miss Islington (bot) 1f7d0470c2
Make it more clear that setUpClass runs before each class, not "class run" (GH-8844)
(cherry picked from commit c33bb5d401)

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
2018-08-23 11:02:46 -04:00
Victor Stinner 80a0ebaa83
bpo-34207: Fix pymain_read_conf() for UTF-8 Mode (GH-8868) (GH-8870)
bpo-34170, bpo-34207: pymain_read_conf() now sets Py_UTF8Mode to
config->utf8_mode. pymain_read_conf() calls indirectly
Py_DecodeLocale() and Py_EncodeLocale() which depend on Py_UTF8Mode.

(cherry picked from commit 89487f51b8)
2018-08-23 12:41:35 +02:00
Miss Islington (bot) 042082692b
bpo-34436: Fix check that disables overallocation for the last fmt specifier (GH-8826)
Reported by Svace static analyzer.
(cherry picked from commit ccd9975267)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-23 04:03:02 -04:00
Miss Islington (bot) b8e7319d39
bpo-34457: Python/ast.c: Add missing NULL check to alias_for_import_name(). (GH-8852)
Reported by Svace static analyzer.
(cherry picked from commit 28853a249b)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-22 01:54:46 -04:00
Miss Islington (bot) 3152bc36fd
bpo-34456: pickle: Add missing NULL check to save_global(). (GH-8851)
Reported by Svace static analyzer.
(cherry picked from commit f8c06b0280)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-22 01:54:33 -04:00
Miss Islington (bot) 985dcd49ca
bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833)
(cherry picked from commit 3e26e42c90)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-08-20 23:23:15 -04:00
Miss Islington (bot) d1f0ccc7e6
bpo-34441: Fix ABC.__subclasscheck__ crash on classes with invalid __subclasses__ (GH-8835)
The missing NULL check was reported by Svace static analyzer.
(cherry picked from commit cdbf50cba1)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-20 16:42:18 -04:00
Miss Islington (bot) 2011dd77b6
bpo-30411: Use --git-dir instead of -C to make git work under version below 1.8.5. (GH-8744)
(cherry picked from commit 4c8555773a)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
2018-08-20 10:48:31 -04:00
Miss Islington (bot) 1e596d3a20
bpo-34435: Add missing NULL check to unicode_encode_ucs1(). (GH-8823)
Reported by Svace static analyzer.
(cherry picked from commit 74a307d48e)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
2018-08-19 16:17:53 -04:00
Miss Islington (bot) 0e1e8dbb0b
bpo-22057: Clarify eval() documentation (GH-8812)
If a globals dictionary without a '__builtins__' key is passed to
eval(), a '__builtins__' key will be inserted to the dictionary:

    >>> eval("print('__builtins__' in globals())", {})
    True

(As a result of this behavior, we can use the builtins
print() and globals() even if we passed a dictionary without a
'__builtins__' key to eval().)
(cherry picked from commit 225b055480)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-08-19 06:29:50 -04:00
Miss Islington (bot) 2e4ae8f1b3 bpo-34415: Updated logging.Formatter docstring. (GH-8811) (GH-8817)
(cherry picked from commit d3d3171da8)
2018-08-19 08:20:13 +01:00
Miss Islington (bot) 0fd6f832a9 bpo-34432: doc Mention complex and decimal.Decimal on str.format note about locales (GH-8808) (GH-8809)
(cherry picked from commit 93b5655c04)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-08-18 14:16:36 -04:00
Miss Islington (bot) eeece3cd33
bpo-34381: refer to 'Running & Writing Tests' in README.rst (GH-8797)
(cherry picked from commit cae8ff93a6)

Co-authored-by: Michael Osipov <1983-01-06@gmx.net>
2018-08-17 17:57:41 -04:00
Miss Islington (bot) 05d89ef785
bpo-34418: Fix HTTPErrorProcessor documentation (GH-8793)
The http_response() and https_response() methods of the HTTPErrorProcessor
class have two required parameters, 'request' and 'response'.
(cherry picked from commit c53aaec793)

Co-authored-by: Sebastian Rittau <srittau@rittau.org>
2018-08-17 06:02:08 -04:00
Miss Islington (bot) 870247a57e [3.7] bpo-34391: Fix ftplib test for TLS 1.3 (GH-8787) (GH-8789)
Read from data socket to avoid "[SSL] shutdown while in init" exception
during shutdown of the dummy server.

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

<!-- issue-number: [bpo-34391](https://www.bugs.python.org/issue34391) -->
https://bugs.python.org/issue34391
<!-- /issue-number -->
(cherry picked from commit 1590c39336)


Co-authored-by: Christian Heimes <christian@python.org>
2018-08-16 21:37:20 +02:00
Miss Islington (bot) bf8e9d18dd
bpo-34217: Use lowercase for windows headers (GH-8472)
(cherry picked from commit e6a4755e67)

Co-authored-by: Erik Janssens <erik.janssens@conceptive.be>
2018-08-16 03:29:20 -04:00
Miss Islington (bot) 962051eeb0
bpo-34395: Fix memory leaks caused by incautious usage of PyMem_Resize(). (GH-8756)
(cherry picked from commit 67b9cc8e60)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2018-08-16 00:53:00 -04:00
Miss Islington (bot) 64336dc0a5
bpo-34405: Updated to OpenSSL 1.1.0i for Windows builds. (GH-8775)
(cherry picked from commit 864a892af3)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-08-15 16:55:10 -04:00
Miss Islington (bot) 2275b773eb
closes bpo-34400: Fix undefined behavior in parsetok(). (GH-4439)
Avoid undefined pointer arithmetic with NULL.
(cherry picked from commit 7c4ab2afb1)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-08-15 02:51:12 -04:00
Miss Islington (bot) e3228a3f44 bpo-34399: 2048 bits RSA keys and DH params (GH-8762) (GH-8763)
Downstream vendors have started to deprecate weak keys. Update all RSA keys
and DH params to use at least 2048 bits.

Finite field DH param file use RFC 7919 values, generated with

    certtool --get-dh-params --sec-param=high

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 88bfd0bce0)

Co-authored-by: Christian Heimes <christian@python.org>
2018-08-14 16:52:27 +02:00
Miss Islington (bot) 6c14060977
smtplib documentation fixes (GH-8708)
* SMTP.startssl: Fix doc on keyfile and certfile use

* SMTP.startssl: Add missing keyfile and certfile deprecation notice

* SMTP: Doc grammar fixes
(cherry picked from commit da12063f2f)

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
2018-08-12 21:06:22 -07:00
Miss Islington (bot) 32e58fc321
bpo-34213: Allow dataclasses to work with a field named 'object'. (GH-8452)
(cherry picked from commit 4d12e4dc28)

Co-authored-by: Vadim Pushtaev <pushtaev.vm@gmail.com>
2018-08-12 20:32:44 -07:00
Miss Islington (bot) 393151e241
Fix misindented yaml in logging how to example (GH-8604)
(cherry picked from commit 10b59f1b01)

Co-authored-by: Rémy HUBSCHER <hubscher.remy@gmail.com>
2018-08-12 17:04:44 -07:00
Miss Islington (bot) 7e0153e166
Fix the versionadded indentation in exec_module doc (GH-8719)
(cherry picked from commit 65b5ef02ec)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-08-12 00:01:21 -07:00