Commit Graph

26944 Commits

Author SHA1 Message Date
Barry Warsaw a1ce93f87c From http://mail.python.org/pipermail/i18n-sig/2003-April/001557.html
- Expose NullTranslations and GNUTranslations to __all__

- Set the default charset to iso-8859-1.  It used to be None, which
would cause problems with .ugettext() if the file had no charset
parameter.  Arguably, the po/mo file would be broken, but I still think
iso-8859-1 is a reasonable default.

- Add a "coerce" default argument to GNUTranslations's constructor.  The
reason for this is that in Zope, we want all msgids and msgstrs to be
Unicode.  For the latter, we could use .ugettext() but there isn't
currently a mechanism for Unicode-ifying msgids.

The plan then is that the charset parameter specifies the encoding for
both the msgids and msgstrs, and both are decoded to Unicode when read.
For example, we might encode po files with utf-8. I think the GNU
gettext tools don't care.

Since this could potentially break code [*] that wants to use the
encoded interface .gettext(), the constructor flag is added, defaulting
to False.  Most code I suspect will want to set this to True and use
.ugettext().

- A few other minor changes from the Zope project, including asserting
that a zero-length msgid must have a Project-ID-Version header for it to
be counted as the metadata record.
2003-04-11 18:36:43 +00:00
Jack Jansen de354b74f0 Added a note that the Mac OSA modules are documented. 2003-04-11 15:37:20 +00:00
Neal Norwitz 7f2588c073 SF patch #706707, time.tzset standards compliance update by Stuart Bishop
Update configure and test to use proper timezone specifications
2003-04-11 15:35:53 +00:00
Jack Jansen bae5c965e8 Moved all the scripting stuff to a separate section, added all the
missing bits (well, all the bits I could think of) and updated the
rest.
2003-04-11 15:35:28 +00:00
Fred Drake 126f2b76b9 Avoid creating one of the TestSuite objects. 2003-04-11 15:14:05 +00:00
Neal Norwitz 4ec6824896 Fix test_tarfile failure when gzip is not available
The module would exist, but be empty if already imported.
This change ensures we have gzip available.
2003-04-11 03:05:56 +00:00
Neal Norwitz ffe33b7f24 Attempt to make all the various string *strip methods the same.
* Doc - add doc for when functions were added
 * UserString
 * string object methods
 * string module functions
'chars' is used for the last parameter everywhere.

These changes will be backported, since part of the changes
have already been made, but they were inconsistent.
2003-04-10 22:35:32 +00:00
Neal Norwitz 5c16c7b014 Move declaration of enc to scope where it is used 2003-04-10 21:53:14 +00:00
Neal Norwitz 4efd91713b Add a space after expression to be consistent 2003-04-10 21:51:29 +00:00
Guido van Rossum 6b3fffaf99 PyErr_NormalizeException(): in the type==NULL test, we should simply
return.  Setting an exception can mess with the exception state, and
continuing is definitely wrong (since type is dereferenced later on).
Some code that calls this seems to be prepared for a NULL exception
type, so let's be safe rather than sorry and simply assume there's
nothing to normalize in this case.
2003-04-10 20:29:48 +00:00
Skip Montanaro 594adac0bf hoist contents of csv submodule up to the package level 2003-04-10 17:16:15 +00:00
Raymond Hettinger 502168a86e SF patch #718867: Fix reference leak for time.strptime
(contributed by Brett Cannon)
2003-04-10 16:03:22 +00:00
Jeremy Hylton 7b5ce7f25a Make Unpickler objects colletable.
Bugfix candidate.
2003-04-09 21:25:30 +00:00
Jeremy Hylton 4cf6319cd2 Make Picklers collectable.
Bug fix candidate.
2003-04-09 21:05:12 +00:00
Jeremy Hylton d06483c2f6 Missing DECREF. 2003-04-09 21:01:42 +00:00
Jason Tishler dcae0dc4ed Patch #718551: cygwinccompiler.get_versions() patch
The cygwinccompiler.get_versions() function only handles versions numbers of
the form "x.y.z".  The attached patch enhances get_versions() to handle "x.y"
too (i.e., the ".z" is optional).

This change causes the unnecessary "--entry _DllMain@12" link option to be
suppressed for recent Cygwin and Mingw toolchains. Additionally, it directs
recent Mingw toolchains to use gcc instead of dllwrap during linking.
2003-04-09 20:13:59 +00:00
Guido van Rossum 11d204ca27 Add test for MessageBeep() 2003-04-09 19:57:06 +00:00
Guido van Rossum f405064ccb - New function winsound.MessageBeep() wraps the Win32 API
MessageBeep().
2003-04-09 19:39:06 +00:00
Guido van Rossum e1252684be Add MessageBeep() API. 2003-04-09 19:38:08 +00:00
Guido van Rossum ed538d8b39 Detabified.
Removed dead code.
2003-04-09 19:36:34 +00:00
Guido van Rossum 2fb9fdc96a Make it possible to call instancemethod() with 2 arguments. 2003-04-09 19:35:08 +00:00
Guido van Rossum a7132189d2 Reformat a few docstrings that caused line wraps in help() output. 2003-04-09 19:32:45 +00:00
Guido van Rossum 69c2b88392 Fix two crashes on Windows:
- CHECK_VALID() was checking the wrong value for a closed fd
- fseek(&_iob[fileno], ...) doesn't work for fileno >= 20
2003-04-09 19:31:02 +00:00
Guido van Rossum 21123ab7e5 Various improvements to the way the table is formatted, to deal with
exceptionally large totals etc.
2003-04-09 19:10:46 +00:00
Guido van Rossum a12fe4e81f - New function sys.call_tracing() allows pdb to debug code
recursively.
- pdb has a new command, "debug", which lets you step through
  arbitrary code from the debugger's (pdb) prompt.
