Python

Python 3.7.3 for PC Windows

Python
開源軟體

Python 3.7.3 for PC Windows

更新時間:2019-03-26
更新細節:

There were no new changes in version 3.7.3.


版本下載:Python 3.7.3 for PC Windows

Python 3.7.2 for PC Windows

更新時間:2019-01-03
更新細節:

Security
The -I command line option (run Python in isolated mode) is now also copied by the multiprocessing and distutils modules when spawning child processes. Previously, only -E and -s options (enabled by -I) were copied.
The xml.sax and xml.dom.domreg no longer use environment variables to override parser implementations when sys.flags.ignore_environment is set by -E or -I arguments.

Core and Builtins
Fixed error handling in pickling methods when fail to look up builtin “getattr”.
Fix various issues with memory allocation error handling. Patch by Zackery Spytz.
Internal attributes’ names of unittest.mock._Call and unittest.mock.MagicProxy (name, parent & from_kall) are now prefixed with _mock_ in order to prevent clashes with widely used object attributes. Fixed minor typo in test function name.
Fixed the code page decoder for input longer than 2 GiB containing undecodable bytes.
Fix PYTHONCOERCECLOCALE=1 environment variable: only coerce the C locale if the LC_CTYPE locale is “C”.
For str.format(), float.__format__() and complex.__format__() methods for non-ASCII decimal point when using the “n” formatter.
Fix a possible segfault involving a newly-created coroutine. Patch by Zackery Spytz.
Fixed an out of bounds memory access when parsing a truncated unicode escape sequence at the end of a string such as 'N'. It would read one byte beyond the end of the memory allocation.
The interpreter and extension modules have had annotations added so that they work properly under clang’s Memory Sanitizer. A new configure flag –with-memory-sanitizer has been added to make test builds of this nature easier to perform.
Fix an off by one error in the bytecode peephole optimizer where it could read bytes beyond the end of bounds of an array when removing unreachable code. This bug was present in every release of Python 3.6 and 3.7 until now.
Clarify in the docstrings of os methods that path-like objects are also accepted as input parameters.
Socket: Fix off-by-one bug in length check for AF_ALG name and type.
Bytes and bytearray constructors no longer convert unexpected exceptions (e.g. MemoryError and KeyboardInterrupt) to TypeError.
Fixed crash in bytes() when the list argument is mutated while it is iterated.
Fix a possible null pointer dereference in Modules/_ssl.c. Patch by Zackery Spytz.
Do not assume signed integer overflow behavior (C undefined behavior) when performing set hash table resizing.

