summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-04-13 17:44:51 (GMT)
committerFred Drake <fdrake@acm.org>2000-04-13 17:44:51 (GMT)
commit93a20bf87c22d54353568f3a411ed11b2638134e (patch)
treefd0ee30394f4468874b9c5c32406bcf7be9f7fba /Python/sysmodule.c
parent4d65d73686fa535c2f4ce4047f82bf0d7255d46c (diff)
downloadcpython-93a20bf87c22d54353568f3a411ed11b2638134e.zip
cpython-93a20bf87c22d54353568f3a411ed11b2638134e.tar.gz
cpython-93a20bf87c22d54353568f3a411ed11b2638134e.tar.bz2
Capitulate, changing version_info to a 5-tuple:
major, minor, micro, level, serial Values are now monotonically increasing with each new release.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index cf9fea5..e7c0d48 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -408,21 +408,27 @@ _PySys_Init()
PyDict_SetItemString(sysdict, "hexversion",
v = PyInt_FromLong(PY_VERSION_HEX));
Py_XDECREF(v);
+ /*
+ * These release level checks are mutually exclusive and cover
+ * the field, so don't get too fancy with the pre-processor!
+ */
+#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_ALPHA
+ v = PyString_FromString("alpha");
+#endif
+#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_BETA
+ v = PyString_FromString("beta");
+#endif
+#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_GAMMA
+ v = PyString_FromString("candidate");
+#endif
#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_FINAL
- v = PyString_FromStringAndSize(NULL, 0);
-#else
- {
- char buff[3];
- buff[0] = PY_RELEASE_LEVEL - PY_RELEASE_LEVEL_ALPHA + 'a';
- buff[1] = PY_RELEASE_SERIAL + '0';
- buff[2] = '\0';
- v = PyString_FromString(buff);
- }
-#endif /* PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_FINAL */
+ v = PyString_FromString("final");
+#endif
PyDict_SetItemString(sysdict, "version_info",
- v = Py_BuildValue("iiiN", PY_MAJOR_VERSION,
+ v = Py_BuildValue("iiiNi", PY_MAJOR_VERSION,
PY_MINOR_VERSION,
- PY_MICRO_VERSION, v));
+ PY_MICRO_VERSION, v,
+ PY_RELEASE_SERIAL));
Py_XDECREF(v);
PyDict_SetItemString(sysdict, "copyright",
v = PyString_FromString(Py_GetCopyright()));
is-for-threads&id=9e7cf970a730549348fd22a0921ea0ed2e894a69'>doc/user/alias.xml74
-rw-r--r--doc/user/ant.in52
-rw-r--r--doc/user/build-install.in709
-rw-r--r--doc/user/builders-built-in.in950
-rw-r--r--doc/user/builders-built-in.xml105
-rw-r--r--doc/user/builders-commands.in156
-rw-r--r--doc/user/builders-commands.xml40
-rw-r--r--doc/user/builders-writing.in1108
-rw-r--r--doc/user/builders-writing.xml284
-rw-r--r--doc/user/builders.in57
-rw-r--r--doc/user/caching.in502
-rw-r--r--doc/user/caching.xml144
-rw-r--r--doc/user/command-line.in2345
-rw-r--r--doc/user/command-line.xml824
-rw-r--r--doc/user/copyright.in32
-rw-r--r--doc/user/depends.in1872
-rw-r--r--doc/user/depends.xml536
-rw-r--r--doc/user/environments.in1752
-rw-r--r--doc/user/environments.xml392
-rw-r--r--doc/user/errors.in41
-rw-r--r--doc/user/example.in41
-rw-r--r--doc/user/factories.in507
-rw-r--r--doc/user/factories.xml209
-rw-r--r--doc/user/file-removal.in223
-rw-r--r--doc/user/file-removal.xml91
-rw-r--r--doc/user/functions.in38
-rw-r--r--doc/user/gettext.in351
-rw-r--r--doc/user/gettext.xml51
-rw-r--r--doc/user/hierarchy.in794
-rw-r--r--doc/user/hierarchy.xml214
-rw-r--r--doc/user/install.in247
-rw-r--r--doc/user/install.xml136
-rw-r--r--doc/user/java.in657
-rw-r--r--doc/user/java.xml366
-rw-r--r--doc/user/less-simple.in623
-rw-r--r--doc/user/less-simple.xml171
-rw-r--r--doc/user/libraries.in445
-rw-r--r--doc/user/libraries.xml193
-rw-r--r--doc/user/main.in411
-rw-r--r--doc/user/make.in121
-rw-r--r--doc/user/mergeflags.in137
-rw-r--r--doc/user/mergeflags.xml45
-rw-r--r--doc/user/misc.in606
-rw-r--r--doc/user/misc.xml221
-rw-r--r--doc/user/nodes.in431
-rw-r--r--doc/user/nodes.xml117
-rw-r--r--doc/user/output.in681
-rw-r--r--doc/user/output.xml138
-rw-r--r--doc/user/parseconfig.in140
-rw-r--r--doc/user/parseconfig.xml12
-rw-r--r--doc/user/parseflags.in176
-rw-r--r--doc/user/parseflags.xml92
-rw-r--r--doc/user/preface.in426
-rw-r--r--doc/user/python.in154
-rw-r--r--doc/user/repositories.in641
-rw-r--r--doc/user/repositories.xml160
-rw-r--r--doc/user/run.in375
-rw-r--r--doc/user/scanners.in392
-rw-r--r--doc/user/scanners.xml26
-rw-r--r--doc/user/sconf.in486
-rw-r--r--doc/user/sconf.xml54
-rw-r--r--doc/user/separate.in540
-rw-r--r--doc/user/separate.xml150
-rw-r--r--doc/user/sideeffect.in216
-rw-r--r--doc/user/sideeffect.xml37
-rw-r--r--doc/user/simple.in517
-rw-r--r--doc/user/simple.xml194
-rw-r--r--doc/user/sourcecode.in162
-rw-r--r--doc/user/sourcecode.xml71
-rw-r--r--doc/user/tasks.in146
-rw-r--r--doc/user/tasks.xml39
-rw-r--r--doc/user/tools.in38
-rw-r--r--doc/user/troubleshoot.in914
-rw-r--r--doc/user/troubleshoot.xml798
-rw-r--r--doc/user/variables.in56
-rw-r--r--doc/user/variants.in151
-rw-r--r--doc/user/variants.xml64
82 files changed, 3241 insertions, 24918 deletions
diff --git a/doc/user/actions.in b/doc/user/actions.in
deleted file mode 100644