Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Doc/c-api/long.rst
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ Export API
.. versionadded:: 3.14
.. c:struct:: PyLongLayout
.. c:type:: PyLongLayout
Layout of an array of "digits" ("limbs" in the GMP terminology), used to
represent absolute value for arbitrary precision integers.
Expand Down Expand Up @@ -727,15 +727,15 @@ Export API
Get the native layout of Python :class:`int` objects.
See the :c:struct:`PyLongLayout` structure.
See the :c:type:`PyLongLayout` structure.
The function must not be called before Python initialization nor after
Python finalization. The returned layout is valid until Python is
finalized. The layout is the same for all Python sub-interpreters
in a process, and so it can be cached.
.. c:struct:: PyLongExport
.. c:type:: PyLongExport
Export of a Python :class:`int` object.
Expand Down Expand Up @@ -769,7 +769,7 @@ Export API
Export a Python :class:`int` object.
*export_long* must point to a :c:struct:`PyLongExport` structure allocated
*export_long* must point to a :c:type:`PyLongExport` structure allocated
by the caller. It must not be ``NULL``.
On success, fill in *\*export_long* and return ``0``.
Expand Down Expand Up @@ -799,7 +799,7 @@ The :c:type:`PyLongWriter` API can be used to import an integer.
.. versionadded:: 3.14
.. c:struct:: PyLongWriter
.. c:type:: PyLongWriter
A Python :class:`int` writer instance.
Expand Down Expand Up @@ -827,7 +827,7 @@ The :c:type:`PyLongWriter` API can be used to import an integer.
The layout of *digits* is described by :c:func:`PyLong_GetNativeLayout`.
Digits must be in the range [``0``; ``(1 << bits_per_digit) - 1``]
(where the :c:struct:`~PyLongLayout.bits_per_digit` is the number of bits
(where the :c:type:`~PyLongLayout.bits_per_digit` is the number of bits
per digit).
Any unused most significant digits must be set to ``0``.
Expand Down
9 changes: 9 additions & 0 deletions Doc/data/stable_abi.dat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 21 additions & 13 deletions Doc/using/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ is also an unambiguous ``pymanager`` command. Scripted installs that are
intending to use Python install manager should consider using ``pymanager``, due
to the lower chance of encountering a conflict with existing installs. The only
difference between the two commands is when running without any arguments:
``py`` will install and launch your default interpreter, while ``pymanager``
will display help (``pymanager exec ...`` provides equivalent behaviour to
``py ...``).
``py`` will launch your default interpreter, while ``pymanager`` will display
help (``pymanager exec ...`` provides equivalent behaviour to ``py ...``).

Each of these commands also has a windowed version that avoids creating a
console window. These are ``pyw``, ``pythonw`` and ``pymanagerw``. A ``python3``
Expand Down Expand Up @@ -187,12 +186,11 @@ that virtual environment. In this scenario, the ``python`` command was likely
already overridden and none of these checks occurred. However, this behaviour
ensures that the ``py`` command can be used interchangeably.

When you launch either ``python`` or ``py`` but do not have any runtimes
installed, and the requested version is the default, it will be installed
automatically and then launched. Otherwise, the requested version will be
installed if automatic installation is configured (most likely by setting
``PYTHON_MANAGER_AUTOMATIC_INSTALL`` to ``true``), or if the ``py exec`` or
``pymanager exec`` forms of the command were used.
When no runtimes are installed, any launch command will try to install the
requested version and launch it. However, after any version is installed, only
the ``py exec ...`` and ``pymanager exec ...`` commands will install if the
requested version is absent. Other forms of commands will display an error and
direct you to use ``py install`` first.


Command help
Expand Down Expand Up @@ -301,6 +299,14 @@ To launch the runtime, directly execute the main executable (typically

$> py install ... [-t=|--target=<PATH>] <TAG>

The ``py exec`` command will install the requested runtime if it is not already
present. This is controlled by the ``automatic_install`` configuration
(:envvar:`PYTHON_MANAGER_AUTOMATIC_INSTALL`), and is enabled by default.
If no runtimes are available at all, all launch commands will do an automatic
install if the configuration setting allows. This is to ensure a good experience
for new users, but should not generally be relied on rather than using the
``py exec`` command or explicit install commands.


.. _pymanager-offline:

Expand Down Expand Up @@ -426,9 +432,11 @@ customization.
By default, :file:`%TEMP%`.

* - ``automatic_install``
- ``PYTHON_MANAGER_AUTOMATIC_INSTALL``
- True to allow automatic installs when using ``py exec`` to launch.
Other commands will not automatically install.
- .. envvar:: PYTHON_MANAGER_AUTOMATIC_INSTALL
- True to allow automatic installs when using ``py exec`` to launch (or
``py`` when no runtimes are installed yet).
Other commands will not automatically install, regardless of this
setting.
By default, true.

* - ``include_unmanaged``
Expand Down Expand Up @@ -777,7 +785,7 @@ Troubleshooting

If your Python install manager does not seem to be working correctly, please
work through these tests and fixes to see if it helps. If not, please report an
issue at `our bug tracker <https://github.com/python/cpython/issues>`_,
issue at `our bug tracker <https://github.com/python/pymanager/issues>`_,
including any relevant log files (written to your :file:`%TEMP%` directory by
default).

Expand Down
39 changes: 0 additions & 39 deletions Include/cpython/longintrepr.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,45 +138,6 @@ _PyLong_CompactValue(const PyLongObject *op)

#define PyUnstable_Long_CompactValue _PyLong_CompactValue


/* --- Import/Export API -------------------------------------------------- */

typedef struct PyLongLayout {
uint8_t bits_per_digit;
uint8_t digit_size;
int8_t digits_order;
int8_t digit_endianness;
} PyLongLayout;

PyAPI_FUNC(const PyLongLayout*) PyLong_GetNativeLayout(void);

typedef struct PyLongExport {
int64_t value;
uint8_t negative;
Py_ssize_t ndigits;
const void *digits;
// Member used internally, must not be used for other purpose.
Py_uintptr_t _reserved;
} PyLongExport;

PyAPI_FUNC(int) PyLong_Export(
PyObject *obj,
PyLongExport *export_long);
PyAPI_FUNC(void) PyLong_FreeExport(
PyLongExport *export_long);


/* --- PyLongWriter API --------------------------------------------------- */

typedef struct PyLongWriter PyLongWriter;

PyAPI_FUNC(PyLongWriter*) PyLongWriter_Create(
int negative,
Py_ssize_t ndigits,
void **digits);
PyAPI_FUNC(PyObject*) PyLongWriter_Finish(PyLongWriter *writer);
PyAPI_FUNC(void) PyLongWriter_Discard(PyLongWriter *writer);

#ifdef __cplusplus
}
#endif
Expand Down
Loading
Loading