]> granicus.if.org Git - python/log
python
22 years agoAdd dependencies on socketmodule.h.
Guido van Rossum [Thu, 13 Jun 2002 14:41:32 +0000 (14:41 +0000)]
Add dependencies on socketmodule.h.

22 years ago_Py prefix is verboten for static entry points
Andrew MacIntyre [Thu, 13 Jun 2002 11:55:14 +0000 (11:55 +0000)]
_Py prefix is verboten for static entry points

22 years agowork around name clash with OS/2 TCPIP routine sock_init()
Andrew MacIntyre [Thu, 13 Jun 2002 11:53:52 +0000 (11:53 +0000)]
work around name clash with OS/2 TCPIP routine sock_init()

22 years agoWhitespace nit.
Guido van Rossum [Thu, 13 Jun 2002 11:53:12 +0000 (11:53 +0000)]
Whitespace nit.

22 years agoAdd documentation for PyObject_RichCompare() and PyObject_RichCompareBool(),
Fred Drake [Thu, 13 Jun 2002 11:51:48 +0000 (11:51 +0000)]
Add documentation for PyObject_RichCompare() and PyObject_RichCompareBool(),
constributed by David Abrahams.
This closes SF patch #568081.

22 years agoChanged the extended slice example to show that you can reverse a
Guido van Rossum [Thu, 13 Jun 2002 11:41:07 +0000 (11:41 +0000)]
Changed the extended slice example to show that you can reverse a
string with a [::-1] slice.

22 years agoAdd version annotations for some older changes to the calendar module.
Fred Drake [Thu, 13 Jun 2002 01:34:50 +0000 (01:34 +0000)]
Add version annotations for some older changes to the calendar module.
Closes SF patch #567867.

22 years agoRemove some overly complicated ways to concatenate and repeat strings
Guido van Rossum [Wed, 12 Jun 2002 21:29:43 +0000 (21:29 +0000)]
Remove some overly complicated ways to concatenate and repeat strings
using "".join().  Fold a long line.

22 years agoDon't test for Java, test for sys.getrefcount.
Guido van Rossum [Wed, 12 Jun 2002 21:19:40 +0000 (21:19 +0000)]
Don't test for Java, test for sys.getrefcount.

22 years agoSome provisional changes to get more tests to run on Windows (I hope).
Guido van Rossum [Wed, 12 Jun 2002 21:17:20 +0000 (21:17 +0000)]
Some provisional changes to get more tests to run on Windows (I hope).