Library
Associate .mjs file extension with application/javascript MIME Type.
Fix xml.dom.minidom cloneNode() on a document with an entity: pass the correct arguments to the user data handler of an entity.
When a Mock instance was used to wrap an object, if side_effect is used in one of the mocks of it methods, don’t call the original implementation and return the result of using the side effect the same way that it is done with return_value.
Revert the fix for this issue previously released in 3.7.1 pending further investigation: Fix a reference issue inside multiprocessing.Pool that caused the pool to remain alive if it was deleted without being closed or terminated explicitly.
posixpath.expanduser() now returns the input path unchanged if the HOME environment variable is not set and the current user has no home directory (if the current user identifier doesn’t exist in the password database). This change fix the site module if the current user doesn’t exist in the password database (if the user has no home directory).
Fix a bug in select.select() where, in some cases, the file descriptor sequences were returned unmodified after a signal interruption, even though the file descriptors might not be ready yet. select.select() will now always return empty lists if a timeout has occurred. Patch by Oran Avraham.
Enable TCP_NODELAY on Windows for proactor asyncio event loop.
Add generic version of collections.OrderedDict to the typing module. Patch by Ismo Toijala.
Fixed possible crash in os.utime() on Windows when pass incorrect arguments.
Fix ResourceWarning in platform.dist() on SuSE and Caldera OpenLinux. Patch by Ville Skyttä.
Fix regression in webbrowser where default browsers may be preferred over browsers in the BROWSER environment variable.
locale.localeconv() now sets temporarily the LC_CTYPE locale to the LC_MONETARY locale if the two locales are different and monetary strings are non-ASCII. This temporary change affects other threads.
Update ensurepip to install pip 18.1 and setuptools 40.6.2.
Recursively check arguments when testing for equality of unittest.mock.call objects and add note that tracking of parameters used to create ancestors of mocks in mock_calls is not possible.
The warnings module now suggests to enable tracemalloc if the source is specified, the tracemalloc module is available, but tracemalloc is not tracing memory allocations.
Modify the following fnctl function to retry if interrupted by a signal (EINTR): flock, lockf, fnctl
Fix incorrect parsing of _io.IncrementalNewlineDecoder’s translate argument.
Improve difflib.SequenceManager.get_matching_blocks doc by adding ‘non-overlapping’ and changing ‘!=’ to ‘<’.
socketserver.BaseServer.serve_forever() now exits immediately if it’s shutdown() method is called while it is polling for new events.
Fix ntpath.abspath regression where it didn’t remove a trailing separator on Windows. Patch by Tim Graham.
Fixed a leak in Tkinter when pass the Python wrapper around Tcl_Obj back to Tcl/Tk.
Fixed references leaks when call the __setstate__() method of xml.etree.ElementTree.Element in the C implementation for already initialized element.
Verify the value for the parameter ‘-s’ of the cProfile CLI. Patch by Robert Kuska
dataclasses now handle recursive reprs without raising RecursionError.
The 2to3 execfile fixer now opens the file with mode 'rb'. Patch by Zackery Spytz.
Pydoc now supports aliases not only to methods defined in the end class, but also to inherited methods. The docstring is not duplicated for aliases.
Methods find(), findtext() and findall() of the Element class in the xml.etree.ElementTree module are now able to find children which are instances of Element subclasses.
Fix TclError in tkinter.Spinbox.selection_element(). Patch by Juliette Monsel.
Adding max_num_fields to cgi.FieldStorage to make DOS attacks harder by limiting the number of MiniFieldStorage objects created by FieldStorage.
The SOURCE_DATE_EPOCH environment variable no longer overrides the value of the invalidation_mode argument to py_compile.compile(), and determines its default value instead.
ZIP files created by distutils will now include entries for directories.
Fix bug that prevented using reset_mock on mock instances with deleted attributes
Enum._missing_: raise ValueError if None returned and TypeError if non-member is returned.
Fix possible mojibake in the error message of pwd.getpwnam and grp.getgrnam using string representation because of invisible characters or trailing whitespaces. Patch by William Grzybowski.
OrderedDict iterators are not exhausted during pickling anymore. Patch by Sergey Fedoseev.
sqlite3.Connection.create_aggregate(), sqlite3.Connection.create_function(), sqlite3.Connection.set_authorizer(), sqlite3.Connection.set_progress_handler() methods raises TypeError when unhashable objects are passed as callable. These methods now don’t pass such objects to SQLite API. Previous behavior could lead to segfaults. Patch by Sergey Fedoseev.
compileall: import ProcessPoolExecutor only when needed, preventing hangs on low resource platforms
Implemented unpickling instances of datetime, date and time pickled by Python 2. encoding='latin1' should be used for successful decoding.

Documentation
Remove mention of typing.io and typing.re. Their types should be imported from typing directly.
Fix the documentation about an unexisting f_restricted attribute in the frame object. Patch by Stéphane Wirtel
Fix the documentation with the role exc for the appropriated exception. Patch by Stéphane Wirtel
Rename documentation for email.utils to email.utils.rst.
Use app.add_object_type() instead of the deprecated Sphinx function app.description_unit()
Create availability directive for documentation. Original patch by Georg Brandl.
Document getargspec, from_function and from_builtin as deprecated in their respective docstring, and include version since deprecation in DeprecationWarning message.
Update the faq/windows.html to use the py command from PEP 397 instead of python.

Tests
test_multiprocessing_fork may crash on recent versions of macOS. Until the issue is resolved, skip the test on macOS.
Modify test_asyncio to use the certificate set from the test directory.
Fix mktime() overflow error in test_email: run test_localtime_daylight_true_dst_true() and test_localtime_daylight_false_dst_true() with a specific timezone.
After several reports that test_gdb does not work properly on macOS and since gdb is not shipped by default anymore, test_gdb is now skipped on macOS when LLVM Clang has been used to compile Python. Patch by Lysandros Nikolaou
Regrtest issue a warning when no tests have been executed in a particular test file. Also, a new final result state is issued if no test have been executed across all test files. Patch by Pablo Galindo.

Build
Make profile-opt no longer replaces CFLAGS_NODIST with CFLAGS. It now adds profile-guided optimization (PGO) flags to CFLAGS_NODIST: existing CFLAGS_NODIST flags are kept.
Avoid leaking the linker flags from Link Time Optimizations (LTO) into distutils when compiling C extensions.
The Windows installer (MSI) now also install internal header files (Include/internal/ subdirectory).
When building Python with clang and LTO, LTO flags are no longer passed into CFLAGS to build third-party C extensions through distutils.
Fix a compiler error when statically linking pyexpat in Modules/Setup.
Restores the use of pyexpatns.h to isolate our embedded copy of the expat C library so that its symbols do not conflict at link or dynamic loading time with an embedding application or other extension modules with their own version of libexpat.
Have –with-lto works correctly with clang.
Fix an undefined behaviour in the pthread implementation of PyThread_start_new_thread(): add a function wrapper to always return NULL.

Windows
Updates Windows build to OpenSSL 1.1.0j
Venv on Windows will now use a python.exe redirector rather than copying the actual binaries from the base environment.
Adds support for building a Windows App Store package
Remove _distutils_findvs module and use vswhere.exe instead.
Fixes exit code of list version arguments for py.exe.
Fix usage of GetLastError() instead of errno in os.execve() and os.truncate().

macOS
Update macOS installer to use Tcl/Tk 8.6.9.1. [NOTE: This change was reverted for the released python.org 3.7.2 macOS installers due to regressions found in Tk 8.6.9.1. For now, the installers provide Tcl/Tk 8.6.8.]
Update macOS installer to use OpenSSL 1.1.0j.
Properly guard the use of the CLOCK_GETTIME et al. macros in timemodule on macOS.
On macOS, fix reading from and writing into a file with a size larger than 2 GiB.

IDLE
Where appropriate, use ‘macOS’ in idlelib.
On macOS, warn if the system preference “Prefer tabs when opening documents” is set to “Always”.
Document two IDLE on MacOS issues. The System Preferences Dock “prefer tabs always” setting disables some IDLE features. Menus are a bit different than as described for Windows and Linux.
Remove unused imports from lib/idlelib
Document that IDLE’s shell has no line limit. A program that runs indefinitely can overfill memory.
Explain how IDLE’s Shell displays output.
Improve the doc about IDLE running user code. The section is renamed from “IDLE – console differences” is renamed “Running user code”. It mostly covers the implications of using custom sys.stdxxx objects.
Add IDLE doc subsection explaining editor windows. Topics include opening, title and status bar, .py* extension, and running.
Document the IDLE document viewer in the IDLE doc. Add a paragraph in “Help and preferences”, “Help sources” subsection.
Update idlelib.help.copy_string docstring. We now use git and backporting instead of hg and forward merging.
Update idlelib help files for the current doc build. The main change is the elimination of chapter-section numbers.

Tools/Demos
python-gdb.py now handles errors on computing the line number of a Python frame.

