]> granicus.if.org Git - python/log
python
22 years agoCompletely revise markup for the list of list methods; the new markup matches
Fred Drake [Tue, 11 Jun 2002 02:56:17 +0000 (02:56 +0000)]
Completely revise markup for the list of list methods; the new markup matches
the semantics and presentation used in the library reference.
Added an explanation of the use of [...] to denote optional arguments, since
this is the only use of this in a signature line.
Closes SF bug #567127.

22 years agoRecord the latest fixes.
Guido van Rossum [Mon, 10 Jun 2002 21:39:42 +0000 (21:39 +0000)]
Record the latest fixes.

22 years agoTook initial_tab and subsequent_tab away from the fill() method and
Greg Ward [Mon, 10 Jun 2002 21:37:12 +0000 (21:37 +0000)]
Took initial_tab and subsequent_tab away from the fill() method and
transformed them into the initial_indent and subsequent_indent instance
attributes.  Now they actually work as advertised, ie. they are
accounted for in the width of each output line.  Plus you can use them
with wrap() as well as fill(), and fill() went from simple-and-broken to
trivial-and-working.

22 years agoSF patch 560794 (Greg Chapman): deepcopy can't handle custom
Guido van Rossum [Mon, 10 Jun 2002 21:10:27 +0000 (21:10 +0000)]
SF patch 560794 (Greg Chapman): deepcopy can't handle custom
metaclasses.

This is essentially the same problem as that reported in bug 494904
for pickle: deepcopy should treat instances of custom metaclasses the
same way it treats instances of type 'type'.

Bugfix candidate.

22 years agoAllow the standalone wrap() and fill() functions to take arbitrary
Greg Ward [Mon, 10 Jun 2002 20:36:07 +0000 (20:36 +0000)]
Allow the standalone wrap() and fill() functions to take arbitrary
keyword args, which are passed directly to the TextWrapper constructor.

22 years agoMake 'width' an instance attribute rather than an argument to the wrap()
Greg Ward [Mon, 10 Jun 2002 20:26:02 +0000 (20:26 +0000)]
Make 'width' an instance attribute rather than an argument to the wrap()
and fill() methods.  Keep interface of existing wrap() and fill()
functions by going back to having them construct a new TextWrapper
instance on each call, with the preferred width passed to the
constructor.

22 years agoRemove the only use of a string method.
Thomas Heller [Mon, 10 Jun 2002 20:05:48 +0000 (20:05 +0000)]
Remove the only use of a string method.
Fixes SF 564840.

22 years agoSF patch 564549 (Erik Andersén).
Guido van Rossum [Mon, 10 Jun 2002 20:00:52 +0000 (20:00 +0000)]
SF patch 564549 (Erik Andersén).

The WeakKeyDictionary constructor didn't work when a dict arg was
given.  Fixed by moving a line.  Also adding a unit test.

Bugfix candidate.

22 years agoDon't accept null bytes in the key.
Guido van Rossum [Mon, 10 Jun 2002 19:46:18 +0000 (19:46 +0000)]
Don't accept null bytes in the key.

22 years agoDocument that the key should not contain null bytes.
Guido van Rossum [Mon, 10 Jun 2002 19:42:43 +0000 (19:42 +0000)]
Document that the key should not contain null bytes.

22 years agoSF bug 563750 (Alex Martelli): posix_tmpfile():
Guido van Rossum [Mon, 10 Jun 2002 19:23:22 +0000 (19:23 +0000)]
SF bug 563750 (Alex Martelli): posix_tmpfile():

The file returned by tmpfile() has mode w+b, so use that in the call
to PyFile_FromFile().

Bugfix candidate.

22 years agoTweak traceback message to avoid LaTeX2HTML bug
Andrew M. Kuchling [Mon, 10 Jun 2002 18:58:19 +0000 (18:58 +0000)]
Tweak traceback message to avoid LaTeX2HTML bug
Add a reminder

22 years agoAdd primitive printing support for Unix and Windows.
Guido van Rossum [Mon, 10 Jun 2002 18:52:02 +0000 (18:52 +0000)]
Add primitive printing support for Unix and Windows.

22 years agoFix typo
Andrew M. Kuchling [Mon, 10 Jun 2002 15:53:05 +0000 (15:53 +0000)]
Fix typo

