Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8e790e70
Commit
8e790e70
authored
Sep 03, 2002
by
Skip Montanaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expose PYTHON_API_VERSION macro as sys.api_version. Closes patch # 601456.
parent
f62a89b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
Doc/lib/libsys.tex
Doc/lib/libsys.tex
+6
-0
Misc/NEWS
Misc/NEWS
+4
-0
Python/sysmodule.c
Python/sysmodule.c
+3
-0
No files found.
Doc/lib/libsys.tex
View file @
8e790e70
...
@@ -459,6 +459,12 @@ else:
...
@@ -459,6 +459,12 @@ else:
\end{verbatim}
\end{verbatim}
\end{datadesc}
\end{datadesc}
\begin{datadesc}
{
api
_
version
}
The C API version for this interpreter. Programmers may find this useful
when debugging version conflicts between Python and extension
modules.
\versionadded
{
2.3
}
\end{datadesc}
\begin{datadesc}
{
version
_
info
}
\begin{datadesc}
{
version
_
info
}
A tuple containing the five components of the version number:
A tuple containing the five components of the version number:
\var
{
major
}
,
\var
{
minor
}
,
\var
{
micro
}
,
\var
{
releaselevel
}
, and
\var
{
major
}
,
\var
{
minor
}
,
\var
{
micro
}
,
\var
{
releaselevel
}
, and
...
...
Misc/NEWS
View file @
8e790e70
...
@@ -303,6 +303,10 @@ Extension modules
...
@@ -303,6 +303,10 @@ Extension modules
- signal.sigpending, signal.sigprocmask and signal.sigsuspend have
- signal.sigpending, signal.sigprocmask and signal.sigsuspend have
been added where available.
been added where available.
- The sys module acquired a new attribute, api_version, which evaluates
to the value of the PYTHON_API_VERSION macro with which the
interpreter was compiled.
Library
Library
- New module: sets, defines the class Set that implements a mutable
- New module: sets, defines the class Set that implements a mutable
...
...
Python/sysmodule.c
View file @
8e790e70
...
@@ -793,6 +793,9 @@ _PySys_Init(void)
...
@@ -793,6 +793,9 @@ _PySys_Init(void)
PY_MICRO_VERSION
,
s
,
PY_MICRO_VERSION
,
s
,
PY_RELEASE_SERIAL
));
PY_RELEASE_SERIAL
));
Py_XDECREF
(
v
);
Py_XDECREF
(
v
);
PyDict_SetItemString
(
sysdict
,
"api_version"
,
v
=
PyInt_FromLong
(
PYTHON_API_VERSION
));
Py_XDECREF
(
v
);
PyDict_SetItemString
(
sysdict
,
"copyright"
,
PyDict_SetItemString
(
sysdict
,
"copyright"
,
v
=
PyString_FromString
(
Py_GetCopyright
()));
v
=
PyString_FromString
(
Py_GetCopyright
()));
Py_XDECREF
(
v
);
Py_XDECREF
(
v
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment