Commit Graph

1043 Commits

Author SHA1 Message Date
Hye-Shik Chang 2bb146f2f4 Bring CJKCodecs 1.1 into trunk. This completely reorganizes source
and installed layouts to make maintenance simple and easy.  And it
also adds four new codecs; big5hkscs, euc-jis-2004, shift-jis-2004
and iso2022-jp-2004.
2004-07-18 03:06:29 +00:00
Raymond Hettinger 76d962d700 Treat None as a constant. 2004-07-16 12:16:48 +00:00
Jim Fulton e827437f45 Summarized changes: threading.local, Py_CLEAR, Py_VISIT, improved type
tutorial.
2004-07-14 19:08:28 +00:00
Anthony Baxter fd4984d1fc install test/decimaltestdata as well 2004-07-12 09:33:39 +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 d2c5b4b549 SequenceMatcher(None, [], []).get_grouped_opcodes() now returns a generator
that behaves as if both lists has an empty string in each of them.

Closes bug #979794 (and duplicate bug #980117).
2004-07-10 23:54:07 +00:00
Brett Cannon e6f8a89d1a Debug output is now printed to sys.stderr .
Closes bug #980938.
2004-07-10 23:14:30 +00:00
Brett Cannon f50299c378 posixpath.realpath() now detects symlink loops and returns the path just before
the loop starts.

Closes bug #930024.  Thanks AM Kuchling.
2004-07-10 22:55:15 +00:00
Brett Cannon 711e7d97e4 Add PyArg_VaParseTupleAndKeywords(). Document this function and
PyArg_VaParse().

Closes patch #550732.  Thanks Greg Chapman.
2004-07-10 22:20:32 +00:00
Andrew M. Kuchling 79d7e92a5c Add item 2004-07-10 21:21:55 +00:00
Brett Cannon bdc36273a2 Make ntpath compress multiple slashes between drive letter and the rest of the
path.  Also clarifies UNC handling and adds appropriate tests.

Applies patch #988607 to fix bug #980327.  Thanks Paul Moore.
2004-07-10 20:42:22 +00:00
Brett Cannon e67511809b Add note about closing of bug #679953 and add Jimmy Burgett for helping out to
Misc/ACKS.
2004-07-10 19:13:42 +00:00
Andrew M. Kuchling 64ed298d7a Add an item 2004-07-10 18:43:32 +00:00
Marc-André Lemburg 88fcca6815 Added note about new codecs module APIs. 2004-07-10 16:16:06 +00:00
Raymond Hettinger 21f9fce968 Fix typo. 2004-07-10 16:11:03 +00:00
Raymond Hettinger 5aa478badf Module and tests:
* Map conditions to related signals.
* Make contexts unhashable.
* Eliminate used "default" attribute in exception definitions.
* Eliminate the _filterfunc in favor of a straight list.

Docs:
* Eliminate documented references to conditions that are not signals.
* Eliminate parenthetical notes such as "1/0 --> Inf" which are no
  longer true with the new defaults.