2003-04-09 19:06:21 +00:00
Fred Drake 12dd7b12c6 Minor markup adjustments. 2003-04-09 18:15:57 +00:00
Guido van Rossum 6db771871e Try to discourage use of PyObject_Type(). 2003-04-09 18:02:23 +00:00
Guido van Rossum fc29646a2e Don't use (PyObject *)PyObject_Type(x). It is a leaky and verbose way
of saying x->ob_type.
2003-04-09 17:53:22 +00:00
Andrew M. Kuchling a6b1c75b7a Re-indent example; fix typo 2003-04-09 17:26:38 +00:00
Guido van Rossum 00bf8280f5 property_traverse() should also traverse into prop_doc -- there's no
typecheck that guarantees it's a string, and BTW string subclasses
could hide references.
2003-04-09 17:05:33 +00:00
Jason Tishler 70367d3a6c Patch #709178: remove -static option from cygwinccompiler
Currently, the cygwinccompiler.py compiler handling in
distutils is invoking the cygwin and mingw compilers
with the -static option.

Logically, this means that the linker should choose to
link to static libraries instead of shared/dynamically
linked libraries.

Current win32 binutils expect import libraries to have
a .dll.a suffix and static libraries to have .a suffix.
If -static is passed, it will skip the .dll.a
libraries. This is pain if one has a tree with both
static and dynamic libraries using this naming
convention, and wish to use the dynamic libraries.

The -static option being passed in distutils is to get
around a bug in old versions of binutils where it would
get confused when it found the DLLs themselves.

The decision to use static or shared libraries is site
or package specific, and should be left to the setup
script or to command line options.
2003-04-09 16:03:57 +00:00
Jack Jansen d5e0a5a08e Created a minimal MacOSX section. 2003-04-09 15:12:38 +00:00
Jack Jansen 0ae3220736 Detabbed. 2003-04-09 13:25:43 +00:00
Andrew M. Kuchling 058a84f36a Remove the --verify option in favor of the standard -n/--dry-run option 2003-04-09 12:35:51 +00:00
Fred Drake fcd845a7ed Lots of small markup adjustments. 2003-04-09 04:06:37 +00:00
Fred Drake 61a0a73d76 Add dependency information for the hotshot package docs. 2003-04-09 03:25:07 +00:00
Anthony Baxter fda5e27ec9 extra punctuation removed 2003-04-09 03:03:46 +00:00
Fred Drake 567b0a6445 Add dependency information for the timeit module docs. 2003-04-09 02:41:36 +00:00
Skip Montanaro d6e9fe386a + libtimeit 2003-04-09 01:39:06 +00:00
Skip Montanaro ca652746ff doc for timeit module/script - mostly just a recast of Tim's docstring 2003-04-09 01:38:53 +00:00
Jeremy Hylton 400d8ee6fa Make staticmethods and classmethods participate in GC.
If a class was defined inside a function, used a static or class
method, and used super() inside the method body, it would be caught in
an uncollectable cycle.  (Simplified version: The static/class method
object would point to a function object with a closure that referred
to the class.)

Bugfix candidate.
2003-04-08 21:28:47 +00:00
Just van Rossum 547eb42d75 tentative fix for #712322: modification time stamp checking failed
when DST began.
2003-04-08 20:07:15 +00:00
Skip Montanaro f2f174f655 install timeit.py as a command line script 2003-04-08 19:50:02 +00:00
Skip Montanaro cfd55501bb add a #! line for unix weenies 2003-04-08 19:49:40 +00:00
Tim Peters 8805e66ec8 New tests identical to boom and boom2, except using new-style classes.
These never failed in 2.3, and the tests confirm it.  They still blow up
in the 2.2 branch, despite that all the gc-vs-__del__ fixes from 2.3
have been backported (and this is expected -- 2.2 needs more work than
2.3 needed).
2003-04-08 19:44:13 +00:00
Skip Montanaro fb2a6ccfc4 correct a couple docstring nits 2003-04-08 19:40:19 +00:00
Tim Peters f995cce4df Typo repair. 2003-04-08 18:47:21 +00:00
Fred Drake 2c2068c4d1 Added example of using positional and keyword args with atexit.register().
Based on a suggestion from a reader.
2003-04-08 17:46:53 +00:00
Fred Drake de7ad2caac Markup fix. 2003-04-08 17:37:47 +00:00
Tim Peters 730f5535ba s/referrents/referents/g. Gotta love that referrers remains rife with rs. 2003-04-08 17:17:17 +00:00