summaryrefslogtreecommitdiffstats
path: root/Doc/using
Commit message (Collapse)AuthorAgeFilesLines
* gh-116167: Allow disabling the GIL with `PYTHON_GIL=0` or `-X gil=0` (#116338)Brett Simmers2024-03-111-0/+18
| | | | | | | | | In free-threaded builds, running with `PYTHON_GIL=0` will now disable the GIL. Follow-up issues track work to re-enable the GIL when loading an incompatible extension, and to disable the GIL by default. In order to support re-enabling the GIL at runtime, all GIL-related data structures are initialized as usual, and disabling the GIL simply sets a flag that causes `take_gil()` and `drop_gil()` to return early.
* gh-106259: Add minimal help target to Makefile (#106260)Skip Montanaro2024-03-071-26/+104
| | | | | Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-115664: Fix ordering of more versionadded and versionchanged directives ↵Serhiy Storchaka2024-03-071-33/+24
| | | | (GH-116298)
* Docs: update using/configure.rst (#116274)Hugo van Kemenade2024-03-031-23/+31
|
* gh-115872: Doc: remove obsolete reference to MSI packages (#115873)partev2024-02-241-1/+1
|
* gh-115795: Doc: fix obsolete URL (#115749)partev2024-02-221-1/+1
|
* gh-115664: Fix chronological ordering of versionadded and versionchanged ↵Brian Schubert2024-02-191-3/+3
| | | | directives (#115676)
* Update "Using Python on a Mac" (#115024)Hugo van Kemenade2024-02-131-46/+59
|
* Docs: 'still' is a better word than 'nonetheless' (#114598)Ned Batchelder2024-01-261-1/+1
|
* gh-112984 Update Windows build and installer for free-threaded builds ↵Steve Dower2024-01-172-2/+62
| | | | (GH-113129)
* gh-113664: Improve style of Big O notation (GH-113695)Serhiy Storchaka2024-01-101-1/+1
| | | | Use cursive to make it looking like mathematic formulas.
* gh-73965: New environment variable PYTHON_HISTORY (#13208)Zackery Spytz2024-01-071-0/+8
| | | | | | | | It can be used to set the location of a .python_history file --------- Co-authored-by: Levi Sabah <0xl3vi@gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-112536: Add support for thread sanitizer (TSAN) (gh-112648)Samet YASLAN2023-12-301-0/+7
|
* gh-112730: Update docs for colour env vars (#112837)Hugo van Kemenade2023-12-141-1/+4
|
* gh-112999: Replace the outdated "deprecated" directives with ↵Serhiy Storchaka2023-12-121-3/+1
| | | | "versionchanged" (GH-113000)
* gh-112730: Use color to highlight error locations (gh-112732)Pablo Galindo Salgado2023-12-061-0/+27
| | | | Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-108223: Refer to PEP 703 as Free Threading (#112780)Victor Stinner2023-12-061-1/+4
|
* gh-110481: Fix Py_SET_REFCNT() integer overflow (#112174)Victor Stinner2023-12-011-0/+2
| | | | | | | | | | | | | | If Py_NOGIL is defined and Py_SET_REFCNT() is called with a reference count larger than UINT32_MAX, make the object immortal. Set _Py_IMMORTAL_REFCNT constant type to Py_ssize_t to fix the following compiler warning: Include/internal/pycore_global_objects_fini_generated.h:14:24: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned int' [-Wsign-compare] if (Py_REFCNT(obj) < _Py_IMMORTAL_REFCNT) { ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
* gh-112088: Run autoreconf in GHA check_generated_files (#112090)Victor Stinner2023-11-151-5/+12
| | | | | | | | | | | The "Check if generated files are up to date" job of GitHub Actions now runs the "autoreconf -ivf -Werror" command instead of the "make regen-configure" command to avoid depending on the external quay.io server. Add Tools/build/regen-configure.sh script to regenerate the configure with an Ubuntu container image. The "quay.io/tiran/cpython_autoconf:271" container image (https://github.com/tiran/cpython_autoconf) is no longer used.
* gh-111374: Add a new PYTHON_FROZEN_MODULES env var, equivalent of `-X ↵Yilei Yang2023-11-011-5/+20
| | | | | | | frozen_modules`. (#111411) Adds a new PYTHON_FROZEN_MODULES env var to correspond with -X frozen_modules. Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-90815: Add mimalloc memory allocator (#109914)Dino Viehland2023-10-302-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add mimalloc v2.12 Modified src/alloc.c to remove include of alloc-override.c and not compile new handler. Did not include the following files: - include/mimalloc-new-delete.h - include/mimalloc-override.h - src/alloc-override-osx.c - src/alloc-override.c - src/static.c - src/region.c mimalloc is thread safe and shares a single heap across all runtimes, therefore finalization and getting global allocated blocks across all runtimes is different. * mimalloc: minimal changes for use in Python: - remove debug spam for freeing large allocations - use same bytes (0xDD) for freed allocations in CPython and mimalloc This is important for the test_capi debug memory tests * Don't export mimalloc symbol in libpython. * Enable mimalloc as Python allocator option. * Add mimalloc MIT license. * Log mimalloc in Lib/test/pythoninfo.py. * Document new mimalloc support. * Use macro defs for exports as done in: https://github.com/python/cpython/pull/31164/ Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-110722: Add PYTHON_PRESITE to import a module before site.py is run (#110769)Łukasz Langa2023-10-141-4/+33
|
* gh-101100: Fix sphinx warnings in `usage/cmdline.rst` (#110841)Nikita Sobolev2023-10-141-8/+9
|
* gh-110631: Fix reST indentation (#110724)Ezio Melotti2023-10-111-12/+13
| | | | | * Fix wrong indentation in the other dirs. * Fix more wrong indentation.
* gh-109595: Add -Xcpu_count=<n> cmdline for container users (#109667)Donghee Na2023-10-101-0/+18
| | | | | | --------- Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* Docs: Avoid the deprecated ``.. cmdoption::`` directive (#110292)Adam Turner2023-10-032-130/+130
|
* gh-110276: No longer ignore PROFILE_TASK failure silently (#110295)Victor Stinner2023-10-031-0/+3
|
* gh-83180: Made launcher treat shebang 'python' tags as low priority so that ↵Steve Dower2023-10-021-6/+14
| | | | active virtual environments are preferred (GH-108101)
* GH-92584: Move installation schemes overview to sysconfig docs (#108018)Adam Turner2023-10-021-1/+1
| | | | | | | | | | | * Add new installation path functions subsection * Add content from install/index to sysconfig * Fix table * Update note about installers * Clean up the list of schemes, remove references to Distutils
* gh-105323: Update readline module to detect apple editline variant (gh-108665)Donghee Na2023-09-291-3/+4
|
* gh-101100: Fix Sphinx warnings in Doc/using/configure.rst (#109931)Victor Stinner2023-09-271-8/+8
|
* gh-109276, gh-109508: Fix libregrtest stdout (#109903)Victor Stinner2023-09-261-1/+1
| | | | | | | | | Remove replace_stdout(): call sys.stdout.reconfigure() instead of set the error handler to backslashreplace. display_header() logs an empty line and flush stdout. Remove encoding workaround in display_header() since stdout error handler is now set to backslashreplace earlier.
* gh-109566, regrtest: Add --fast-ci and --slow-ci options (#109570)Victor Stinner2023-09-261-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add --fast-ci and --slow-ci options to libregrtest: * --fast-ci uses a default timeout of 10 minutes and "-u all,-cpu" (skip slowest tests). * --slow-ci uses a default timeout of 20 minues and "-u all" (run all tests). * regrtest header now lists test resources. * Makefile changes: * "make test", "make hostrunnertest" and "make coverage-report" now use --fast-ci option and TESTTIMEOUT variable. * "make buildbottest" now uses "--slow-ci". Remove options which became redundant with "--slow-ci". * "make testall" and "make testuniversal" now use --slow-ci option and TESTTIMEOUT variable. * "make testall" now uses "find -exec rm ..." instead of "find ... -print|xargs rm ...", same as "make clean". * GitHub Actions workflow: * Ubuntu and Address Sanitizer jobs now use "make test". Remove options which became redundant with "--fast-ci". * Windows jobs now use --fast-ci option. * Use -j0 to detect the number of CPUs. * Set Makefile TESTTIMEOUT default to an empty string, since --slow-ci and --fast-ci use different default timeout. It's now accepted to pass "--timeout=" to regrtest: treated as not timeout. * Tools/scripts/run_tests.py now uses --fast-ci option. * Tools/buildbot/test.bat now uses --slow-ci option. Remove --timeout=1200 option, redundant with --slow-ci.
* gh-109634: Use :samp: role (GH-109635)Serhiy Storchaka2023-09-232-7/+7
|
* gh-109054: Document configure variables (#109224)Victor Stinner2023-09-201-0/+149
|
* gh-109474: Update two Unix packaging URLs (#109307)partev2023-09-161-2/+2
| | | | | update packaging URLs fix a broken URL for fedora RPM packaging guide and fix a URL redirect for Slackware packaging guide.
* GH-83417: Allow `venv` to add a `.gitignore` file to environments via a new ↵Brett Cannon2023-09-151-31/+42
| | | | | | | | `scm_ignore_file` parameter (GH-108125) This feature is off by default via code but on by default via the CLI. The `.gitignore` file contains `*` which causes the entire directory to be ignored. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-107298: Document PyMODINIT_FUNC macro (#109236)Victor Stinner2023-09-141-2/+2
| | | | | | | Document PyMODINIT_FUNC macro. Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are not documented. These macros should only be used to define the Python C API. They should not be used outside Python code base.
* gh-108740: Fix "make regen-all" race condition (#108741)Victor Stinner2023-09-061-0/+23
| | | | | | | | | | | | | | | | | | Fix a race condition in "make regen-all". The deepfreeze.c source and files generated by Argument Clinic are now generated or updated before generating "global objects". Previously, some identifiers may miss depending on the order in which these files were generated. * "make regen-global-objects": Make sure that deepfreeze.c is generated and up to date, and always run "make clinic". * "make clinic" no longer runs generate_global_objects.py script. * "make regen-deepfreeze" now only updates deepfreeze.c (C file). It doesn't build deepfreeze.o (object) anymore. * Remove misleading messages in "make regen-global-objects" and "make clinic". They are now outdated, these commands are now safe to use. * Document generates files in Doc/using/configure.rst. Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-108753: Enhance pystats (#108754)Victor Stinner2023-09-061-3/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Statistics gathering is now off by default. Use the "-X pystats" command line option or set the new PYTHONSTATS environment variable to 1 to turn statistics gathering on at Python startup. Statistics are no longer dumped at exit if statistics gathering was off or statistics have been cleared. Changes: * Add PYTHONSTATS environment variable. * sys._stats_dump() now returns False if statistics are not dumped because they are all equal to zero. * Add PyConfig._pystats member. * Add tests on sys functions and on setting PyConfig._pystats to 1. * Add Include/cpython/pystats.h and Include/internal/pycore_pystats.h header files. * Rename '_py_stats' variable to '_Py_stats'. * Exclude Include/cpython/pystats.h from the Py_LIMITED_API. * Move pystats.h include from object.h to Python.h. * Add _Py_StatsOn() and _Py_StatsOff() functions. Remove '_py_stats_struct' variable from the API: make it static in specialize.c. * Document API in Include/pystats.h and Include/cpython/pystats.h. * Complete pystats documentation in Doc/using/configure.rst. * Don't write "all zeros" stats: if _stats_off() and _stats_clear() or _stats_dump() were called. * _PyEval_Fini() now always call _Py_PrintSpecializationStats() which does nothing if stats are all zeros. Co-authored-by: Michael Droettboom <mdboom@gmail.com>
* gh-108634: Py_TRACE_REFS uses a hash table (#108663)Victor Stinner2023-08-311-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python built with "configure --with-trace-refs" (tracing references) is now ABI compatible with Python release build and debug build. Moreover, it now also supports the Limited API. Change Py_TRACE_REFS build: * Remove _PyObject_EXTRA_INIT macro. * The PyObject structure no longer has two extra members (_ob_prev and _ob_next). * Use a hash table (_Py_hashtable_t) to trace references (all objects): PyInterpreterState.object_state.refchain. * Py_TRACE_REFS build is now ABI compatible with release build and debug build. * Limited C API extensions can now be built with Py_TRACE_REFS: xxlimited, xxlimited_35, _testclinic_limited. * No longer rename PyModule_Create2() and PyModule_FromDefAndSpec2() functions to PyModule_Create2TraceRefs() and PyModule_FromDefAndSpec2TraceRefs(). * _Py_PrintReferenceAddresses() is now called before finalize_interp_delete() which deletes the refchain hash table. * test_tracemalloc find_trace() now also filters by size to ignore the memory allocated by _PyRefchain_Trace(). Test changes for Py_TRACE_REFS: * Add test.support.Py_TRACE_REFS constant. * Add test_sys.test_getobjects() to test sys.getobjects() function. * test_exceptions skips test_recursion_normalizing_with_no_memory() and test_memory_error_in_PyErr_PrintEx() if Python is built with Py_TRACE_REFS. * test_repl skips test_no_memory(). * test_capi skisp test_set_nomemory().
* Document Python build requirements (#108646)Victor Stinner2023-08-301-5/+22
| | | | Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Fix misc doc typos (#108592)xzmeng2023-08-291-2/+2
|
* gh-108223: Document --disable-gil flag in configure (#108236)Sam Gross2023-08-211-0/+9
|
* gh-107298: Fix some references in the C API documentation (GH-108072)Serhiy Storchaka2023-08-171-2/+2
|
* GH-92584: Remove references to Distutils in configure.rst (#108043)Adam Turner2023-08-161-11/+6
| | | Remove references to Distutils in configure.rst
* GH-92584: Remove Installing Python Modules (Distutils version) (#108020)Adam Turner2023-08-161-1/+1
|
* GH-92584: Remove references to Distutils in ``PYTHONUSERBASE`` (#108040)Adam Turner2023-08-161-2/+2
| | | Remove references to Distutils in ``PYTHONUSERBASE``
* GH-92584: Redirect macOS package installation to the PPUG (#108044)Adam Turner2023-08-161-6/+2
|
* GH-92584: Remove reference to Distutils in ``cx_Freeze``'s description (#108047)Adam Turner2023-08-161-2/+2
| | | Remove reference to Distutils in ``cx_Freeze``'s description