summaryrefslogtreecommitdiffstats
path: root/Doc/using
Commit message (Collapse)AuthorAgeFilesLines
* 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
* gh-106909: Use role :const: for referencing module constants (GH-106910)Serhiy Storchaka2023-07-211-2/+2
|
* gh-106892: Use roles :data: and :const: for referencing module variables ↵Serhiy Storchaka2023-07-211-1/+1
| | | | (GH-106894)
* gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920)Serhiy Storchaka2023-07-211-4/+4
|
* gh-106232: Make timeit doc command lines compatible with Windows. (#106296)Terry Jan Reedy2023-07-011-1/+1
| | | | | | Command Prompt (CMD Shell) and older versions of PowerShell require double quotes and single quotes inside the string. This form also works on linux and macOS.
* gh-105145: Remove old functions to config Python init (#105154)Victor Stinner2023-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the following old functions to configure the Python initialization, deprecated in Python 3.11: * PySys_AddWarnOptionUnicode() * PySys_AddWarnOption() * PySys_AddXOption() * PySys_HasWarnOptions() * PySys_SetArgvEx() * PySys_SetArgv() * PySys_SetPath() * Py_SetPath() * Py_SetProgramName() * Py_SetPythonHome() * Py_SetStandardStreamEncoding() * _Py_SetProgramFullPath() Most of these functions are kept in the stable ABI, except: * Py_SetStandardStreamEncoding() * _Py_SetProgramFullPath() Update Doc/extending/embedding.rst and Doc/extending/extending.rst to use the new PyConfig API. _testembed.c: * check_stdio_details() now sets stdio_encoding and stdio_errors of PyConfig. * Add definitions of functions removed from the API but kept in the stable ABI. * test_init_from_config() and test_init_read_set() now use PyConfig_SetString() instead of PyConfig_SetBytesString(). Remove _Py_ClearStandardStreamEncoding() internal function.
* gh-101282: Apply BOLT optimizations to libpython for shared builds (#104709)Gregory Szorc2023-05-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply BOLT optimizations to libpython for shared builds. Most of the C code is in libpython so it is critical to apply BOLT there fully realize BOLT benefits. This change also reworks how BOLT instrumentation is applied. It effectively removes the readelf based logic added in gh-101525 and replaces it with a mechanism that saves a copy of the pre-bolt binary and restores that copy when necessary. This allows us to perform BOLT optimizations without having to manually delete the output binary to force a new bolt run. Also: - add a clean-bolt target for purging BOLT files and hook that up to the clean target - .gitignore BOLT related files Before and after this refactor, `make` will no-op after a previous run. Both versions should also share common make DAG deficiencies where targets fail to trigger as often as they need to or can trigger prematurely in certain scenarios. e.g. after this change you may need to `rm profile-bolt-stamp` to force a BOLT run because there aren't appropriate non-phony targets for BOLT's make target to depend on. To make it easier to iterate on custom BOLT settings, the flags to pass to instrumentation and application are now defined in configure and can be overridden by passing BOLT_INSTRUMENT_FLAGS and BOLT_APPLY_FLAGS.
* Replace "OS X" with "macOS" (#104653)partev2023-05-201-2/+2
|
* GH-103484: Fix redirected permanently URLs (#104001)Rafael Fontenelle2023-05-023-3/+3
| | | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
* DOC: remove reference to OpenSolaris (#102671)partev2023-04-251-7/+0
|
* Change 'dependant' to 'dependent' (#103745)Christopher Chavez2023-04-241-1/+1
| | | | The word 'dependent' is both an adjective and a noun. A 'dependant' is a British alternative spelling for the noun form. In idlelib.sidebar, 'OS-dependant' is an adjective and clearly wrong. In 'Using', 'dependant' as a noun would be acceptable in Britain, but we use American spellings in Python docs. https://www.merriam-webster.com/words-at-play/spelling-variants-dependent-vs-dependant
* gh-95299: Stop installing setuptools as a part of ensurepip and venv (#101039)Pradyun Gedam2023-04-181-2/+5
| | | | | | | Remove the bundled setuptools wheel from ensurepip, and stop installing setuptools in environments created by venv. Co-Authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* GH-83893: Cross reference env. vars and -X command line options (GH-103414)Furkan Onder2023-04-121-6/+12
| | | Co-authored-by: Erlend E. Aasland
* gh-101100: Documenting --prefix and --exec-prefix. (GH-102695)Julien Palard2023-03-152-1/+17
| | | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-102354: change python3 to python in docs examples (#102696)Paul Watson2023-03-141-1/+1
|
* gh-96821: Add config option `--with-strict-overflow` (#96823)Matthias Görgens2023-03-041-0/+5
| | | | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Shantanu <hauntsaninja@gmail.com>
* gh-101467: Correct py.exe handling of prefix matches and cases when only one ↵Steve Dower2023-02-011-5/+30
| | | | runtime is installed (GH-101468)
* Fix trivial typo in shebang example (GH-101385)socal-nerdtastic2023-01-281-1/+1
| | | The example was showing the current version, but should be pinned to 3.7 to match the example command.
* gh-100247: Improve documentation for custom shebang commands in py.exe ↵Steve Dower2023-01-161-4/+5
| | | | launcher (GH-101083)
* gh-100247: Fix py.exe launcher not using entire shebang command for finding ↵Steve Dower2023-01-131-12/+27
| | | | custom commands (GH-100944)
* gh-100540: Remove obsolete '--with-system-ffi' configure option (GH-100544)Zachary Ware2022-12-281-5/+0
| | | | | It has had no effect on non-macOS platforms for a long time, and has had the non-obvious effect of invoking `pkg_config` and not setting `-DUSING_APPLE_OS_LIBFFI` on macOS since GH-22855.
* gh-100008: VS 2017 is required since Python 3.11 (#100045)Victor Stinner2022-12-061-0/+1
|
* gh-100008: Document Python build requirements (#100009)Victor Stinner2022-12-051-0/+46
| | | | Document also configure --without-freelists option added to Python 3.11.
* gh-99289: Add COMPILEALL_OPTS to Makefile (#99291)Victor Stinner2022-11-141-0/+7
| | | | | | | | Add COMPILEALL_OPTS variable in Makefile to override compileall options (default: -j0) in "make install". Also merge the compileall commands into a single command building PYC files for the all optimization levels (0, 1, 2) at once. Co-authored-by: Gregory P. Smith <greg@krypto.org>
* Support comparing two sets of pystats (GH-98816)Michael Droettboom2022-11-041-1/+2
| | | | | | | | | | This adds support for comparing pystats collected from two different builds. - The `--json-output` can be used to load in a set of raw stats and output a JSON file. - Two of these JSON files can be provided on the next run, and then comparative results between the two are output.
* gh-98692: Enable treating shebang lines as executables in py.exe launcher ↵Steve Dower2022-10-311-1/+7
| | | | (GH-98732)
* gh-96143: Improve perf profiler docs (#96445)Erlend E. Aasland2022-10-271-7/+10
|
* docs: Change links to label refs (#98454)Stanley2022-10-261-2/+2
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* [doc] Refresh the venv introduction documentation, and correct the statement ↵Phil Elson2022-10-191-42/+0
| | | | | about VIRTUAL_ENV (GH-98350) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Docs: Fix backtick errors found by sphinx-lint (#97998)Hugo van Kemenade2022-10-073-9/+9
| | | Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* Remove extra spaces in custom openSSL documentation. (#93568)Xiao Chen2022-10-071-10/+10
|
* gh-97754: Update doc for default location of per-user installs on Windows ↵Ben Faulhaber2022-10-041-3/+6
| | | | (GH-97756)
* gh-96959: Update more HTTP links (GH-97536)Serhiy Storchaka2022-09-271-1/+1
| | | | Use HTTPS for documents which are available by both HTTP and HTTPS links, but there is no redirection from HTTP to HTTPS or vice versa.
* gh-96512: Update int_max_str docs to say 3.11 (#96942)Gregory P. Smith2022-09-191-2/+2
| | | | It was unknown if it'd be before 3.11.0 when creating the original changes. It's in 3.11rc2, so 3.11 it is.