Commit Graph

102192 Commits

Author SHA1 Message Date
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
Miss Islington (bot) 6b14508522
bpo-34379: Doc: Move note for json.dump (GH-8730)
(cherry picked from commit 9e84084851)

Co-authored-by: Evan Allrich <eallrich@gmail.com>
2018-08-11 01:02:03 -07:00
Miss Islington (bot) 39c1253bd1
closes bpo-34377: Update Valgrind suppressions. (GH-8729)
Valgrind isn't seeing PyObject_Free/PyObject_Realloc, but using _PyObject_Free/_PyObject_Realloc works.
(cherry picked from commit db6075ab3a)

Co-authored-by: Paul Price <price@astro.princeton.edu>
2018-08-11 00:29:32 -07:00
Miss Islington (bot) 8fc21c80af bpo-26818: Add a test to make sure the bug is fixed (GH-8664)
The main cause of this bug was fixed as part of bpo-31908.
(cherry picked from commit c8b0dbc492)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-08-11 09:28:34 +03:00
Miss Islington (bot) c614121224 bpo-34333: Fix %-formatting in Path.with_suffix() (GH-8663)
(cherry picked from commit 423d05f6f5)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-08-11 09:00:11 +03:00
Miss Islington (bot) ea8835fb30
bpo-34047: IDLE: fix mousewheel scrolling direction on macOS (GH-8678)
(cherry picked from commit 077059e0f0)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-08-09 23:43:06 -07:00
Miss Islington (bot) 56410810d3
Doc: add missing capture_output arg to subprocess.run() signature (GH-8374)
(cherry picked from commit 22d131a7f9)

Co-authored-by: Andriy Maletsky <9919211+and800@users.noreply.github.com>
2018-08-09 15:03:52 -07:00
Miss Islington (bot) 426135b674
Improve grammar of asynchronous iterator glossary entry (GH-8657)
(cherry picked from commit cf2c5e8e28)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-08-09 09:08:49 -07:00
Miss Islington (bot) fe8f90aa3c
bpo-34324: Doc README wrong directory name for venv (GH-8650)
In the documentation, the `env` directory is specified when we execute
the `make venv` command. But in the code, `make venv` will create the
virtualenv inside the `venv` directory (defined by `VENVDIR`)
(cherry picked from commit 599bfa18f8)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2018-08-09 08:10:27 -07:00