Commit Graph

102333 Commits

Author SHA1 Message Date
Christian Heimes 026337a710 bpo-34623: Mention CVE-2018-14647 in news entry (GH-9482)
https://bugs.python.org/issue34623
2018-09-21 21:42:29 -07:00
Ethan Furman 5bdab641da
bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328)
* bpo-29577: allow multiple mixin classes
2018-09-21 19:03:09 -07:00
David Cuthbert fd97d1f1af bpo-32117: Allow tuple unpacking in return and yield statements (gh-4509)
Iterable unpacking is now allowed without parentheses in yield and return
statements, e.g. ``yield 1, 2, 3, *rest``. Thanks to David Cuthbert for the
change and jChapman for added tests.
2018-09-21 18:31:15 -07:00
Elvis Pranskevichus 7279b5125e bpo-34537: Fix test_gdb:test_strings with LC_ALL=C (GH-9483)
We cannot simply call locale.getpreferredencoding() here,
as GDB might have been linked against a different version
of Python with a different encoding and coercion policy
with respect to PEP 538 and PEP 540.

Thanks to Victor Stinner for a hint on how to fix this.
2018-09-21 18:13:16 -07:00
Brett Cannon d64ee1a5ba bpo-32718: Make Activate.ps1 for venv cross-platform and available on all platforms (GH-9321)
PowerShell Core 6.1 is the cross-platform port of Windows PowerShell. This change updates Activate.ps1 to not make Windows assumptions as well as installing it into the bin/Scripts directory on all operating systems.

Requires PowerShell Core 6.1 for proper readline support once the shell has been activated for the virtual environment.
2018-09-21 15:27:26 -07:00
Yury Selivanov db1a80e97a
bpo-33649: Fix gather() docs; fix title; few other nits. (GH-9475) 2018-09-21 16:23:15 -04:00
Xiang Zhang 7d161726e4 Make docs of exitcode for subprocess.getstatusoutput more clear. (GH-9477)
Make it more accurate and not limited to UNIX.
2018-09-21 13:18:20 -07:00
Yury Selivanov 2ec872b31e
bpo-34762: Fix contextvars C API to use PyObject* pointer types. (GH-9473) 2018-09-21 15:33:56 -04:00
Raymond Hettinger b46ad5431d
Minor performance tweak for deque.index() with a start argument (GH-9440) 2018-09-21 01:46:41 -07:00
Serhiy Storchaka fb3e9c00ed
bpo-34755: Add few minor optimizations in _asynciomodule.c. (GH-9455) 2018-09-21 09:11:32 +03:00
Zackery Spytz 91e6c8717b bpo-34735: Fix a memory leak in Modules/timemodule.c (GH-9418)
There was a missing PyMem_Free(format) in time_strftime().
2018-09-21 09:09:48 +03:00
Benjamin Peterson c510c6b8b6
Simplify PyInit_timezone. (GH-9467)
Reduce the knotty preprocessor conditional logic, dedent unnecessarily nested
code, and handle errors properly.

The first edition of this change (afde1c1a05)
failed (bpo-34715) because FreeBSD doesn't define the timezone globals. That's
why we're now checking for HAVE_DECL_TZNAME.
2018-09-20 19:52:18 -07:00
Benjamin Peterson a4ae828ee4
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) 2018-09-20 18:36:40 -07:00
Steve Dower f14c28f397
bpo-34011: Fixes missing venv files and other tests (GH-9458) 2018-09-20 13:38:34 -07:00
Berker Peksag bc85475058
bpo-34754: Fix test_flush_return_value on FreeBSD (GH-9451)
Apparently, FreeBSD doesn't raise OSError when offset is
not a multiple of mmap.PAGESIZE.
2018-09-20 19:53:06 +03:00
Yury Selivanov e247b46cba
bpo-33649: More improvements (GH-9439) 2018-09-20 12:43:59 -04:00
Berker Peksag 8213eaddf3
bpo-19756: Prevent test failures due to EADDRNOTAVAIL (GH-9446) 2018-09-20 18:08:57 +03:00
Berker Peksag b10a64d117
bpo-34743: Fix test_database_source_name under SQLite 3.7.9 (GH-9426) 2018-09-20 14:14:33 +03:00
Berker Peksag 8d1e190fc5
bpo-32215: Fix performance regression in sqlite3 (GH-8511) 2018-09-20 14:10:49 +03:00
Yury Selivanov ffef50f1f5
bpo-34746: Fix stop -> close (GH-9437) 2018-09-20 01:17:09 -04:00
Steve Dower fd54a45f79 Enables test result collection for CI builds (GH-9433) 2018-09-19 16:25:25 -07:00
Victor Stinner 06e7608207
Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)" (GH-9430)
* Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)"

