The script was originally used to create the initial set of
codecs (and these were (c) CNRI). While the script itself still
is (c) CNRI, the output certainly isn't anymore.
This change implements the following gettext features, as
discussed recently in python-dev:
In _locale module:
- bind_textdomain_codeset() binding
In gettext module:
- bind_textdomain_codeset() function
- lgettext(), lngettext(), ldgettext(), ldngettext(),
which return translated strings encoded in
preferred system encoding, if
bind_textdomain_codeset() was not used.
- Added equivalent functionality in translate()
function and catalog classes.
Tim Peters [Thu, 22 Jul 2004 01:46:43 +0000 (01:46 +0000)]
SF bug 994255: Py_RETURN_NONE causes too much warnings
Rewrote Py_RETURN_{NONE, TRUE, FALSE} to expand to comma expressions
rather than "do {} while(0)" thingies. The OP complained because he
likes using MS /W4 sometimes, and then all his uses of these things
generate nuisance warnings about testing a constant expression (in
the "while(0)" part). Comma expressions don't have this problem
(although it's a lucky accident that comma expressions suffice for these
macros!).
Fred Drake [Wed, 21 Jul 2004 18:53:06 +0000 (18:53 +0000)]
elaborate package data test to make sure get_outputs() gives the right
results when byte-code compilation is requested (in particular, make
sure that package data doesn't get a bogus byte-code listing
generated)
Tim Peters [Wed, 21 Jul 2004 03:36:52 +0000 (03:36 +0000)]
Thread.__delete: Discussion of internal obscurities belongs in comments
rather than in docstrings. Rewrote so that _active_limbo_lock is released
no matter what happens (it could have been left locked if _sys got None'd
out). Use "in" in preference to has_key() for dict lookup. Don't bother
looking for 'dummy_threading' in sys.modules unless KeyError is raised.
Since the heart of the method is the del, do that in only one place.
Fix bug where a KeyError was raised if -O was being used for the interpreter
and Thread.__delete() was called after a Thread instance was created. Problem
resulted from a currentThread() call in an 'assert' statement being optimized
out and dummy_thread.get_ident() always returning -1 and thus overwriting the
entry for the _MainThread() instance created in 'threading' at import time.
Neil Schemenauer [Mon, 19 Jul 2004 16:29:17 +0000 (16:29 +0000)]
Check the type of values returned by __int__, __float__, __long__,
__oct__, and __hex__. Raise TypeError if an invalid type is
returned. Note that PyNumber_Int and PyNumber_Long can still
return ints or longs. Fixes SF bug #966618.
Tim Peters [Sun, 18 Jul 2004 23:58:17 +0000 (23:58 +0000)]
Record that FCNTL.py has gone away; remove FCNTL hack in tempfile.py;
another hack remains in test___all__.py, but the problem that one
addresses is more general than *just* FCNTL, so leaving it alone.
Tim Peters [Sun, 18 Jul 2004 03:48:47 +0000 (03:48 +0000)]
Teach VC 7.1 about the new cjkcodecs structure. This still doesn't compile
on Windows, because of non-standard code in cjkcodes.h, but it's *almost*
there.
Bring CJKCodecs 1.1 into trunk. This completely reorganizes source
and installed layouts to make maintenance simple and easy. And it
also adds four new codecs; big5hkscs, euc-jis-2004, shift-jis-2004
and iso2022-jp-2004.
Tim Peters [Sun, 18 Jul 2004 00:00:03 +0000 (00:00 +0000)]
The Darwin-specific getproxies_internetconfig() was added to urllib,
causing test_pyclbr to fail on all other platforms. Added that routine
to the urllib "ignore" list.
Removed the special case for "g" in the pickle module. types.py deletes
"g" from its namespace; maybe it didn't always. Whatever, the special
case isn't needed today.
Tim Peters [Sat, 17 Jul 2004 23:44:32 +0000 (23:44 +0000)]
Temporarily add the Tcl/Tk bin directory to PATH, so that test_tcl can
actually run. When it fails, it pops up a dialog box, and the test run
hangs waiting for you to click OK -- that sucks too much to bear.
Change CJK encoding aliases to their most popular variation of
hyphen and underscores in consistency of non-CJK aliases.
(Spotted by Mike Brown at SF #969415)
Tim Peters [Sat, 17 Jul 2004 05:00:52 +0000 (05:00 +0000)]
optimize_code(): Repaired gross error in new special-casing for None.
The preceding case statement was missing a terminating "break" stmt,
so fell into the new code by mistake. This caused uncaught out-of-bounds
accesses to the "names" tuple, leading to a variety of insane behaviors.
Jack Jansen [Thu, 15 Jul 2004 22:28:48 +0000 (22:28 +0000)]
Fix for 838140: don't call NSUnlinkModule when we fail to find our
expected entrypoint. The unlinking will crash the application if the
module contained ObjC code. The price of this is small: a little wasted
memory, and only in a case than isn't expected to occur often.
Jack Jansen [Thu, 15 Jul 2004 22:08:33 +0000 (22:08 +0000)]
After more than two years of puzzlement Jurjen Bos found the reason for
the double-scroll problem: when you pass a tracker function to TrackControl
you shouldn't call your hit function again afterwards. Fixes #711989.
Jack Jansen [Thu, 15 Jul 2004 15:06:07 +0000 (15:06 +0000)]
Allow overriding of bgen pathnames in an optional module bgenlocationcustomize.
Editing of bgenlocations.py isn't easy if your Python was supplied by Apple.