22 years agoArgh. Typo. :-(
Guido van Rossum [Wed, 12 Jun 2002 20:55:17 +0000 (20:55 +0000)]
Argh.  Typo. :-(

22 years agoAllow absent fromfd(), for Windows.
Guido van Rossum [Wed, 12 Jun 2002 20:48:59 +0000 (20:48 +0000)]
Allow absent fromfd(), for Windows.

22 years agotestSetSockOpt() should not require the reuse flag to be 1 -- any
Guido van Rossum [Wed, 12 Jun 2002 20:46:49 +0000 (20:46 +0000)]
testSetSockOpt() should not require the reuse flag to be 1 -- any
nonzero value is OK.  Also fixed the error message for this and for
testGetSockOpt().

22 years agoLose the message on assertEqual calls -- they actually hide
Guido van Rossum [Wed, 12 Jun 2002 20:38:30 +0000 (20:38 +0000)]
Lose the message on assertEqual calls -- they actually hide
information on what went wrong.

22 years agoDocstring, layout and style tweaking. Increase fuzz to 1 second.
Guido van Rossum [Wed, 12 Jun 2002 20:22:49 +0000 (20:22 +0000)]
Docstring, layout and style tweaking.  Increase fuzz to 1 second.

22 years agoAdd a new definition to Extension objects: depends.
Jeremy Hylton [Wed, 12 Jun 2002 20:08:56 +0000 (20:08 +0000)]
Add a new definition to Extension objects: depends.

depends is a list of files that the target depends, but aren't direct
sources of the target.  think .h files.

22 years agoAdd some more basic tests to validate the argument checking of
Guido van Rossum [Wed, 12 Jun 2002 19:57:18 +0000 (19:57 +0000)]
Add some more basic tests to validate the argument checking of
settimeout(), test settimeout(None), and the interaction between
settimeout() and setblocking().

22 years agoNew test suite for the socket module by Michael Gilfix.
Guido van Rossum [Wed, 12 Jun 2002 19:18:08 +0000 (19:18 +0000)]
New test suite for the socket module by Michael Gilfix.
Changed test_timeout.py to conform to the guidelines in Lib/test/README.

22 years agoSF bug 567826. Document new opcodes:
Guido van Rossum [Wed, 12 Jun 2002 15:33:08 +0000 (15:33 +0000)]
SF bug 567826.  Document new opcodes:
['BINARY_FLOOR_DIVIDE', 'BINARY_TRUE_DIVIDE',
'INPLACE_FLOOR_DIVIDE', 'INPLACE_TRUE_DIVIDE', 'GET_ITER',
'YIELD_VALUE', 'FOR_ITER', 'CONTINUE_LOOP']

22 years agoAdd a testcase to ensure that cycles going through the __class__ link
Guido van Rossum [Wed, 12 Jun 2002 14:38:04 +0000 (14:38 +0000)]
Add a testcase to ensure that cycles going through the __class__ link
of a new-style instance are detected by the garbage collector.

22 years agoSF bug 567538: Generator can crash the interpreter (Finn Bock).
Guido van Rossum [Wed, 12 Jun 2002 03:45:21 +0000 (03:45 +0000)]
SF bug 567538: Generator can crash the interpreter (Finn Bock).

This was a simple typo.  Strange that the compiler didn't catch it!
Instead of WHY_CONTINUE, two tests used CONTINUE_LOOP, which isn't a
why_code at all, but an opcode; but even though 'why' is declared as
an enum, comparing it to an int is apparently not even worth a
warning -- not in gcc, and not in VC++. :-(

Will fix in 2.2 too.

22 years agoRework the code to have only the GvR RPC. Output from execution of user
Kurt B. Kaiser [Wed, 12 Jun 2002 03:28:57 +0000 (03:28 +0000)]
Rework the code to have only the GvR RPC.  Output from execution of user
code is directed to the Shell.

22 years agoThe opcode YIELD_STMT was accidentally called YIELD_VALUE here.
Guido van Rossum [Tue, 11 Jun 2002 21:17:35 +0000 (21:17 +0000)]
The opcode YIELD_STMT was accidentally called YIELD_VALUE here.

22 years agopatch #562492 - prevent duplicate lines in history
Skip Montanaro [Tue, 11 Jun 2002 14:32:46 +0000 (14:32 +0000)]
patch #562492 - prevent duplicate lines in history
also call using_history() to properly initialize history variables

22 years agoFix SF #565414, FancyURLopener() needs to support **kwargs
Neal Norwitz [Tue, 11 Jun 2002 13:38:51 +0000 (13:38 +0000)]
Fix SF #565414, FancyURLopener() needs to support **kwargs
since the URLopener base class does and **kwargs are used in urlopen.

22 years agoFix for problem reported by Neal Norwitz. Tighten up calculation of
Michael W. Hudson [Tue, 11 Jun 2002 13:38:42 +0000 (13:38 +0000)]
Fix for problem reported by Neal Norwitz.  Tighten up calculation of
slicelength.  Include his test case.

22 years agoFold remaining long lines.
Guido van Rossum [Tue, 11 Jun 2002 12:22:28 +0000 (12:22 +0000)]
Fold remaining long lines.

22 years agoThis is my nearly two year old patch
Michael W. Hudson [Tue, 11 Jun 2002 10:55:12 +0000 (10:55 +0000)]
This is my nearly two year old patch

[ 400998 ] experimental support for extended slicing on lists

somewhat spruced up and better tested than it was when I wrote it.

Includes docs & tests.  The whatsnew section needs expanding, and arrays
should support extended slices -- later.

22 years agoPatch #488073: AtheOS port.
Martin v. Löwis [Tue, 11 Jun 2002 06:22:31 +0000 (06:22 +0000)]
Patch #488073: AtheOS port.

22 years agoadd a version of GvR's q&d python idle printing patch,
Steven M. Gava [Tue, 11 Jun 2002 04:45:34 +0000 (04:45 +0000)]
add a version of GvR's q&d python idle printing patch,
slightly tweaked and modified for the idlefork config system

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