This reverts commit dbdee0073c.

* Revert "bpo-34589: C locale coercion off by default (GH-9073)"

This reverts commit 7a0791b699.

* Revert "bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)"

This reverts commit 188ebfa475.
2018-09-19 14:56:36 -07:00
Steve Dower 76531e2e82
Ignores failure to update lists (GH-9424) 2018-09-19 13:23:25 -07:00
Serhiy Storchaka b2984ab9a7
bpo-25711: Remove outdated zipimport tests. (GH-9404)
They were specific to the C implementation.
2018-09-19 17:43:33 +03:00
Ben Hoyt 3705b98620 bpo-34712: Fix style in examples in "Input and Output" (GH-9361)
A couple of fixes here to make this more PEP-8:

* Avoid multiple statements on one line with `;` statement separator -- this is very rare in Python and is "generally discouraged" in PEP 8 (and if used, per PEP 8 there shouldn't be a space before the `;`)
* Add output for the first "Formatted String Literals" example. (Side note: are the doctests for this being run? If so, why didn't it fail?)
* Avoid space before `!r`. I have generally not seen spaces before the `!`, and this also matches the style used in the docs here: https://docs.python.org/3/library/string.html#format-string-syntax



https://bugs.python.org/issue34712
2018-09-19 03:28:28 -07:00
jdemeyer e89de73987 bpo-34125: Enable profiling of method_descriptor in all cases (GH-8416)
`list.append([], None)` was profiled but `list.append([], None, **{})` was not profiled.
Enable profiling for later case.

https://bugs.python.org/issue34125
2018-09-19 03:06:20 -07:00
Benjamin Peterson b3b8cb419e
run autoconf (GH-9411)
Follow up to 2a9c3805dd (bpo-34585).
2018-09-18 23:49:05 -07:00
Serhiy Storchaka 9da3961f36
bpo-25711: Move _ZipImportResourceReader from importlib to zipimport. (GH-9406) 2018-09-19 09:28:06 +03:00
Ross Burton 2a9c3805dd closes bpo-34585: Don't do runtime test to get float byte order. (GH-9085)
Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of doubles, but this silently fails under cross compilation and Python doesn't do floats properly.

Instead, steal a macro from autoconf-archive which compiles code using magic doubles (which encode to ASCII) and grep for the representation in the binary.

RFC because this doesn't yet handle the weird ancient ARMv4 OABI 'mixed-endian' encoding properly. This encoding is ancient and I don't believe the union of "Python 3.8 users" and "OABI users" has anything in. Should the support for this just be dropped too? Alternatively, someone will need to find an OABI toolchain to verify the encoding of the magic double.
2018-09-18 23:25:48 -07:00
Yury Selivanov 471503954a
bpo-33649: Add a high-level section about Futures; few quick fixes (GH-9403)
Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
2018-09-18 17:55:44 -04:00
Nathaniel J. Smith a3c88ef12c Clarify that AsyncExitStack works with coroutine functions (GH-9405)
The docs were ambiguous about whether you pass in a coroutine function
or a coroutine object, e.g. is it:

  aestack.push_async_exit(some_async_func)

or

  aestack.push_async_exit(some_async_func())

(It's the first one.)
2018-09-18 14:27:59 -07:00
Serhiy Storchaka 79d1c2e6c9
bpo-25711: Rewrite zipimport in pure Python. (GH-6809) 2018-09-18 22:22:29 +03:00
Silas Sewell 4ba3b50bfe bpo-34472: Add data descriptor signature to zipfile (GH-8871)
This makes streamed zips compatible with MacOS Archive Utility and
other applications.
2018-09-18 20:00:05 +03:00
Steve Dower d0f49d2f50
bpo-34582: Adds JUnit XML output for regression tests (GH-9210) 2018-09-18 09:10:26 -07:00
Christian Heimes cb5778f00c bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146)
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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



https://bugs.python.org/issue34623
2018-09-18 05:38:58 -07:00
Serhiy Storchaka 0185f34ddc
bpo-33721: Make some os.path functions and pathlib.Path methods be tolerant to invalid paths. (#7695)
Such functions as os.path.exists(), os.path.lexists(), os.path.isdir(),
os.path.isfile(), os.path.islink(), and os.path.ismount() now return False
instead of raising ValueError or its subclasses UnicodeEncodeError
and UnicodeDecodeError for paths that contain characters or bytes
unrepresentative at the OS level.
2018-09-18 11:28:51 +03:00
Serhiy Storchaka 7bdf28265a
bpo-32455: Add jump parameter to dis.stack_effect(). (GH-6610)
Add C API function PyCompile_OpcodeStackEffectWithJump().
2018-09-18 09:54:26 +03:00
Yury Selivanov b042cf10c6
bpo-33649: Fix markup; add another note that asyncio.run is 3.7+ (GH-9389) 2018-09-18 02:47:54 -04:00
Serhiy Storchaka e0c19ddc66
bpo-34681: Rename class Pattern in sre_parse to State. (GH-9310)
Also rename corresponding attributes, parameters and variables.
2018-09-18 09:16:26 +03:00
Miguel Ángel García 9c53fa6ad9 Fix syntax error on Asyncio example in doc (GH-9387)
The `gather` method requires to close the parenthesis, but it is being closed twice.
2018-09-18 02:01:26 -04:00
Danny Hermes 7bfbda46f4 Change "set_after" reference to `say_after`. (GH-9384) 2018-09-18 00:49:21 -04:00
Yury Selivanov ac94e38d07
bpo-33649: Note that asyncio.run() calls shutdown_asyncgens() (GH-9380) 2018-09-17 23:58:00 -04:00
Victor Stinner dbdee0073c
bpo-34589: Add -X coerce_c_locale command line option (GH-9378)
Add a new -X coerce_c_locale command line option to control C locale
coercion (PEP 538).
2018-09-17 17:19:26 -07:00
Victor Stinner 7a0791b699
bpo-34589: C locale coercion off by default (GH-9073)
Py_Initialize() and Py_Main() cannot enable the C locale coercion
(PEP 538) anymore: it is always disabled. It can now only be enabled
by the Python program ("python3).

test_embed: get_filesystem_encoding() doesn't have to set PYTHONUTF8
nor PYTHONCOERCECLOCALE, these variables are already set in the
parent.
2018-09-17 16:22:29 -07:00
Elvis Pranskevichus 1fa2ec49be bpo-33649: A copy-editing pass on asyncio documentation (GH-9376) 2018-09-17 19:16:44 -04:00
Yury Selivanov 3085534c39
bpo-33649: Add a hello world example to asyncio.rst (GH-9374) 2018-09-17 18:41:59 -04:00
Victor Stinner 188ebfa475
bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)
_PyCoreConfig:

* Rename coerce_c_locale to _coerce_c_locale
* Rename coerce_c_locale_warn to _coerce_c_locale_warn

These fields are now private (name prefixed by "_").
2018-09-17 15:13:17 -07:00
Yury Selivanov c62ab2862d
bpo-34717: Stop numbering stdlib titles/sections in the docs (GH-9370) 2018-09-17 18:12:21 -04:00
Steve Dower 6750922f8d
bpo-34267: Update find_python.bat to use 3.7 if available (GH-8552) 2018-09-17 14:41:53 -07:00
Victor Stinner 7484bdfd1e
bpo-34587, test_socket: remove RDSTest.testCongestion() (GH-9277)
The test tries to fill the receiver's socket buffer and expects an
error. But the RDS protocol doesn't require that. Moreover, the Linux
implementation of RDS expects that the producer of the messages
reduces its rate, it's not the role of the receiver to trigger an
error.

The test fails on Fedora 28 by design, so remove it.
2018-09-17 14:01:20 -07:00