- 10 Jun, 2002 13 commits
-
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Guido van Rossum authored
The file returned by tmpfile() has mode w+b, so use that in the call to PyFile_FromFile(). Bugfix candidate.
-
Andrew M. Kuchling authored
Add a reminder
-
Guido van Rossum authored
-
Andrew M. Kuchling authored
-
Guido van Rossum authored
assert into PyType_Ready(): now that we're not clearing tp_dict, we can assert that it's non-NULL again.
-
Guido van Rossum authored
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.
-
Guido van Rossum authored
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.
-
Andrew M. Kuchling authored
-
Michael W. Hudson authored
-
Andrew MacIntyre authored
-
Andrew MacIntyre authored
-
- 09 Jun, 2002 5 commits
-
-
Jack Jansen authored
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.
-
Martin v. Löwis authored
-
Martin v. Löwis authored
-
Just van Rossum authored
-
Greg Ward authored
-
- 07 Jun, 2002 22 commits
-
-
Greg Ward authored
-
Greg Ward authored
-
Greg Ward authored
-
Greg Ward authored
Yuck.
-
Greg Ward authored
handle sentences like this: And she said, "Go to hell!" Can you believe that?
-
Greg Ward authored
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.
-
Greg Ward authored
according to the conventions that I (and Tim Peters) learned in school.
-
Guido van Rossum authored
returned.
-
Guido van Rossum authored
timeout socket patch design.
-
Barry Warsaw authored
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)
-
Guido van Rossum authored
-
http://www.python.org/sf/565471Walter Dörwald authored
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.
-
Guido van Rossum authored
-
Guido van Rossum authored
and fromfd.
-
Neal Norwitz authored
-
Guido van Rossum authored
fromfd() assumes a blocking non-timeout socket.
-
Guido van Rossum authored
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.)
-
Skip Montanaro authored
-
Guido van Rossum authored
cleanup as well, e.g. renamed NTinit to os_init.
-
Guido van Rossum authored
-
Guido van Rossum authored
delimiters. Also repaired some docstrings and comments.
-
Guido van Rossum authored
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.
-