diff --git a/python-2.5.1-codec-ascii-tolower.patch b/python-2.5.1-codec-ascii-tolower.patch new file mode 100644 index 0000000..81a123d --- /dev/null +++ b/python-2.5.1-codec-ascii-tolower.patch @@ -0,0 +1,25 @@ +diff -rup Python-2.5.1-orig/Python/codecs.c Python-2.5.1/Python/codecs.c +--- Python-2.5.1-orig/Python/codecs.c 2006-06-23 17:16:18.000000000 -0400 ++++ Python-2.5.1/Python/codecs.c 2007-10-30 12:51:10.000000000 -0400 +@@ -45,6 +45,11 @@ int PyCodec_Register(PyObject *search_fu + return -1; + } + ++/* isupper() forced into the ASCII Locale */ ++#define ascii_isupper(x) (((x) >= 0x41) && ((x) <= 0x5A)) ++/* tolower() forced into the ASCII Locale */ ++#define ascii_tolower(x) (ascii_isupper(x) ? ((x) + 0x20) : (x)) ++ + /* Convert a string to a normalized Python string: all characters are + converted to lower case, spaces are replaced with underscores. */ + +@@ -70,7 +75,7 @@ PyObject *normalizestring(const char *st + if (ch == ' ') + ch = '-'; + else +- ch = tolower(Py_CHARMASK(ch)); ++ ch = ascii_tolower(Py_CHARMASK(ch)); + p[i] = ch; + } + return v; +Only in Python-2.5.1/Python: codecs.c~ diff --git a/python-2.5.1-pysqlite.patch b/python-2.5.1-pysqlite.patch new file mode 100644 index 0000000..ce4f936 --- /dev/null +++ b/python-2.5.1-pysqlite.patch @@ -0,0 +1,33 @@ +diff -up Python-2.5.1/Modules/_sqlite/cache.h.pysqlite Python-2.5.1/Modules/_sqlite/cache.h +--- Python-2.5.1/Modules/_sqlite/cache.h.pysqlite 2006-04-23 16:24:26.000000000 +0100 ++++ Python-2.5.1/Modules/_sqlite/cache.h 2007-10-25 11:21:31.000000000 +0100 +@@ -64,7 +64,7 @@ extern PyTypeObject CacheType; + int node_init(Node* self, PyObject* args, PyObject* kwargs); + void node_dealloc(Node* self); + +-int cache_init(Cache* self, PyObject* args, PyObject* kwargs); ++int pysqlite_cache_init(Cache* self, PyObject* args, PyObject* kwargs); + void cache_dealloc(Cache* self); + PyObject* cache_get(Cache* self, PyObject* args); + +diff -up Python-2.5.1/Modules/_sqlite/cache.c.pysqlite Python-2.5.1/Modules/_sqlite/cache.c +--- Python-2.5.1/Modules/_sqlite/cache.c.pysqlite 2006-04-23 16:24:26.000000000 +0100 ++++ Python-2.5.1/Modules/_sqlite/cache.c 2007-10-25 11:22:10.000000000 +0100 +@@ -54,7 +54,7 @@ void node_dealloc(Node* self) + self->ob_type->tp_free((PyObject*)self); + } + +-int cache_init(Cache* self, PyObject* args, PyObject* kwargs) ++int pysqlite_cache_init(Cache* self, PyObject* args, PyObject* kwargs) + { + PyObject* factory; + int size = 10; +@@ -352,7 +352,7 @@ PyTypeObject CacheType = { + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ +- (initproc)cache_init, /* tp_init */ ++ (initproc)pysqlite_cache_init, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0 /* tp_free */ diff --git a/python.spec b/python.spec index 9d66803..2be13ed 100644 --- a/python.spec +++ b/python.spec @@ -20,7 +20,7 @@ Summary: An interpreted, interactive, object-oriented programming language. Name: %{python} Version: 2.5.1 -Release: 14%{?dist} +Release: 15%{?dist} License: Python Software Foundation License v2 Group: Development/Languages Provides: python-abi = %{pybasever} @@ -38,6 +38,8 @@ Patch7: python-2.5.1-sqlite-encoding.patch Patch8: python-2.5-xmlrpclib-marshal-objects.patch Patch9: python-2.5-tkinter.patch Patch10: python-2.5.1-binutils-no-dep.patch +Patch11: python-2.5.1-codec-ascii-tolower.patch +Patch12: python-2.5.1-pysqlite.patch # upstreamed @@ -185,6 +187,8 @@ user interface for Python programming. %patch9 -p1 -b .tkinter %patch10 -p1 -b .binutils-no-dep +%patch11 -p1 -b .ascii-tolower +%patch12 -p1 -b .pysqlite-2.3.3-minimal %ifarch alpha ia64 # 64bit, but not lib64 arches need this too... @@ -439,6 +443,12 @@ rm -fr $RPM_BUILD_ROOT %{_libdir}/python%{pybasever}/lib-dynload/_tkinter.so %changelog +* Tue Oct 30 2007 James Antill - 2.5.1-15 +- Do codec lowercase in C Locale. +- Resolves: 207134 191096 +- Fix stupid namespacing in pysqlite, minimal upgrade to 2.3.3 pysqlite +- Resolves: 263221 + * Wed Oct 24 2007 James Antill - 2.5.1-14 - Remove bintuils dep. for live CD ... add work around for ctypes