22 years agoUndo the last chunk of the previous patch, putting back a useful
Guido van Rossum [Mon, 10 Jun 2002 15:29:03 +0000 (15:29 +0000)]
Undo the last chunk of the previous patch, putting back a useful
assert into PyType_Ready(): now that we're not clearing tp_dict, we
can assert that it's non-NULL again.

22 years agoIn the recent python-dev thread "Bizarre new test failure", we
Guido van Rossum [Mon, 10 Jun 2002 15:24:42 +0000 (15:24 +0000)]
In the recent python-dev thread "Bizarre new test failure", we
discovered that subtype_traverse must traverse the type if it is a
heap type, because otherwise some cycles involving a type and its
instance would not be collected.  Simplest example:
    while 1:
        class C(object): pass
        C.ref = C()
This program grows without bounds before this fix.  (It grows ever
slower since it spends ever more time in the collector.)

Simply adding the right visit() call to subtype_traverse() revealed
other problems.  With MvL's help we re-learned that type_clear()
doesn't have to clear *all* references, only the ones that may not be
cleared by other means.  Careful analysis (see comments in the code)
revealed that only tp_mro needs to be cleared.  (The previous checkin
to this file adds a test for tp_mro==NULL to _PyType_Lookup() that's
essential to prevent crashes due to tp_mro being NULL when
subtype_dealloc() tries to look for a __del__ method.)  The same kind
of analysis also revealed that subtype_clear() doesn't need to clear
the instance dict.

