0
0
mirror of https://github.com/python/cpython.git synced 2024-11-28 08:20:55 +01:00
Commit Graph

30174 Commits

Author SHA1 Message Date
Hye-Shik Chang
69dc1c8f6a Fix typo. 2004-07-15 04:30:25 +00:00
Tim Peters
5960d80e11 s/it's/its/, s/NULL/NULL{}/, where appropriate. 2004-07-15 04:23:13 +00:00
Tim Peters
eda29306b3 Formalize that the Py_VISIT macro requires that the tp_traverse
implementation it's used in must give its arguments specific names.
2004-07-15 04:05:59 +00:00
Andrew M. Kuchling
89ba1fff17 Bump version; update date 2004-07-14 21:56:19 +00:00
Raymond Hettinger
9296023938 Improve examples for working with the context API. 2004-07-14 21:06:55 +00:00
Raymond Hettinger
ef66debd7e Use threading.local() instead of threading.currentThread(). 2004-07-14 21:04:27 +00:00
Raymond Hettinger
99148e7eaa Factor out two unnecessary global variables. 2004-07-14 19:56:56 +00:00
Jim Fulton
d15dc06df0 Implemented thread-local data as proposed on python-dev:
http://mail.python.org/pipermail/python-dev/2004-June/045785.html
2004-07-14 19:11:50 +00:00
Jim Fulton
e827437f45 Summarized changes: threading.local, Py_CLEAR, Py_VISIT, improved type
tutorial.
2004-07-14 19:08:28 +00:00
Jim Fulton
aa6389e13b Documented the new Py_VISIT macro to simplify implementation of
tp_traverse handlers. (Tim made me do it. ;)
2004-07-14 19:08:17 +00:00
Jim Fulton
8c5aeaa277 Implemented a new Py_CLEAR macro. This macro should be used when
decrementing the refcount of variables that might be accessed as a
result of calling Python
2004-07-14 19:07:35 +00:00
Jim Fulton
7a0e8bc283 Updated documentation to:
- point out the importance of reassigning data members before
  assigning thier values

- correct my missconception about return values from visitprocs. Sigh.

- mention the labor saving Py_VISIT and Py_CLEAR macros.
2004-07-14 19:07:24 +00:00
Jim Fulton
a643b658a7 Ported some features from zope:
- Fixed the display of tests in verbose output
- Allow setUp and tearDown functions to be provided for DocTestSuites.
2004-07-14 19:06:50 +00:00
Raymond Hettinger
b91af521fd * Hide a loop induction variable that was inadvertantly being picked up
by the locals() call in the context constructor.

* Remove unnecessary properties for int, exp, and sign which duplicated
  information returned by as_tuple().
2004-07-14 16:35:30 +00:00
Raymond Hettinger
fed52963fc * Rename "Signals" to "_signals" making it non-public.
* Context.create_decimal can take a zero default just like Decimal().
* Fix typo in comment.
2004-07-14 15:41:57 +00:00
Thomas Heller
b60b242d29 Recompiled after source file changes. 2004-07-14 15:22:05 +00:00
Thomas Heller
0062be26d8 Ignore some more build products. 2004-07-14 15:19:45 +00:00
Thomas Heller
d1d92ea59a Add a warning so that it isn't forgotten to recreate the binaries AND
CHECK INTO CVS if these files are changed.
2004-07-14 15:17:04 +00:00
Thomas Heller
55a9864cb4 Don't complain that non-existant registry entries cannot be deleted. 2004-07-14 14:53:50 +00:00
Michael W. Hudson
c849e63eb0 This is Pete Shinners' patch from his bug report
[ 984722 ] Py_BuildValue loses reference counts on error

I'm ever-so-slightly uneasy at the amount of work this can do with an
exception pending, but I don't think that this can result in anything
more serious than a strange error message.
2004-07-14 11:28:06 +00:00
Guido van Rossum
8cec3ab0e4 - Bug #981530: Fix UnboundLocalError in shutil.rmtree(). This affects
the documented behavior: the function passed to the onerror()
  handler can now also be os.listdir.

[I could've sworn I checked this in, but apparently I didn't, or it
got lost???]
2004-07-14 00:48:58 +00:00
Guido van Rossum
4a2ccdf781 - Bug #981530: Fix UnboundLocalError in shutil.rmtree(). This affects
the documented behavior: the function passed to the onerror()
  handler can now also be os.listdir.

[I could've sworn I checked this in, but apparently I didn't, or it
got lost???]
2004-07-14 00:45:59 +00:00
Brett Cannon
80e1f06594 It helps when doing checks if something is in a tuple of strings that if you
put everything in the tuple in caps to use str.upper() instead of str.lower().
2004-07-14 00:43:51 +00:00
Fred Drake
c0ed9c4956 clarify where \versionadded and \versionchanged should be placed when
they are used
2004-07-13 21:04:26 +00:00
Tim Peters
e45d5a3b00 Claifications: visit procs are supplied by the core, users aren't
expected to write their own.  A NULL "object" must not be passed to
the visit callback.  A non-zero return from a visit proc isn't
necessarily an error return (and it doesn't matter to the tp_traverse
code *what* it might signify, their only job is to return it).
2004-07-13 17:18:10 +00:00
Fred Drake
0751d554c0 generalize a bit; no need to mention my user id directly 2004-07-13 17:08:10 +00:00
Andrew M. Kuchling
2a510ce119 Wordsmithing 2004-07-13 14:03:31 +00:00
Brett Cannon
ee86a66dd8 Fixes a bug in testing code handling .pth files that did not restore the original
module that is removed for testing "import" lines.  Originally deleted the
entry from sys.modules and then just let other code that needed it to import it
again.  Problem with this solution is that it lead to code that had already
imported the module in question to have their own reference to a new copy of
the module in question that new code couldn't reach.  This lead to a failure in
test_strptime since it monkey-patched the 'time' module it had a reference to
while _strptime had its own reference to another copy of 'time' from being
imported by test___all__ that it was using for a calculation.

