Python 3.12

Python Software Foundation · Python.Python.3.12

Python is a programming language that lets you work more quickly and integrate your systems more effectively.

winget install --id Python.Python.3.12 --exact --source winget

Latest 3.12.10

Release Notes

macOS

  • gh-124111: Update macOS installer to use Tcl/Tk 8.6.16.
  • gh-131423: Update macOS installer to use OpenSSL 3.0.16. Patch by Bénédikt Tran.
  • gh-131025: Update macOS installer to ship with SQLite 3.49.1.
  • gh-91132: Update macOS installer to use ncurses 6.5. Windows
  • gh-131423: Update bundled version of OpenSSL to 3.0.16. The new build also disables uplink support, which may be relevant to embedders but has no impact on normal use.
  • gh-131025: Update Windows installer to ship with SQLite 3.49.1.
  • gh-131020: pylauncher correctly detects a BOM when searching for the shebang. Fix by Chris Eibl. Tools/Demos
  • gh-131852: msgfmt no longer adds the POT-Creation-Date to generated .mo files for consistency with GNU msgfmt.
  • gh-85012: Correctly reset msgctxt when compiling messages in msgfmt. Tests
  • gh-131050: test_ssl.test_dh_params is skipped if the underlying TLS library does not support finite-field ephemeral Diffie-Hellman.
  • gh-119727: Add --single-process command line option to Python test runner (regrtest). Patch by Victor Stinner. Security
  • gh-131809: Update bundled libexpat to 2.7.1
  • gh-131261: Upgrade to libexpat 2.7.0
  • gh-127371: Avoid unbounded buffering for tempfile.SpooledTemporaryFile.writelines(). Previously, disk spillover was only checked after the lines iterator had been exhausted. This is now done after each line is written.
  • gh-121284: Fix bug in the folding of rfc2047 encoded-words when flattening an email message using a modern email policy. Previously when an encoded-word was too long for a line, it would be decoded, split across lines, and re-encoded. But commas and other special characters in the original text could be left unencoded and unquoted. This could theoretically be used to spoof header lines using a carefully constructed encoded-word if the resulting rendered email was transmitted or re-parsed. Library
  • gh-116608: undeprecate functional API for importlib.resources
  • gh-132075: Fix possible use of socket address structures with uninitialized members. Now all structure members are initialized with zeroes by default.
  • gh-132002: Fix crash when deallocating contextvars.ContextVar with weird unahashable string names.
  • gh-131668: socket: Fix code parsing AF_BLUETOOTH socket addresses.
  • gh-131492: Fix a resource leak when constructing a gzip.GzipFile with a filename fails, for example when passing an invalid compresslevel.
  • gh-131325: Fix sendfile fallback implementation to drain data after writing to transport in asyncio.
  • gh-129843: Fix incorrect argument passing in warnings.warn_explicit().
  • gh-131204: Use monospace font from System Font Stack for cross-platform support in difflib.HtmlDiff.
  • gh-131045: Fix issue with contains, values, and pseudo-members for enum.Flag.
  • gh-130959: Fix pure-Python implementation of datetime.time.fromisoformat() to reject times with spaces in fractional part (for example, 12:34:56.400 +02:00), matching the C implementation. Patch by Michał Gorny.
  • gh-130637: Add validation for numeric response data in poplib.POP3.stat() method
  • gh-130461: Remove .. index:: directives from the uuid module documentation. These directives previously created entries in the general index for getnode() as well as the uuid1(), uuid3(), uuid4(), and uuid5() constructor functions.
  • gh-130285: Fix corner case for random.sample() allowing the counts parameter to specify an empty population. So now, sample([], 0, counts=[]) and sample('abc', k=0, counts=[0, 0, 0]) both give the same result as sample([], 0).
  • gh-130250: Fix regression in traceback.print_last().
  • gh-118761: Reverts a change in the previous release attempting to make some stdlib imports used within the subprocess module lazy as this was causing errors during del finalizers calling methods such as terminate, or kill, or send_signal.
  • gh-130164: Fixed failure to raise TypeError in inspect.Signature.bind() for positional-only arguments provided by keyword when a variadic keyword argument (e.g. **kwargs) is present.
  • gh-130151: Fix reference leaks in _hashlib.hmac_new() and _hashlib.hmac_digest(). Patch by Bénédikt Tran.
  • gh-129726: Fix gzip.GzipFile raising an unraisable exception during garbage collection when referring to a temporary object by breaking the reference loop with weakref.
  • gh-129583: Update bundled pip to 25.0.1
  • gh-97850: Update the deprecation warning of importlib.abc.Loader.load_module().
  • gh-129603: Fix bugs where sqlite3.Row objects could segfault if their inherited description was set to None. Patch by Erlend Aasland.
  • gh-117779: Fix reading duplicated entries in zipfile by name. Reading duplicated entries (except the last one) by ZipInfo now emits a warning instead of raising an exception.
  • gh-128772: Fix pydoc for methods with the module attribute equal to None.
  • gh-92897: Scheduled the deprecation of the check_home argument of sysconfig.is_python_build() to Python 3.15.
  • gh-128703: Fix mimetypes.guess_type() to use default mapping for empty Content-Type in registry.
  • gh-126037: xml.etree.ElementTree: Fix a crash in Element.find, Element.findtext and Element.findall when the tag to find implements an eq() method mutating the element being queried. Patch by Bénédikt Tran.
  • gh-127712: Fix handling of the secure argument of logging.handlers.SMTPHandler.
  • gh-126033: xml.etree.ElementTree: Fix a crash in Element.remove when the element is concurrently mutated. Patch by Bénédikt Tran.
  • gh-125553: Fix round-trip invariance for backslash continuations in tokenize.untokenize().
  • gh-101137: Mime type text/x-rst is now supported by mimetypes.
  • gh-113238: Add Anchor to importlib.resources (in order for the code to comply with the documentation)
  • gh-89039: When replace() method is called on a subclass of datetime, date or time, properly call derived constructor. Previously, only the base class’s constructor was called. Also, make sure to pass non-zero fold values when creating subclasses in various methods. Previously, fold was silently ignored. IDLE
  • gh-129873: Simplify displaying the IDLE doc by only copying the text section of idle.html to idlelib/help.html. Patch by Stan Ulbrych. Documentation
  • gh-131417: Mention asyncio.Future and asyncio.Task in generic classes list.
  • gh-125722: Require Sphinx 8.2.0 or later to build the Python documentation. Patch by Adam Turner.
  • gh-129712: The wheel tags supported by each macOS universal SDK option are now documented.
  • gh-46236: C API: Document PyUnicode_RSplit(), PyUnicode_Partition() and PyUnicode_RPartition(). Core and Builtins
  • gh-131670: Fix anext() failing on sync anext() raising an exception.
  • gh-130809: Fixed an issue where _PyFrame_LocalsToFast tries to write module level values to hidden fasts.
  • gh-130775: Do not crash on negative column and end_column in ast locations.
  • gh-130618: Fix a bug that was causing UnicodeDecodeError or SystemError to be raised when using f-strings with lambda expressions with non-ASCII characters. Patch by Pablo Galindo
  • gh-130163: Fix possible crashes related to concurrent change and use of the sys module attributes.
  • gh-88887: Fixing multiprocessing Resource Tracker process leaking, usually observed when running Python as PID 1.
  • gh-116042: Fix location for SyntaxErrors of invalid escapes in the tokenizer. Patch by Pablo Galindo
  • gh-128632: Disallow classdict as the name of a type parameter. Using this name would previously crash the interpreter in some circumstances.
  • gh-125331: from future import barry_as_FLUFL now works in more contexts, including when it is used in files, with the -c flag, and in the REPL when there are multiple statements on the same line. Previously, it worked only on subsequent lines in the REPL, and when the appropriate flags were passed directly to compile(). Patch by Pablo Galindo.
  • gh-107526: Revert converting vars, dir, next, getattr, and iter to argument clinic.
  • gh-107674: Fixed performance regression in sys.settrace. C API
  • gh-131740: Update PyUnstable_GC_VisitObjects to traverse perm gen. Build
  • gh-131865: The DTrace build now properly passes the CC and CFLAGS variables to the dtrace command when utilizing SystemTap on Linux.
  • gh-130740: Ensure that Python.h is included before stdbool.h unless pyconfig.h is included before or in some platform-specific contexts.
  • gh-129838: Don’t redefine _Py_NO_SANITIZE_UNDEFINED when compiling with a recent GCC version and undefined sanitizer enabled.
  • gh-129660: Drop test_embed from PGO training, whose contribution in recent versions is considered to be ignorable.