With this fix, a useful property of the collector is once again
guaranteed: a single gc.collect() call will clear out all garbage.
(It didn't always before, which put us on the track of this bug.)

Will backport to 2.2.

22 years agoThree's a charm: yet another fix for SF bug 551412. Thinking again
Guido van Rossum [Mon, 10 Jun 2002 14:30:43 +0000 (14:30 +0000)]
Three's a charm: yet another fix for SF bug 551412.  Thinking again
about the test case, slot_nb_power gets called on behalf of its second
argument, but with a non-None modulus it wouldn't check this, and
believes it is called on behalf of its first argument.  Fix this
properly, and get rid of the code in _PyType_Lookup() that tries to
call _PyType_Ready().  But do leave a check for a NULL tp_mro there,
because this can still legitimately occur.

I'll fix this in 2.2.x too.

22 years agoFix typo, and add some reminders
Andrew M. Kuchling [Mon, 10 Jun 2002 13:22:46 +0000 (13:22 +0000)]
Fix typo, and add some reminders

22 years agoTweak the description of pymalloc. Mention pymemcompat.h.
Michael W. Hudson [Mon, 10 Jun 2002 13:19:42 +0000 (13:19 +0000)]
Tweak the description of pymalloc.  Mention pymemcompat.h.

22 years agorefresh to pick up recent changes
Andrew MacIntyre [Mon, 10 Jun 2002 08:05:26 +0000 (08:05 +0000)]
refresh to pick up recent changes

22 years agomake _sre a dynamically loadable module and build xxsubtype
Andrew MacIntyre [Mon, 10 Jun 2002 08:04:29 +0000 (08:04 +0000)]
make _sre a dynamically loadable module and build xxsubtype

22 years ago- Better commandline interface to BuildApplet, complete with options,
Jack Jansen [Sun, 9 Jun 2002 22:08:52 +0000 (22:08 +0000)]
- Better commandline interface to BuildApplet, complete with options,
  verbose output to the console, etc.
- Allow Cocoa applets to be built with BuildApplet.

No full testing has been done yet to ensure OS9 operation hasn't suffered.

22 years agoPatch #505375: Make doc strings optional.
Martin v. Löwis [Sun, 9 Jun 2002 13:41:37 +0000 (13:41 +0000)]
Patch #505375: Make doc strings optional.

22 years agoPatch #505375: Make doc strings optional.
Martin v. Löwis [Sun, 9 Jun 2002 13:33:54 +0000 (13:33 +0000)]
Patch #505375: Make doc strings optional.

22 years agoescape 8-bit chars when generating .py files. fixes bug #566302
Just van Rossum [Sun, 9 Jun 2002 09:08:53 +0000 (09:08 +0000)]
escape 8-bit chars when generating .py files. fixes bug #566302

22 years agoMake all of TextWrapper's options keyword args to the constructor.
Greg Ward [Sun, 9 Jun 2002 00:22:07 +0000 (00:22 +0000)]
Make all of TextWrapper's options keyword args to the constructor.

22 years agoRecord copyright and author.
Greg Ward [Fri, 7 Jun 2002 22:40:23 +0000 (22:40 +0000)]
Record copyright and author.

22 years agoUse True/False instead of 1/0.
Greg Ward [Fri, 7 Jun 2002 22:35:41 +0000 (22:35 +0000)]
Use True/False instead of 1/0.

22 years agoRemove islower() -- not used anymore.
Greg Ward [Fri, 7 Jun 2002 22:33:11 +0000 (22:33 +0000)]
Remove islower() -- not used anymore.

22 years agoConform to the bloody coding standards: "def foo()" not "def foo ()".
Greg Ward [Fri, 7 Jun 2002 22:32:15 +0000 (22:32 +0000)]
Conform to the bloody coding standards: "def foo()" not "def foo ()".
Yuck.

22 years agoConvert _fix_sentence_endings() to use a regex, and augment it to
Greg Ward [Fri, 7 Jun 2002 22:04:15 +0000 (22:04 +0000)]
Convert _fix_sentence_endings() to use a regex, and augment it to
handle sentences like this:
  And she said, "Go to hell!"  Can you believe that?

22 years agoAdd fix_sentence_endings option to control whether we ensure that
Greg Ward [Fri, 7 Jun 2002 21:56:16 +0000 (21:56 +0000)]
Add fix_sentence_endings option to control whether we ensure that
sentences are separated by two spaces.

Improve _fix_sentence_endings() a bit -- look for ".!?" instead of just
".", and factor out the list of sentence-ending punctuation characters
to a class attribute.

22 years agoInitial revision. Currently biased towards English in a fixed-width font,
Greg Ward [Fri, 7 Jun 2002 21:43:37 +0000 (21:43 +0000)]
Initial revision.  Currently biased towards English in a fixed-width font,
according to the conventions that I (and Tim Peters) learned in school.

22 years agoMove the conex_finally label up, so that the errno value is always
Guido van Rossum [Fri, 7 Jun 2002 19:55:29 +0000 (19:55 +0000)]
Move the conex_finally label up, so that the errno value is always
returned.

22 years agoAdded Bernard Yue who wrote test_timeout.py and participated in the
Guido van Rossum [Fri, 7 Jun 2002 15:58:53 +0000 (15:58 +0000)]
Added Bernard Yue who wrote test_timeout.py and participated in the
timeout socket patch design.

22 years agoAdded the 7 new top level domains, and reworded the nameorgs output.
Barry Warsaw [Fri, 7 Jun 2002 15:48:52 +0000 (15:48 +0000)]
Added the 7 new top level domains, and reworded the nameorgs output.
Not sure this is better in all cases.

parse(): Fixed a bug in the output; the dict is referred to in the
code as `countries' not `country'.  Also added no-case-fold for the
string "U.S." since the Virgin Islands name no longer wraps those in
parentheses.

main(): Fixed the argument parsing to agree with the docstring, i.e.
--outputdict instead of --output.

In the module docstring:

- updated my email address
- we don't need to explain about Python 1.5 regexps <wink>

We also don't need to wrap the import of re with a try/except.

Other style fixes:

- untabification
- revert back to <> style everywhere (and consistently)

22 years agoAdded -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum [Fri, 7 Jun 2002 15:17:03 +0000 (15:17 +0000)]
Added -t (--threshold) option to call gc.set_threshold(N).

22 years agoApply diff2.txt from SF patch http://www.python.org/sf/565471
Walter Dörwald [Fri, 7 Jun 2002 14:47:20 +0000 (14:47 +0000)]
Apply diff2.txt from SF patch http://www.python.org/sf/565471

This patch replaces string module functions with string
methods in the Tools/world/world scripts.

It also updates two outdated URLs and the countrycodes
dictionary.

It fixes a bug where result of string.find() was checked
for truth instead of compared with -1.

It also replaces <> with != in two spots.

22 years agoAdd timeout mode. Clarify gnu_getopt.
Guido van Rossum [Fri, 7 Jun 2002 12:40:52 +0000 (12:40 +0000)]
Add timeout mode.  Clarify gnu_getopt.

22 years agoClarify the interaction between timeout/non-blocking mode, makefile
Guido van Rossum [Fri, 7 Jun 2002 12:38:23 +0000 (12:38 +0000)]
Clarify the interaction between timeout/non-blocking mode, makefile
and fromfd.

22 years agoFix typo
Neal Norwitz [Fri, 7 Jun 2002 12:36:44 +0000 (12:36 +0000)]
Fix typo

22 years agoClarify the interaction between blocking and timeouts. Explain that
Guido van Rossum [Fri, 7 Jun 2002 03:39:21 +0000 (03:39 +0000)]
Clarify the interaction between blocking and timeouts.  Explain that
fromfd() assumes a blocking non-timeout socket.

22 years agoI decided to change the interaction between setblocking() and
Guido van Rossum [Fri, 7 Jun 2002 03:36:20 +0000 (03:36 +0000)]
I decided to change the interaction between setblocking() and
settimeout().   Already, settimeout() canceled non-blocking mode; now,
setblocking() also cancels the timeout.  This is easier to document.

(XXX should settimeout(0) be an alias for setblocking(0)?  They seem
to have roughly the same effect.  Also, I'm not sure that the code in
connect() and accept() is correct in all cases.  We'll sort this out
soon enough.)

22 years agognu_getopt should be exported in __all__
Skip Montanaro [Fri, 7 Jun 2002 03:26:43 +0000 (03:26 +0000)]
gnu_getopt should be exported in __all__

22 years agoMajor cleanup. Renamed static methods to avoid Py prefix. Other misc
Guido van Rossum [Fri, 7 Jun 2002 03:19:37 +0000 (03:19 +0000)]
Major cleanup.  Renamed static methods to avoid Py prefix.  Other misc
cleanup as well, e.g. renamed NTinit to os_init.

22 years agoRepair a comment.
Guido van Rossum [Fri, 7 Jun 2002 02:27:50 +0000 (02:27 +0000)]
Repair a comment.

22 years agoWhitespace normalization, folding long lines, uniform comment
Guido van Rossum [Fri, 7 Jun 2002 02:08:35 +0000 (02:08 +0000)]
Whitespace normalization, folding long lines, uniform comment
delimiters.  Also repaired some docstrings and comments.

22 years agoCorrect several blunders in the timeout code, mostly my own fault (for
Guido van Rossum [Fri, 7 Jun 2002 01:42:47 +0000 (01:42 +0000)]
Correct several blunders in the timeout code, mostly my own fault (for
not testing it -- apparently test_timeout.py doesn't test anything
useful):

In internal_select():

- The tv_usec part of the timeout for select() was calculated wrong.

- The first argument to select() was one too low.

- The sense of the direction argument to internal_select() was
  inverted.

In PySocketSock_settimeout():

- The calls to internal_setblocking() were swapped.

Also, repaired some comments and fixed the test for the return value
of internal_select() in sendall -- this was in the original patch.

22 years agoRemove casts to PyObject * when declaration is for PyObject *
Jeremy Hylton [Thu, 6 Jun 2002 23:23:55 +0000 (23:23 +0000)]
Remove casts to PyObject * when declaration is for PyObject *

22 years agoAdd version info, and fix another typo and wording spotted by /F. I think this is...
Neal Norwitz [Thu, 6 Jun 2002 22:24:10 +0000 (22:24 +0000)]
Add version info, and fix another typo and wording spotted by /F.  I think this is what he meant. :-)

22 years agoFix typo spotted by Fredrik Lundh.
Fred Drake [Thu, 6 Jun 2002 22:19:20 +0000 (22:19 +0000)]
Fix typo spotted by Fredrik Lundh.

22 years agoFix some markup errors and adjust wording slightly.
Fred Drake [Thu, 6 Jun 2002 21:57:48 +0000 (21:57 +0000)]
Fix some markup errors and adjust wording slightly.

22 years agoSF patch 555085 (timeout socket implementation) by Michael Gilfix.
Guido van Rossum [Thu, 6 Jun 2002 21:51:01 +0000 (21:51 +0000)]
SF patch 555085 (timeout socket implementation) by Michael Gilfix.

I've made considerable changes to Michael's code, specifically to use
the select() system call directly and to store the timeout as a C
double instead of a Python object; internally, -1.0 (or anything
negative) represents the None from the API.

I'm not 100% sure that all corner cases are covered correctly, so
please keep an eye on this.  Next I'm going to try it Windows before
Tim complains.

No way is this a bugfix candidate. :-)