Also moved the testing code out of the PthFile class and into the actual test
class.  This was to stop using 'assert' which is useless with a -O execution.
2004-07-13 07:12:25 +00:00
Brett Cannon
71868e74d6 Add another point in the "Restrictions" section about how the handling of FTP
URLs will seemingly succeed to read a URL that points to a file whose
permissions you do not have to read.

Backport candidate once everyone agrees with the wording.
2004-07-13 00:48:42 +00:00
Nicholas Bastin
12ac3e1f49 Using repr() generates entries that the current stats package can't
collate, so setting it back to the function name
2004-07-12 23:38:02 +00:00
Barry Warsaw
b1027643d5 Updated my email address to something that works <wink>. 2004-07-12 23:10:08 +00:00
Brett Cannon
fdf7449ad2 Fix test case for when time.tzname[0] is either UTC or GMT. Also have test
output more telling details when there is a failure.
2004-07-12 19:34:02 +00:00
Vinay Sajip
20f42c433b Fixed minor bugs in the example configuration file 2004-07-12 15:48:04 +00:00
Nicholas Bastin
2e39d80925 Fix SF Bug #989066 2004-07-12 13:44:26 +00:00
Raymond Hettinger
7b7acd1de5 Use set() instead of sets.Set() 2004-07-12 13:29:10 +00:00
Raymond Hettinger
d7c7115926 Small elaboration and typo fixes. 2004-07-12 13:22:14 +00:00
Raymond Hettinger
5492f3d977 Add more known macros. 2004-07-12 13:16:49 +00:00
Michael W. Hudson
3f06189332 this is patch
[ 988698 ] compiler.transformer fix for (a, b) = 1, 2

fixing bug

[ 988613 ] compiler.transformer and tuple unpacking
2004-07-12 13:15:56 +00:00
Raymond Hettinger
ca1a775ab9 Fix markup. 2004-07-12 13:00:45 +00:00
Andrew MacIntyre
18bf43c4a4 FreeBSD's services file contains an additional echo service entry, with
a non-standard protocol and on a lower port than the tcp/udp entries,
which breaks the assumption that there will only be one service by a
given name on a given port when no protocol is specified.

Previous versions of this code have had other problems as a result of
different service definitions amongst common platforms.  As this platform
has an extra, unexpected, service entry, I've special cased the platform
rather than re-order the list of services checked to highlight the pitfall.
2004-07-12 12:10:30 +00:00
Anthony Baxter
fd4984d1fc install test/decimaltestdata as well 2004-07-12 09:33:39 +00:00
Anthony Baxter
1e2bd5bfb6 install test/decimaltestdata as well 2004-07-12 09:25:18 +00:00
Vinay Sajip
5e9e9e19f7 Removed debugging print statements from TimedRotatingFileHandler, and sorted list returned by glob.glob() (SF #987166) 2004-07-12 09:21:41 +00:00
Anthony Baxter
1869df1154 another note for amk 2004-07-12 08:15:37 +00:00
Tim Peters
71ed2201e2 Simplified the new get/get_nowait/put/put_nowait implementations a bit. 2004-07-12 01:20:32 +00:00
Tim Peters
5af0e41482 Bug #788520: Queue class has logic error when non-blocking
I don't agree it had a bug (see the report), so this is *not* a candidate
for backporting, but the docs were confusing and the Queue implementation
was old enough to vote.

Rewrote put/put_nowait/get/get_nowait from scratch, to use a pair of
Conditions (not_full and not_empty), sharing a common mutex.  The code
is 1/4 the size now, and 6.25x easier to understand.  For blocking
with timeout, we also get to reuse (indirectly) the tedious timeout
code from threading.Condition.  The Full and Empty exceptions raised
by non-blocking calls are now easy (instead of nearly impossible) to
explain truthfully:  Full is raised if and only if the Queue truly
is full when the non-blocking put call checks the queue size, and
similarly for Empty versus non-blocking get.

What I don't know is whether the new implementation is slower (or
faster) than the old one.  I don't really care.  Anyone who cares
a lot is encouraged to check that.
2004-07-12 00:45:14 +00:00
Tim Peters
183dabcd73 SF patch 986010: add missing doc for datetime C API, from
Anthony Tuininga.

This is a derived patch, taking the opportunity to add some organization
to the now-large pile of datetime-related macros, and to factor out
tedious repeated text.

Also improved some clumsy wording in NEWS.
2004-07-11 19:26:19 +00:00
Brett Cannon
dfa5d95613 Remove tabs introduced in last commit. 2004-07-11 19:16:21 +00:00
Kurt B. Kaiser
3f7cb5d9f5 Patch [ 972332 ] urllib2 FTPHandler bugs / John J. Lee
Modified Files:
	urllib2.py test/test_urllib2.py
2004-07-11 17:14:13 +00:00
Kurt B. Kaiser
e246508779 Add FAQ on non-GNU make error. Update copyright date to 2004. 2004-07-11 16:40:31 +00:00