Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 uid=1(daemon) gid=1(daemon) grupos=1(daemon) Safe-mode: OFF (not secure) /usr/share/doc/python3/python-policy.html/ drwxr-xr-x | |
| Viewing file: Select action/file-type: Table of Contents
The goal of these policies is to reduce the work necessary for
Python transitions. Python modules are internally very dependent on
a specific Python version. However, we want to automate recompiling
modules when possible, either during the upgrade itself
(re-compiling bytecode files There are two kinds of Python modules, "pure" Python modules, and extension modules. Pure Python modules are Python source code that generally works across many versions of Python. Extensions are C code compiled and linked against a specific version of the Python runtime, and so can only be used by one version of Python.
Debian Python does not link extensions to Python packages are a way of structuring Python’s module namespace by using “dotted module names”. See Python's glossary for details on how packages are defined in Python terms (a package in the Python sense is unrelated to a Debian package). Python packages must be packaged into the same directory (as done by upstream). Splitting components of a package across directories changes the import order and may confuse documentation tools and IDEs.
There are two ways to distribute Python modules. Public modules
are installed in a public directory as listed in Section 2.5, “Module Path”.
They are accessible to any program. Private modules are installed
in a private directory such
as
PEP 427
defines a built-package format called "wheels", which is a Zip
format archive containing Python code and
a
Except as described below, packages must not build or provide
wheels. They are redundant to the established way of providing
Python libraries to Debian users, take no advantage of
distro-based tools, and are less convenient to use. E.g. they must
be explicitly added to
A very limited set of wheel packages are available in the archive,
but these support the narrow purpose of enabling
the
When these binary packages are installed, Public Python modules must be packages separately by major Python version, to preserve run time separation between Python 2 and Python 3.
Public Python 3 modules used by other packages must have their
binary package name prefixed with
The binary package for module
For subpackages such as Such a package should support the current Debian Python version, and more if possible (there are several tools to help implement this, see Appendix B, Packaging Tools). For example, if Python 3.3, 3.4, and 3.5 are supported, the Python statement import foo
should import the module when the program interpreter is any
of
Packages intended for use with Django (
The
The optional
Similarly, the optional fields These fields are used by some packaging scripts to automatically generate appropriate Depends and Provides lines. The format of the field may be one of the following: X-Python3-Version: >= X.Y X-Python3-Version: >= A.B, << X.Y XS-Python-Version: A.B, X.Y XS-Python-Version: all
The keyword
A comma-separated list of multiple individual versions
(e.g.
The keyword
The use of Any package that installs modules for the default Python version (or many versions including the default) as described in Section 3.3, “Module Package Names”, must declare a dependency on the default Python runtime package. If it requires other modules to work, the package must declare dependencies on the corresponding packaged modules. The package must not declare dependency on any version-specific Python runtime or module package.
For Python 3, the correct dependencies are
For Python 2, the correct dependencies are
Any package that installs Python modules or Python 3 binary
extensions must also declare a maximum version it supports as
currently built. This is accomplished by declaring a maximum
version constraint strictly less than one higher than the current
maximum version, i.e.
Binary packages that declare Provides dependencies of the form
If a binary package provides any binary-independent modules
( A binary package should only byte-compile the files which belong to the package.
The file Pure Python modules in private installation directories that are byte-compiled with the default Python version must be forcefully byte-compiled again when the default Python version changes. Public Python extensions should be bin-NMUed.
Private Python extensions should be subject to binary NMUs every
time the default interpreter changes, unless the extension is
updated through a |
:: Command execute :: | |
--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.5442 ]-- |