22 years agoMichael Gilfix of SF patch 555085 fame.
Guido van Rossum [Thu, 6 Jun 2002 21:08:46 +0000 (21:08 +0000)]
Michael Gilfix of SF patch 555085 fame.

22 years agoSF patch 555085 (timeout socket implementation) by Michael Gilfix.
Guido van Rossum [Thu, 6 Jun 2002 21:08:16 +0000 (21:08 +0000)]
SF patch 555085 (timeout socket implementation) by Michael Gilfix.

I've made considerable changes to Michael's code, specifically to use
the select() system call directly and to store the timeout as a C
double instead of a Python object; internally, -1.0 (or anything
negative) represents the None from the API.

I'm not 100% sure that all corner cases are covered correctly, so
please keep an eye on this.  Next I'm going to try it Windows before
Tim complains.

No way is this a bugfix candidate. :-)

22 years agoThe insint() function is not used. Nuke it.
Guido van Rossum [Thu, 6 Jun 2002 20:41:10 +0000 (20:41 +0000)]
The insint() function is not used.  Nuke it.

22 years agoThe tp_new implementation should initialize the errorhandler field,
Guido van Rossum [Thu, 6 Jun 2002 20:08:25 +0000 (20:08 +0000)]
The tp_new implementation should initialize the errorhandler field,
otherwise this code could segfault:

  from socket import socket
  s = socket.__new__(socket)
  s.recv(100)