Installer type: burn

Architecture Scope Download SHA256
x86 user Download FDFE385B94F5B8785A0226A886979527FD26EB65DEFDBF29992FD22CC4B0E31E
x86 machine Download FDFE385B94F5B8785A0226A886979527FD26EB65DEFDBF29992FD22CC4B0E31E
x64 user Download 67B5635E80EA51072B87941312D00EC8927C4DB9BA18938F7AD2D27B328B95FB
x64 machine Download 67B5635E80EA51072B87941312D00EC8927C4DB9BA18938F7AD2D27B328B95FB
arm64 user Download 377AC8FD478987940088E879441E702A71B53164D2A1E6F1D51FF77A7E470258
arm64 machine Download 377AC8FD478987940088E879441E702A71B53164D2A1E6F1D51FF77A7E470258

Details

Homepage
https://www.python.org/
License
PSF-2.0
Publisher
Python Software Foundation
Support
https://www.python.org/about/help/
Privacy Policy
https://www.python.org/privacy/
Copyright
Copyright (c) 2001-2024 Python Software Foundation. All Rights Reserved. Copyright (c) 2000 BeOpen.com. All Rights Reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved.
Moniker
python3.12

Tags

languageprogrammingprogramming-languagepythonpython3script

Older versions (10)

3.12.9
Architecture Scope Download SHA256
x86 user Download F6E3147A835FCE22033F845B417D5F9E6335714C733C7850612B3D61B17019DE
x86 machine Download F6E3147A835FCE22033F845B417D5F9E6335714C733C7850612B3D61B17019DE
x64 user Download 2A52993092A19CFDFFE126E2EEAC46A4265E25705614546604AD44988E040C0F
x64 machine Download 2A52993092A19CFDFFE126E2EEAC46A4265E25705614546604AD44988E040C0F
arm64 user Download 736979F9634098C156AC139E0CE5CACF3BE92715870F592270A4E4FA1C8DA662
arm64 machine Download 736979F9634098C156AC139E0CE5CACF3BE92715870F592270A4E4FA1C8DA662
3.12.8
Architecture Scope Download SHA256
x86 user Download A381547821F589013CBB469CD2A68178810DDB2E7637A2F92262777627B26DEA
x86 machine Download A381547821F589013CBB469CD2A68178810DDB2E7637A2F92262777627B26DEA
x64 user Download 71BD44E6B0E91C17558963557E4CDB80B483DE9B0A0A9717F06CF896F95AB598
x64 machine Download 71BD44E6B0E91C17558963557E4CDB80B483DE9B0A0A9717F06CF896F95AB598
arm64 user Download 8F653DD553B0430C0A5C0B2E9701B46DA187B61734066E8866B673A718A55F2C
arm64 machine Download 8F653DD553B0430C0A5C0B2E9701B46DA187B61734066E8866B673A718A55F2C
3.12.7
Architecture Scope Download SHA256
x86 user Download 5BF4F3F0A58E1661A26754AE2FF0C2499EFFF093F34833EE0921922887FB3851
x86 machine Download 5BF4F3F0A58E1661A26754AE2FF0C2499EFFF093F34833EE0921922887FB3851
x64 user Download 1206721601A62C925D4E4A0DCFC371E88F2DDBE8C0C07962EBB2BE9B5BDE4570
x64 machine Download 1206721601A62C925D4E4A0DCFC371E88F2DDBE8C0C07962EBB2BE9B5BDE4570
arm64 user Download 00B4A63760619E09128978A436F865774A3C23F7285781DC079DDC5B6633D57E
arm64 machine Download 00B4A63760619E09128978A436F865774A3C23F7285781DC079DDC5B6633D57E
3.12.6
Architecture Scope Download SHA256
x86 user Download 03DF41E10B76CC7D8F836DAF4650D880327239B9F5C6D68B83F4260D989FD1D3
x86 machine Download 03DF41E10B76CC7D8F836DAF4650D880327239B9F5C6D68B83F4260D989FD1D3
x64 user Download 5914748E6580E70BEDEB7C537A0832B3071DE9E09A2E4E7E3D28060616045E0A
x64 machine Download 5914748E6580E70BEDEB7C537A0832B3071DE9E09A2E4E7E3D28060616045E0A
arm64 user Download F80598F9C966259DB923306455621D3F22B3A20E25394AB753154335EA4AEA56
arm64 machine Download F80598F9C966259DB923306455621D3F22B3A20E25394AB753154335EA4AEA56
3.12.5
Architecture Scope Download SHA256
x86 user Download 764D8D18A82CC69B947ED08194C76CFE78DBC9D3A07960A08F0EDB9081FD4015
x86 machine Download 764D8D18A82CC69B947ED08194C76CFE78DBC9D3A07960A08F0EDB9081FD4015
x64 user Download 44810512AF577CA70B3269B8570B10825EC2ACE2B86E4297E767A0F4C0EE8BFD
x64 machine Download 44810512AF577CA70B3269B8570B10825EC2ACE2B86E4297E767A0F4C0EE8BFD
arm64 user Download 16F5518E42B70D444C0BDC178167B4FABF1568C2891E83B330337EC1184AB2CF
arm64 machine Download 16F5518E42B70D444C0BDC178167B4FABF1568C2891E83B330337EC1184AB2CF
3.12.4
Architecture Scope Download SHA256
x86 user Download A8B4C07237446364DC8D74288A5E33C04C4554B7BE1F8D81100D219F6E9BBA10
x86 machine Download A8B4C07237446364DC8D74288A5E33C04C4554B7BE1F8D81100D219F6E9BBA10
x64 user Download DA5809DF5CB05200B3A528A186F39B7D6186376CE051B0A393F1DDF67C995258
x64 machine Download DA5809DF5CB05200B3A528A186F39B7D6186376CE051B0A393F1DDF67C995258
arm64 user Download E4106F91E5565B785F254D4D63D570255F7CF78618743A664B0B69D33493438F
arm64 machine Download E4106F91E5565B785F254D4D63D570255F7CF78618743A664B0B69D33493438F
3.12.3
Architecture Scope Download SHA256
x86 user Download A9F37C55F9922D00EF25AF40D5017E86C2D98ABD7D599307BCCF0F2B3D055983
x86 machine Download A9F37C55F9922D00EF25AF40D5017E86C2D98ABD7D599307BCCF0F2B3D055983
x64 user Download EDFC6C84DC47EEBD4FAE9167E96FF5D9C27F8ABAA779EE1DEAB9C3D964D0DE3C
x64 machine Download EDFC6C84DC47EEBD4FAE9167E96FF5D9C27F8ABAA779EE1DEAB9C3D964D0DE3C
arm64 user Download 4399C3CCDE91C703A368B6D4463AF8ED24CE08E694485BED6EFF180373B0DFF1
arm64 machine Download 4399C3CCDE91C703A368B6D4463AF8ED24CE08E694485BED6EFF180373B0DFF1
3.12.2
Architecture Scope Download SHA256
x86 user Download F10F43CDCAF4B788D98BCB072F08AA43330502B25513A8FDFFB6D77263CBAB8E
x86 machine Download F10F43CDCAF4B788D98BCB072F08AA43330502B25513A8FDFFB6D77263CBAB8E
x64 user Download B9314802F9EFBF0F20A8E2CB4CACC4D5CFB0110DAC2818D94E770E1BA5137C65
x64 machine Download B9314802F9EFBF0F20A8E2CB4CACC4D5CFB0110DAC2818D94E770E1BA5137C65
arm64 user Download 3C1876607A70CA4B3F2DB13F79392FFC773ED45E6CC0F12D49ADFD5370C1CB6B
arm64 machine Download 3C1876607A70CA4B3F2DB13F79392FFC773ED45E6CC0F12D49ADFD5370C1CB6B
3.12.1
Architecture Scope Download SHA256
x86 user Download 7389C4765535661932E649AC8B5DD523C664692AA06F15E770B06194303F314C
x86 machine Download 7389C4765535661932E649AC8B5DD523C664692AA06F15E770B06194303F314C
x64 user Download 2437D83DB04FB272AF8DE65EEAD1A2FC416B9FAC3F6AF9CE51A627E32B4FE8F8
x64 machine Download 2437D83DB04FB272AF8DE65EEAD1A2FC416B9FAC3F6AF9CE51A627E32B4FE8F8
arm64 user Download 900FF6661DC289474F1FA930AF138CE8E0E77A0C09068C91C6A2EFA9034497D6
arm64 machine Download 900FF6661DC289474F1FA930AF138CE8E0E77A0C09068C91C6A2EFA9034497D6
3.12.0
Architecture Scope Download SHA256
x86 user Download 78FE137B4B78274E455CE678BA2E296CA7C3C6A0E53806BF09E4F8986B64C632
x86 machine Download 78FE137B4B78274E455CE678BA2E296CA7C3C6A0E53806BF09E4F8986B64C632
x64 user Download C6BDF93F4B2DE6DFA1A3A847E7C24AE10EDF7F6318653D452CD4381415700ADA
x64 machine Download C6BDF93F4B2DE6DFA1A3A847E7C24AE10EDF7F6318653D452CD4381415700ADA
arm64 user Download 05EB076CE9FE248D4A6295F75BE328808B22877F9538CF9EFFE89938AEBC9532
arm64 machine Download 05EB076CE9FE248D4A6295F75BE328808B22877F9538CF9EFFE89938AEBC9532