mirror of
https://github.com/python/cpython.git
synced 2025-09-28 03:13:48 +00:00
Remove mention of lib-old, and list more deleted modules
This commit is contained in:
parent
01e3d262ce
commit
f4b066084a
1 changed files with 2 additions and 17 deletions
|
@ -599,6 +599,8 @@ The \member{st_flags} member is also available, if the platform supports it.
|
||||||
|
|
||||||
\item The old \module{regex} and \module{regsub} modules, which have been
|
\item The old \module{regex} and \module{regsub} modules, which have been
|
||||||
deprecated ever since Python 2.0, have finally been deleted.
|
deprecated ever since Python 2.0, have finally been deleted.
|
||||||
|
Other deleted modules: \module{statcache}, \module{tzparse},
|
||||||
|
\module{whrandom}.
|
||||||
|
|
||||||
\item The \file{lib-old} directory,
|
\item The \file{lib-old} directory,
|
||||||
which includes ancient modules such as \module{dircmp} and
|
which includes ancient modules such as \module{dircmp} and
|
||||||
|
@ -744,23 +746,6 @@ changes to your code:
|
||||||
|
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
|
|
||||||
\item Some old deprecated modules (\module{statcache}, \module{tzparse},
|
|
||||||
\module{whrandom}) have been moved to \file{Lib/lib-old}.
|
|
||||||
You can get access to these modules again by adding the directory
|
|
||||||
to your \code{sys.path}:
|
|
||||||
|
|
||||||
\begin{verbatim}
|
|
||||||
import os
|
|
||||||
from distutils import sysconfig
|
|
||||||
|
|
||||||
lib_dir = sysconfig.get_python_lib(standard_lib=True)
|
|
||||||
old_dir = os.path.join(lib_dir, 'lib-old')
|
|
||||||
sys.path.append(old_dir)
|
|
||||||
\end{verbatim}
|
|
||||||
|
|
||||||
Doing so is discouraged, however; it's better to update any code that
|
|
||||||
still uses these modules.
|
|
||||||
|
|
||||||
% the pickle module no longer uses the deprecated bin parameter.
|
% the pickle module no longer uses the deprecated bin parameter.
|
||||||
|
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue