Commit Graph

9303 Commits

Author SHA1 Message Date
Martin v. Löwis b217cd802e Wait for visibility before setting a grab. Fixes #946153. 2004-08-03 18:36:25 +00:00
Fred Drake f901abdd62 allow ctime(), gmtime(), and localtime() to take None as equivalent to an omitted arg
(closes SF bug #658254, patch #663482)
2004-08-03 17:58:55 +00:00
Fred Drake d04573fef0 This allows additional commands to be provided for existing setup.py
scripts without modifying either the distutils installation or the
setup.py scripts of packages with which the new commands will be used.

Specifically, an option is added to distutils that allows additional
packages to be searched for command implementations in addition to
distutils.command.  The additional packages can be specified on the
command line or via the installation or personal configuration files
already loaded by distutils.

For discussion, see the thread starting with:

http://mail.python.org/pipermail/distutils-sig/2004-August/004112.html

This closes SF patch #102241.
2004-08-03 16:37:40 +00:00
Fred Drake 4818748b87 add missing import! 2004-08-03 16:14:13 +00:00
Fred Drake 4354ba3f76 avoid fragility: make sure POSIXLY_CORRECT is completely controlled
for the tests, and restored properly when done
2004-08-03 15:54:45 +00:00
Michael W. Hudson 34fba3b445 Add the same guard as test_signal. 2004-08-03 15:35:29 +00:00
Michael W. Hudson 43220ea26e Argh! This was meant to be part of patch #960406. 2004-08-03 14:37:14 +00:00
Martin v. Löwis 9513e34ac4 Patch #823072: add option to NOT use ~/.netrc in nntplib.NNTP(). 2004-08-03 14:36:32 +00:00
Martin v. Löwis 65a7975f16 Patch #994595: Recognize Basic auth even if other schemes are offered.
Will backport to 2.3.
2004-08-03 12:59:55 +00:00
Martin v. Löwis 7db57b3b41 Patch #870382: Automatically add msvcr71 to the list of libraries if
Python was built with VC 7.1.
2004-08-03 12:41:42 +00:00
Michael W. Hudson 61147f63d9 Check in my refleak hunting code.
It's not the 100% solution -- it may not even be the 90% solution -- but
it does seem to help.
2004-08-03 11:33:28 +00:00
Anthony Baxter afd5ce1814 nice tests dont leave little suprises in the environ 2004-08-03 11:14:19 +00:00
Michael W. Hudson 5bf2516807 More "noone expected this to run twice"ness removal. 2004-08-03 11:14:09 +00:00
Michael W. Hudson fe27ff8936 make this test work when run repeatedly. 2004-08-03 11:08:32 +00:00
Anthony Baxter d2717217ae Removed use of 'cgi.initlog()' - the first call to cgi.log is actually
an initlog() (and initlog()'s docstring says "don't use this"!) This
allows test_cgi to be run repeatedly in a single run of the interpreter.
2004-08-03 11:05:04 +00:00
Michael W. Hudson fcc09bbad6 Don't exit test_main() with the lock 'done' held -- there's no cleaner
way to guarantee a deadlock on the next call!

If I've inadvertently done some damage to this test, sorry (but I don't
think I have).
2004-08-03 10:45:59 +00:00
Michael W. Hudson 3bfed9c225 Delete the items variable (and explain why). 2004-08-03 10:17:34 +00:00
Fred Drake 576298d3b2 - fix description of option table entries
- fix broken assert statement; should just raise
2004-08-02 17:58:51 +00:00
Andrew M. Kuchling c75f11222c Use isabs() in conditional, not abspath 2004-08-02 14:54:16 +00:00
Anthony Baxter 270fe88c68 and a unit test for the staticmethod-of-a-non-method failure just fixed 2004-08-02 11:34:10 +00:00
Raymond Hettinger 66bd233225 Completed the patch for Bug #215126.
* Fixes an incorrect variable in a PyDict_CheckExact.
* Allow general mapping locals arguments for the execfile() function
  and exec statement.
* Add tests.
2004-08-02 08:30:07 +00:00
Anthony Baxter c2a5a63654 PEP-0318, @decorator-style. In Guido's words:
"@ seems the syntax that everybody can hate equally"
Implementation by Mark Russell, from SF #979728.
2004-08-02 06:10:11 +00:00
Tim Peters 99d001ed0d Removed reliance on damaged module object appearing in sys.modules
after a failed import.

This is the last checkin in the "change import failure semantics" series.
2004-08-02 03:59:57 +00:00
Tim Peters 08138fdc7a New tests:
test_failing_import_sticks -- if an import raises an exception,
        ensure that trying to import it again continues raising exceptions
    test_failing_reload -- if a module loads OK, but a reload raises an
        exception, ensure that the module is still in sys.modules, and
        that its __dict__ reflects as much of the reload attempt as
        succeeded.  That doesn't seem like sane semantics, but it is
        backward-compatible semantics <wink>.
2004-08-02 03:58:27 +00:00
Tim Peters d464838ebc Removed no-longer-needed convolutions to recover from damaged modules
getting left beyind in sys.modules.
2004-08-02 03:55:18 +00:00
Neal Norwitz 0e67fd478f Fix SF #1001053, wave.open() with unicode filename fails
Backport candidate.
2004-08-01 22:48:06 +00:00
Tim Peters c0cbc8611b Whitespace normalization. 2004-07-31 21:17:37 +00:00
Tim Peters 579f7355fe Be more careful about reverting mutuations to system-wide (sys) variables.
This fixes 15 spurious test failures on Windows (probably all due to
the test leaving a wrong path in sys.argv[0], which then prevented
regrtest.py from finding the expected-output files for tests running
after test_optparse).
2004-07-31 21:14:28 +00:00
Greg Ward eba20e6015 Upgrade optparse module and tests to Optik 1.5a1:
* add expansion of default values in help text: the string
    "%default" in an option's help string is expanded to str() of
    that option's default value, or "none" if no default value.
  * bug #955889: option default values that happen to be strings are
    now processed in the same way as values from the command line; this
    allows generation of nicer help when using custom types.  Can
    be disabled with parser.set_process_default_values(False).
  * bug #960515: don't crash when generating help for callback
    options that specify 'type', but not 'dest' or 'metavar'.
  * feature #815264: change the default help format for short options
    that take an argument from e.g. "-oARG" to "-o ARG"; add
    set_short_opt_delimiter() and set_long_opt_delimiter() methods to
    HelpFormatter to allow (slight) customization of the formatting.
  * patch #736940: internationalize Optik: all built-in user-
    targeted literal strings are passed through gettext.gettext().  (If
    you want translations (.po files), they're not included with Python
    -- you'll find them in the Optik source distribution from
    http://optik.sourceforge.net/ .)
  * bug #878453: respect $COLUMNS environment variable for
    wrapping help output.
  * feature #988122: expand "%prog" in the 'description' passed
    to OptionParser, just like in the 'usage' and 'version' strings.
    (This is *not* done in the 'description' passed to OptionGroup.)
2004-07-31 16:15:44 +00:00
Tim Peters bcc95cb7cb Repair typo in docstring. 2004-07-31 00:19:43 +00:00
Armin Rigo 93677f075d * drop the unreasonable list invariant that ob_item should never come back
to NULL during the lifetime of the object.

* listobject.c nevertheless did not conform to the other invariants,
  either; fixed.

* listobject.c now uses list_clear() as the obvious internal way to clear
  a list, instead of abusing list_ass_slice() for that.  It makes it easier
  to enforce the invariant about ob_item == NULL.

* listsort() sets allocated to -1 during sort; any mutation will set it
  to a value >= 0, so it is a safe way to detect mutation.  A negative
  value for allocated does not cause a problem elsewhere currently.
  test_sort.py has a new test for this fix.

* listsort() leak: if items were added to the list during the sort, AND if
  these items had a __del__ that puts still more stuff into the list,
  then this more stuff (and the PyObject** array to hold them) were
  overridden at the end of listsort() and never released.
2004-07-29 12:40:23 +00:00
Vinay Sajip e12f71586a Ignore exceptions which occur when closing files in shutdown() 2004-07-29 09:19:30 +00:00
Neal Norwitz 014f103705 SF bug #999776, zlib home page wrong
Backport candidate.
2004-07-29 03:55:56 +00:00
Marc-André Lemburg 17b6d28c64 New codec: [ 996067 ] hp-roman8 codec 2004-07-28 15:37:54 +00:00
Marc-André Lemburg cd8a4cb3d3 Added new codec hp-roman8 submitted as patch [ 996067 ] hp-roman8 codec. 2004-07-28 15:35:29 +00:00
Fred Drake 25d88926b9 Since build_py handles package data installation, the list of outputs
can contain more than just .py files.  Make sure we only report
bytecode files for the .py files.
2004-07-28 14:55:10 +00:00
Tim Peters 49667c257b Ack, removed useless import of os I just introduced. 2004-07-27 21:05:21 +00:00
Tim Peters 5cfb05eef0 Added a new fileno() method. ZODB's repozo.py wants this so it can
apply os.fsync() to the GzipFile backup files it creates.
2004-07-27 21:02:02 +00:00
Martin v. Löwis 544f1195b1 Patch #995766: Keyword argument support in cPickle. 2004-07-27 05:22:33 +00:00
Martin v. Löwis 7b9190b8fc Patch #998149: imaplib deleteacl and myrights. 2004-07-27 05:07:19 +00:00
Martin v. Löwis c8ae31dcbd Patch #962487: Don't crash for empty locale names. 2004-07-26 12:45:18 +00:00
Martin v. Löwis cc0f93233a Patch #605370: Add description[s] for RFC 2980 compliance. 2004-07-26 12:40:50 +00:00
Martin v. Löwis 32d0c1b458 Patch #995782: Add FreeBSD 5 expectations. Will backport to 2.3. 2004-07-26 12:09:13 +00:00
Skip Montanaro 5253da163c added test for bug #996359. 2004-07-24 19:56:03 +00:00
Skip Montanaro 3414c1ceee add missing newlines to read/readline.
fixes bug #996359.
2004-07-24 19:54:44 +00:00
Thomas Heller 612eb09aae Factored out a method to determine the final installer filename. 2004-07-23 19:58:28 +00:00
Thomas Heller 6fa2474b20 Make the distutils version number the same as the python version. It
must be literally contained here, because it is still possible to
install this distutils in older Python versions.
2004-07-23 19:47:32 +00:00
Thomas Heller ee6fd06ecf bdist_wininst does now properly handle unicode strings or byte strings
with umlauts in the author argument and others.

Fixes sf # 993943.
2004-07-23 19:44:29 +00:00
Marc-André Lemburg d25c650461 Let u'%s' % obj try obj.__unicode__() first and fallback to obj.__str__(). 2004-07-23 16:13:25 +00:00
Gustavo Niemeyer 7bd33c5e22 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.

Every change was also documented.
2004-07-22 18:44:01 +00:00