2004-07-09 10:02:53 +00:00
Anthony Baxter 563e449729 post-release fun 2004-07-09 07:30:10 +00:00
Anthony Baxter 3210b36a28 release dates 2004-07-08 05:59:43 +00:00
Guido van Rossum 5124b4a082 Add msg for bug #981530 (shutil.rmtree). Somehow that got missed in
the checkin.
2004-07-06 17:52:32 +00:00
Andrew M. Kuchling 81e3fb4b3a Typo fixes 2004-07-04 15:41:59 +00:00
Brett Cannon 41d13f61d2 Clarify last added comment (bug #754449). 2004-07-03 03:54:54 +00:00
Brett Cannon cc4e935ea5 threading.Thread objects will now print a traceback for an exception raised
during interpreter shutdown instead of masking it with another traceback about
accessing a NoneType when trying to print the exception out in the first place.

Closes bug #754449 (using patch #954922).
2004-07-03 03:52:35 +00:00
Fred Drake 0a4dd390bf Make weak references subclassable:
- weakref.ref and weakref.ReferenceType will become aliases for each
  other

- weakref.ref will be a modern, new-style class with proper __new__
  and __init__ methods

- weakref.WeakValueDictionary will have a lighter memory footprint,
  using a new weakref.ref subclass to associate the key with the
  value, allowing us to have only a single object of overhead for each
  dictionary entry (currently, there are 3 objects of overhead per
  entry: a weakref to the value, a weakref to the dictionary, and a
  function object used as a weakref callback; the weakref to the
  dictionary could be avoided without this change)

- a new macro, PyWeakref_CheckRefExact(), will be added

- PyWeakref_CheckRef() will check for subclasses of weakref.ref

This closes SF patch #983019.
2004-07-02 18:57:45 +00:00
Thomas Heller 04c673b6e2 SF #951851 fixed. 2004-07-02 08:56:20 +00:00
Raymond Hettinger 214b1c3aae SF Bug #215126: Over restricted type checking on eval() function
The builtin eval() function now accepts any mapping for the locals argument.
Time sensitive steps guarded by PyDict_CheckExact() to keep from slowing
down the normal case.  My timings so no measurable impact.
2004-07-02 06:41:07 +00:00
Raymond Hettinger 7c85fa4a52 Move Decimal from the sandbox into production. 2004-07-01 11:01:35 +00:00
Michael W. Hudson 7db865af40 tyop 2004-06-30 09:09:38 +00:00
Michael W. Hudson c30ba849cf restore NEWS entry for 957240 2004-06-30 09:06:29 +00:00
Brett Cannon 46d4ff2b72 Fix stupid mistake of forgetting to mention that the fix for bug #981299
entailed editing the urlparse module.
2004-06-29 04:08:23 +00:00
Brett Cannon fbac294d59 rsync is now a recognized protocol that uses "netloc" (i.e. specifies a network
location) in its addressing.

Closes bug #981299.
2004-06-29 04:02:40 +00:00
Barry Warsaw 11b91a0ea3 Added socket.getservbyport(), and make its second argument and that of
getservbyname() optional.  Update the tests and the docs.
2004-06-28 00:50:43 +00:00
Martin v. Löwis ef82d2fdfe Patch #923098: Share interned strings in marshal. 2004-06-27 16:51:46 +00:00
Brett Cannon f6af76da61 Modules/getpath.c now compiles properly under OS X when using the
--disable-framework build; header file was protected in an #if using the wrong
macro to check.

Closes bug #978645.
2004-06-26 04:03:06 +00:00
Fred Drake ec6229e352 Make distutils "install --home" support all platforms. 2004-06-25 23:02:59 +00:00
Tim Peters 9ddf40b4e1 SF patch 876130: add C API to datetime module, from Anthony Tuininga.
The LaTeX is untested (well, so is the new API, for that matter).
Note that I also changed NULL to get spelled consistently in concrete.tex.
If that was a wrong thing to do, Fred should yell at me.
2004-06-20 22:41:32 +00:00
Tim Peters 1b6f7a9057 Bug 975996: Add _PyTime_DoubleToTimet to C API
New include file timefuncs.h exports private API function
_PyTime_DoubleToTimet() from timemodule.c.  timemodule should export
some other functions too (look for painful bits in datetimemodule.c).

Added insane-argument checking to datetime's assorted fromtimestamp()
and utcfromtimestamp() methods.  Added insane-argument tests of these
to test_datetime, and insane-argument tests for ctime(), localtime()
and gmtime() to test_time.
2004-06-20 02:50:16 +00:00
Brett Cannon 1c3fa18be7 shutil.move() will raise an exception when trying to move a directory into
itself.

Closes bug #919012  .  Thanks Johannes Gijsbers.
2004-06-19 21:11:35 +00:00
Brett Cannon b46ed71d70 Add news item about raising ValueError when timemodule.c code that uses
timestamps will lose precision thanks to time_t < double (bug #919012).
2004-06-19 20:50:47 +00:00
Brett Cannon c6c1f478d9 pydoc.stripid() is now case-insensitive for its regex to support platforms that
have pointer addresses in uppercase.

Closes bug #934282.  Thanks Robin Becker.
2004-06-19 01:02:51 +00:00
Skip Montanaro 56f6a4f225 allow developers to more easily build a profiling version of the interpreter
and modules by configuring with the --enable-profiling flag.
2004-06-18 02:47:22 +00:00
Raymond Hettinger b67ad7e671 Patch #826074: cmath.log optional base argument, fixes #823209
(Contributed by Andrew Gaul.)
2004-06-14 07:40:10 +00:00
Martin v. Löwis ad21945d03 Back out #957240. 2004-06-14 04:58:42 +00:00
Anthony Baxter c982bbde1c Bug 957381: rpmbuild builds a -debuginfo rpm on recent Redhat and Fedora releases.
Ignore it, rather than breaking.

Will backport.

(and r1.1000 for Misc/NEWS!)
2004-06-11 17:16:46 +00:00
Anthony Baxter 3ecdb250af Fix for bug #966623 - classes created with type() in an exec(, {}) don't
have a __module__. Test for this case.

Bugfix candidate, will backport.
2004-06-11 14:41:18 +00:00
Raymond Hettinger 33ecffb65a SF patch #969791: Add nlargest() and nsmallest() to heapq. 2004-06-10 05:03:17 +00:00
Martin v. Löwis 737ea82a5a Patch #774665: Make Python LC_NUMERIC agnostic. 2004-06-08 18:52:54 +00:00
Martin v. Löwis bdec50f027 Feature request #935915: Add os.path.devnull. 2004-06-08 08:29:33 +00:00
Martin v. Löwis f30d60edbc Patch #510695: Add TSC profiling for the VM. 2004-06-08 08:17:44 +00:00
Tim Peters 604c013ef2 SF 952807: Unpickling pickled instances of subclasses of datetime.date,
datetime.datetime and datetime.time could yield insane objects.  Thanks
to Jiwon Seo for the fix.

Bugfix candidate.  I'll backport it to 2.3.
2004-06-07 23:04:33 +00:00