C API
Conditionally declare Py_FinalizeEx() (new in 3.6) based on Py_LIMITED_API. Patch by Arthur Neufeld.
Fix memory leak in PyUnicode_EncodeLocale() and PyUnicode_EncodeFSDefault() on error handling.
Make install now also installs the internal API: Include/internal/*.h header files.
Adds _Py_SetProgramFullPath so embedders may override sys.executable


版本下載:Python 3.7.2 for PC Windows

Python 3.7.1 for PC Windows

更新時間:2018-11-07
更新細節:

Fix a possible null pointer dereference in bytesobject.c. Patch by Zackery Spytz.
Fixed a crash in compiling string annotations containing a lambda with a keyword-only argument that doesn’t have a default value.
Fix dict(od) didn’t copy iteration order of OrderedDict.

Library
Fix for async generators not finalizing when event loop is in debug mode and garbage collector runs in another thread.
Fixed integer overflow in the digest() and hexdigest() methods for the SHAKE algorithm in the hashlib module.
Enum: fix grandchildren subclassing when parent mixed with concrete data types.
Fixed unittest.TestCase.debug() when used to call test methods with subtests. Patch by Bruno Oliveira.
Fix inspect module polluted sys.modules when parsing __text_signature__ of callable.
Fix self-cancellation in C implementation of asyncio.Task
Use a monotonic clock to compute timeouts in Executor.map() and as_completed(), in order to prevent timeouts from deviating when the system clock is adjusted.
Use socket.CMSG_SPACE() to calculate ancillary data size instead of socket.CMSG_LEN() in multiprocessing.reduction.recvfds() as RFC 3542 requires the use of the former for portable applications.
In QueueHandler, clear exc_text from LogRecord to prevent traceback from being written twice.
Acquire the logging module’s commonly used internal locks while fork()ing to avoid deadlocks in the child process.
Fix a reference issue inside multiprocessing. Pool that caused the pool to remain alive if it was deleted without being closed or terminated explicitly.

Documentation
chm document displays non-ASCII characters properly on some MBCS Windows systems.

Tests
Fixed test_gdb when Python is compiled with flags -mcet -fcf-protection -O0.

macOS
Revert to using the released Tk 8.6.8 with macOS installers instead of the Tk 8.6.x development snapshot used with 3.7.1rc1 and 3.6.7rc1. The snapshot introduced at least one significant regression (bpo-34927).

C API
Ensure that PyObject_Print() always returns -1 on error. Patch by Zackery Spytz.


版本下載:Python 3.7.1 for PC Windows

Python 3.7.1

更新時間:2018-11-07
更新細節:

Fix a possible null pointer dereference in bytesobject.c. Patch by Zackery Spytz.
Fixed a crash in compiling string annotations containing a lambda with a keyword-only argument that doesn’t have a default value.
Fix dict(od) didn’t copy iteration order of OrderedDict.

Library
Fix for async generators not finalizing when event loop is in debug mode and garbage collector runs in another thread.
Fixed integer overflow in the digest() and hexdigest() methods for the SHAKE algorithm in the hashlib module.
Enum: fix grandchildren subclassing when parent mixed with concrete data types.
Fixed unittest.TestCase.debug() when used to call test methods with subtests. Patch by Bruno Oliveira.
Fix inspect module polluted sys.modules when parsing __text_signature__ of callable.
Fix self-cancellation in C implementation of asyncio.Task
Use a monotonic clock to compute timeouts in Executor.map() and as_completed(), in order to prevent timeouts from deviating when the system clock is adjusted.
Use socket.CMSG_SPACE() to calculate ancillary data size instead of socket.CMSG_LEN() in multiprocessing.reduction.recvfds() as RFC 3542 requires the use of the former for portable applications.
In QueueHandler, clear exc_text from LogRecord to prevent traceback from being written twice.
Acquire the logging module’s commonly used internal locks while fork()ing to avoid deadlocks in the child process.
Fix a reference issue inside multiprocessing. Pool that caused the pool to remain alive if it was deleted without being closed or terminated explicitly.

Documentation
chm document displays non-ASCII characters properly on some MBCS Windows systems.

Tests
Fixed test_gdb when Python is compiled with flags -mcet -fcf-protection -O0.

macOS
Revert to using the released Tk 8.6.8 with macOS installers instead of the Tk 8.6.x development snapshot used with 3.7.1rc1 and 3.6.7rc1. The snapshot introduced at least one significant regression (bpo-34927).

C API
Ensure that PyObject_Print() always returns -1 on error. Patch by Zackery Spytz.


版本下載:Python 3.7.1

Python 3.7.0

更新時間:2018-06-28
更新細節:

Major new features:
New C API for thread-local storage.
Python documentation translations.
New documentation translations: Japanese, French, and Korean.
Deterministic pyc files.
Built-in breakpoint().
Data Classes.
Core support for typing module and generic types.
Customization of access to module attributes.
Postponed evaluation of annotations.
Time functions with nanosecond resolution.
Improved DeprecationWarning handling.
Context Variables.
Avoiding the use of ASCII as a default text encoding (PEP 538, legacy C locale coercion and PEP 540, forced UTF-8 runtime mode).
The insertion-order preservation nature of dict objects is now an official part of the Python language spec.
Notable performance improvements in many areas.


版本下載:Python 3.7.0

Python 3.6.5

更新時間:2018-03-28
更新細節:

Tests:
Avoid regrtest compatibility issue with namespace packages.
Build:
Upgrade pip to 9.0.3 and setuptools to v39.0.1.


版本下載:Python 3.6.5

Python 3.6.4

更新時間:2017-12-20
更新細節:
版本下載:Python 3.6.4

Python 3.6.3

更新時間:2017-10-16
更新細節:
版本下載:Python 3.6.3

Python 3.6.2

更新時間:2017-07-17
更新細節:沒有資料
版本下載:Python 3.6.2

Python 3.6.1

更新時間:2017-03-23
更新細節:

Major new features :
Preserving Keyword Argument Order.
Simpler customization of class creation.
Local Time Disambiguation.
Literal String Formatting.
Adding A Secrets Module To The Standard Library.
Add a private version to dict.
Underscores in Numeric Literals.
Adding a file system path protocol.
Preserving Class Attribute Definition Order.
Adding a frame evaluation API to CPython.
Make os.urandom() blocking on Linux (during system startup).
Asynchronous Generators (provisional).
Syntax for Variable Annotations (provisional).
Change Windows console encoding to UTF-8.
Change Windows filesystem encoding to UTF-8.
Asynchronous Comprehensions.


版本下載:Python 3.6.1

Python 3.5.3

更新時間:2017-01-19
更新細節:

- improved Python zip application support.
- additional unpacking generalizations.
- "%-formatting" for bytes and bytearray objects.
- a new operator (@) for matrix multiplication.
- os.scandir(), a fast new directory traversal function.
- adding support for automatic retries of interrupted system calls.
- change StopIteration handling inside generators.
- the typing module, a new standard for type annotations.
- math.isclose(), a function for testing approximate equality.
- making the Windows Python launcher aware of virtual environments.
- eliminating .pyo files.
- a new and improved mechanism for loading extension modules.
- coroutines with async and await syntax.


版本下載:Python 3.5.3

Python 3.6.0

更新時間:2016-12-26
更新細節:

# New features:
* Preserving Keyword Argument Order
* Simpler customization of class creation
* Local Time Disambiguation
* Literal String Formatting
* Adding A Secrets Module To The Standard Library
* Add a private version to dict
* Underscores in Numeric Literals
* Adding a file system path protocol
* Preserving Class Attribute Definition Order
* Adding a frame evaluation API to CPython
* Make os.urandom() blocking on Linux (during system startup)
* Asynchronous Generators (provisional)
* Syntax for Variable Annotations (provisional)
* Change Windows console encoding to UTF-8
* Change Windows filesystem encoding to UTF-8
* Asynchronous Comprehensions


版本下載:Python 3.6.0

Python 2.7.13

更新時間:2016-12-19
更新細節:

* bugfix release.


版本下載:Python 2.7.13

Python 2.7.12

更新時間:2016-06-28
更新細節:

# Build
- Update Windows builds to use OpenSSL 1.0.2h.
# IDLE
- Fix about dialog.


版本下載:Python 2.7.12

Python 3.5.2

更新時間:2016-06-28
更新細節:

# Core and Builtins
- Update Windows builds to use OpenSSL 1.0.2h.
# Tests
- Ubuntu’s openssl OP_NO_SSLv3 is forced on by default; fix test.
# IDLE
- Allow non-ascii in idlelib/NEWS.txt - minimal part for 3.5.2.


版本下載:Python 3.5.2