22 years agoRemove uses of string module and stat.ST_MODE
Neal Norwitz [Thu, 6 Jun 2002 18:30:10 +0000 (18:30 +0000)]
Remove uses of string module and stat.ST_MODE

22 years agoRemove another reference to stat.ST_MODE
Neal Norwitz [Thu, 6 Jun 2002 18:16:14 +0000 (18:16 +0000)]
Remove another reference to stat.ST_MODE

22 years agoUse isinstance for the type check, use booleans.
Martin v. Löwis [Thu, 6 Jun 2002 18:14:50 +0000 (18:14 +0000)]
Use isinstance for the type check, use booleans.

22 years agoFix from SF patch 565085: copy._reduction doesn't __setstate__.
Guido van Rossum [Thu, 6 Jun 2002 17:53:03 +0000 (17:53 +0000)]
Fix from SF patch 565085: copy._reduction doesn't __setstate__.
Straightforward fix.  Will backport to 2.2.  If there's ever a new 2.1
release, this could be backported there too (since it's an issue with
anything that's got both a __reduce__ and a __setstate__).

22 years agoFix from SF patch 565085: copy._reduction doesn't __setstate__.
Guido van Rossum [Thu, 6 Jun 2002 17:41:20 +0000 (17:41 +0000)]
Fix from SF patch 565085: copy._reduction doesn't __setstate__.
Straightforward fix.  Will backport to 2.2.  If there's ever a new 2.1
release, this could be backported there too (since it's an issue with
anything that's got both a __reduce__ and a __setstate__).

22 years agoApply diff.txt from SF patch http://www.python.org/sf/561478
Walter Dörwald [Thu, 6 Jun 2002 17:01:21 +0000 (17:01 +0000)]
Apply diff.txt from SF patch http://www.python.org/sf/561478

This uses cgi.parse_header() in Checker.checkforhtml(), so that
webchecker recognises the mime type text/html even if options
are specified.

22 years agoClose SF bug 563740. complex() now finds __complex__() in new style classes.
Raymond Hettinger [Thu, 6 Jun 2002 15:45:38 +0000 (15:45 +0000)]
Close SF bug 563740. complex() now finds __complex__() in new style classes.
Made conversion failure error messages consistent between types.
Added related unittests.

22 years agoPyrangeiter_Type && range_iter should be static
Neal Norwitz [Thu, 6 Jun 2002 14:58:21 +0000 (14:58 +0000)]
Pyrangeiter_Type && range_iter should be static

22 years agoChange warning to debug level; it's a very minor issue.
Jeremy Hylton [Thu, 6 Jun 2002 14:54:56 +0000 (14:54 +0000)]
Change warning to debug level; it's a very minor issue.

The specific warning is that clean didn't find a directory that should
be removed if it exists.

22 years agoStop testing for sigprocmask. This is a stop gap measure until I work
Michael W. Hudson [Thu, 6 Jun 2002 13:03:44 +0000 (13:03 +0000)]
Stop testing for sigprocmask.  This is a stop gap measure until I work
out how to just activate my code on platforms where I know it works
(currently only linux/x86).

22 years agoPatch 473512: add GNU style scanning as gnu_getopt.
Martin v. Löwis [Thu, 6 Jun 2002 10:58:36 +0000 (10:58 +0000)]
Patch 473512: add GNU style scanning as gnu_getopt.

22 years agoPatch #551911: Escape . properly.
Martin v. Löwis [Thu, 6 Jun 2002 09:52:49 +0000 (09:52 +0000)]
Patch #551911: Escape . properly.

22 years agoReplace obsolete stat module constants with
Walter Dörwald [Thu, 6 Jun 2002 09:48:13 +0000 (09:48 +0000)]
Replace obsolete stat module constants with
equivalent attributes in a few more spots.

This closes SF patch http://www.python.org/sf/562373

22 years agoCRLF -> LF
Guido van Rossum [Thu, 6 Jun 2002 00:44:16 +0000 (00:44 +0000)]
CRLF -> LF

22 years agoSkip Montanaro's patch, SF 559833, exposing xrange type in builtins.
Raymond Hettinger [Wed, 5 Jun 2002 23:12:45 +0000 (23:12 +0000)]
Skip Montanaro's patch, SF 559833, exposing xrange type in builtins.
Also, added more regression tests to cover the new type and test its
conformity with range().

22 years agoopen method changed to use arguments and set instance host/port values (instead of...
Piers Lauder [Wed, 5 Jun 2002 22:31:57 +0000 (22:31 +0000)]
open method changed to use arguments and set instance host/port values (instead of __init__)

22 years agoSF 564601 adding rangeiterobject to make xrange() iterate like range().
Raymond Hettinger [Wed, 5 Jun 2002 20:08:48 +0000 (20:08 +0000)]
SF 564601 adding rangeiterobject to make xrange() iterate like range().

22 years agoSF bug 558179.
Guido van Rossum [Wed, 5 Jun 2002 19:07:39 +0000 (19:07 +0000)]
SF bug 558179.
Change default for get() back to None.
Will backport to 2.2.1.

22 years agofixed refcount leak in CreateNewWindow() and CreateWindowFromResource().
Just van Rossum [Wed, 5 Jun 2002 17:41:03 +0000 (17:41 +0000)]
fixed refcount leak in CreateNewWindow() and CreateWindowFromResource().

22 years agoBetter isinstance error message.
Thomas Heller [Wed, 5 Jun 2002 12:55:19 +0000 (12:55 +0000)]
Better isinstance error message.

Closes SF patch # 560250.

Bugfix candidate IMO.

22 years agoMove warning about directory not on sys.path to debug level.
Jeremy Hylton [Tue, 4 Jun 2002 21:20:08 +0000 (21:20 +0000)]
Move warning about directory not on sys.path to debug level.

Fix a bunch of multiline string constants that used +.

22 years agoTest changes before checking them in.
Jeremy Hylton [Tue, 4 Jun 2002 21:11:56 +0000 (21:11 +0000)]
Test changes before checking them in.

22 years agoTrack extra arg to option_table to all uses of it
Jeremy Hylton [Tue, 4 Jun 2002 21:10:35 +0000 (21:10 +0000)]
Track extra arg to option_table to all uses of it

22 years agoReplace bogus bare variables with attribute access.
Jeremy Hylton [Tue, 4 Jun 2002 21:06:16 +0000 (21:06 +0000)]
Replace bogus bare variables with attribute access.

22 years agoDefine DEBUG as early as possible to avoid import problems.
Jeremy Hylton [Tue, 4 Jun 2002 21:05:05 +0000 (21:05 +0000)]
Define DEBUG as early as possible to avoid import problems.

22 years agoAdd missing import of log.
Jeremy Hylton [Tue, 4 Jun 2002 21:04:03 +0000 (21:04 +0000)]
Add missing import of log.

22 years agoUse module-level import of DEBUG instead of many function-level imports.
Jeremy Hylton [Tue, 4 Jun 2002 21:02:26 +0000 (21:02 +0000)]
Use module-level import of DEBUG instead of many function-level imports.

22 years agoRemove unused imports
Jeremy Hylton [Tue, 4 Jun 2002 21:00:33 +0000 (21:00 +0000)]
Remove unused imports

22 years agoMake None return explicit
Jeremy Hylton [Tue, 4 Jun 2002 21:00:20 +0000 (21:00 +0000)]
Make None return explicit

22 years agoimport base64 at the top to avoid two different imports at other times
Jeremy Hylton [Tue, 4 Jun 2002 20:55:10 +0000 (20:55 +0000)]
import base64 at the top to avoid two different imports at other times

22 years agoensure_filename() only takes one argument.
Jeremy Hylton [Tue, 4 Jun 2002 20:45:17 +0000 (20:45 +0000)]
ensure_filename() only takes one argument.

Call ensure_string() with one arg too, since the second value passed
was the default.

22 years agoReindent lines to improve readability
Jeremy Hylton [Tue, 4 Jun 2002 20:42:41 +0000 (20:42 +0000)]
Reindent lines to improve readability

22 years agoRemove (commented out) options that have moved into the distribution.
Jeremy Hylton [Tue, 4 Jun 2002 20:40:03 +0000 (20:40 +0000)]
Remove (commented out) options that have moved into the distribution.

22 years agoget_script() implicitly returned None and also had explicit returns.
Jeremy Hylton [Tue, 4 Jun 2002 20:39:34 +0000 (20:39 +0000)]
get_script() implicitly returned None and also had explicit returns.

Make all returns explicit and rearrange logic to avoid extra
indentation.

22 years agoglobal _option_order is not used
Jeremy Hylton [Tue, 4 Jun 2002 20:35:10 +0000 (20:35 +0000)]
global _option_order is not used

22 years agoFix bug in recent change to logging code.
Jeremy Hylton [Tue, 4 Jun 2002 20:30:10 +0000 (20:30 +0000)]
Fix bug in recent change to logging code.

mode is not computed in dry_run mode, so it can't be included in the
log message.

22 years agoFix unused local variables caught by pychecker.
Jeremy Hylton [Tue, 4 Jun 2002 20:26:44 +0000 (20:26 +0000)]
Fix unused local variables caught by pychecker.

Fixes a bug for Solaris pkgtool (bdist_pkgtool) that would have
prevented it from building subpackages.

22 years agoSet repeat metadata for an option based on repeat local var not
Jeremy Hylton [Tue, 4 Jun 2002 20:24:05 +0000 (20:24 +0000)]
Set repeat metadata for an option based on repeat local var not
constant.

22 years agoRemove unused imports caught by pychecker
Jeremy Hylton [Tue, 4 Jun 2002 20:18:24 +0000 (20:18 +0000)]
Remove unused imports caught by pychecker

22 years agoMake setup.py less chatty by default.
Jeremy Hylton [Tue, 4 Jun 2002 20:14:43 +0000 (20:14 +0000)]
Make setup.py less chatty by default.

This is a conservative version of SF patch 504889.  It uses the log
module instead of calling print in various places, and it ignores the
verbose argument passed to many functions and set as an attribute on
some objects.  Instead, it uses the verbosity set on the logger via
the command line.

The log module is now preferred over announce() and warn() methods
that exist only for backwards compatibility.

XXX This checkin changes a lot of modules that have no test suite and
aren't exercised by the Python build process.  It will need
substantial testing.

22 years agoA simple log mechanism styled after the proposed std library module
Jeremy Hylton [Tue, 4 Jun 2002 20:00:26 +0000 (20:00 +0000)]
A simple log mechanism styled after the proposed std library module

22 years agoAddress SF bug 519621: slots weren't traversed by GC.
Guido van Rossum [Tue, 4 Jun 2002 19:52:53 +0000 (19:52 +0000)]
Address SF bug 519621: slots weren't traversed by GC.

While I was at it, I added a tp_clear handler and changed the
tp_dealloc handler to use the clear_slots helper for the tp_clear
handler.

Also tightened the rules for slot names: they must now be proper
identifiers (ignoring the dirty little fact that <ctype.h> is locale
sensitive).

Also set mp->flags = READONLY for the __weakref__ pseudo-slot.

Most of this is a 2.2 bugfix candidate; I'll apply it there myself.

22 years agoThe comment said:
Jeremy Hylton [Tue, 4 Jun 2002 18:55:54 +0000 (18:55 +0000)]
The comment said:

 # XXX this isn't used anywhere, and worse, it has the same name as a method
 # in Command with subtly different semantics.  (This one just has one
 # source -> one dest; that one has many sources -> one dest.)  Nuke it?

Yes.  Nuke it.