Commit Graph

1037 Commits

Author SHA1 Message Date
Tim Peters 3318792e5f SF bug 497854: Short-cuts missing for All Users
Fix Windows-specific install glitch.  Tested on Win2K, but I can't test
on XP.
Already checked in to the release22-maint branch.
2002-04-04 20:02:04 +00:00
Fred Drake fed7e85791 Add note about changes in xml.sax.expatreader. 2002-04-04 19:36:15 +00:00
Guido van Rossum 2e1c09c1fd Removed old Digital Creations copyright/license notices (with
permission from Paul Everitt).  Also removed a few other references to
Digital Creations and changed the remaining ones to Zope Corporation.
2002-04-04 17:52:50 +00:00
Marc-André Lemburg 4626009493 Added note about updated freeze.py Tool. 2002-04-04 16:17:11 +00:00
Guido van Rossum 47834463d0 Add a note about bool. 2002-04-04 15:21:33 +00:00
Tim Peters 8deda70b16 Eliminate DONT_SHARE_SHORT_STRINGS. 2002-03-30 10:06:07 +00:00
Martin v. Löwis 1142de3f5b Patch #527027: Allow building python as shared library. 2002-03-29 16:28:31 +00:00
Tim Peters 1f7df3595a Remove the CACHE_HASH and INTERN_STRINGS preprocessor symbols. 2002-03-29 03:29:08 +00:00
Guido van Rossum 95b62a6dd4 News for SF #535905. 2002-03-29 01:07:24 +00:00
Martin v. Löwis 2e64c34850 Expose C library's gettext. Fixes #516412. 2002-03-27 18:49:02 +00:00
Neal Norwitz 0c766a0bb6 Change sys_exit to use METH_VARARGS.
sys.exit() now requires 0-1 arguments.  Previously 2+ arguments were allowed.
2002-03-27 13:03:09 +00:00
Neil Schemenauer 9d50d138e7 Add news about pymalloc being enabled. 2002-03-22 17:06:59 +00:00
Walter Dörwald b25c2b0a4a [Apply SF patch #504943]
This patch makes it possible to pass Warning instances as the first
argument to warnings.warn. In this case the category argument
will be ignored. The message text used will be str(warninginstance).
2002-03-21 10:38:40 +00:00
Barry Warsaw d164837856 (py-temp-directory): Add /var/tmp to the list of directories this
searches.  This is added after /tmp.  Closes SF bug #505488, except
that /var/tmp comes after /tmp instead of the patch's suggestion of
putting it before /usr/tmp.
2002-03-18 18:53:56 +00:00
Martin v. Löwis 5c137c2251 Patch #495598: add an -q (quiet) option to pycompile. 2002-03-18 12:44:08 +00:00
Martin v. Löwis 587c98c863 Patch #430706: Persistent connections in BaseHTTPServer. 2002-03-17 18:37:22 +00:00
Barry Warsaw d36cfe495e (py-honor-comment-indentation, py-compute-indentation): Fix the
implementation to match the documentation for
py-honor-comment-indentation w.r.t. not nil or t value.  In that case
it should still ignore ## for indentation purposes.  Closes SF bug
#523825, w/ patch provided by Christian Stork (mod'd by Barry).

Python 2.2.1 candidate.
2002-03-15 16:46:46 +00:00
Guido van Rossum 8c84255316 "Fix" for SF bug #520644: __slots__ are not pickled.
As promised in my response to the bug report, I'm not really fixing
it; in fact, one could argule over what the proper fix should do.
Instead, I'm adding a little magic that raises TypeError if you try to
pickle an instance of a class that has __slots__ but doesn't define or
override __getstate__.  This is done by adding a bozo __getstate__
that always raises TypeError.

Bugfix candidate (also the checkin to typeobject.c, of course).
2002-03-14 23:05:54 +00:00
Tim Peters fbf74f2acc News about zlib-1.1.4. 2002-03-14 19:06:01 +00:00
Tim Peters fb05db2cae file_truncate(): provide full "large file" support on Windows, by
dropping MS's inadequate _chsize() function.  This was inspired by
SF patch 498109 ("fileobject truncate support for win32"), which I
rejected.

libstdtypes.tex:  Someone who knows should update the availability
blurb.  For example, if it's available on Linux, it would be good to
say so.

test_largefile:  Uncommented the file.truncate() tests, and reworked to
do more.  The old comment about "permission errors" in the truncation
tests under Windows was almost certainly due to that the file wasn't open
for *write* access at this point, so of course MS wouldn't let you
truncate it.  I'd be appalled if a Unixish system did.

CAUTION:  Someone should run this test on Linux (etc) too.  The
truncation part was commented out before.  Note that test_largefile isn't
run by default.
2002-03-11 00:24:00 +00:00
Martin v. Löwis cfeb3b6ab8 Patch #50002: Display line information for bad \x escapes:
- recognize "SyntaxError"s by the print_file_and_line attribute.
- add the syntaxerror attributes to all exceptions in compile.c.
Fixes #221791
2002-03-03 21:30:27 +00:00
Guido van Rossum 2eb0b87d14 SF patch 514641 (Naofumi Honda) - Negative ob_size of LongObjects
Due to the bizarre definition of _PyLong_Copy(), creating an instance
of a subclass of long with a negative value could cause core dumps
later on.  Unfortunately it looks like the behavior of _PyLong_Copy()
is quite intentional, so the fix is more work than feels comfortable.

This fix is almost, but not quite, the code that Naofumi Honda added;
in addition, I added a test case.
2002-03-01 22:24:49 +00:00
Guido van Rossum 6f33250ef9 SF patch 517245 by Marc Recht.
Support GMP version >= 2.

Bugfix candidate.
2002-03-01 21:31:27 +00:00
Martin v. Löwis 29001ff234 Patch #523268, #522027: return enhanced tuples. 2002-03-01 10:47:37 +00:00
Martin v. Löwis 9986633609 Patch 520694: arraymodule.c improvements:
- make array.array a type
- add Py_UNICODE arrays
- support +=, *=
2002-03-01 10:27:01 +00:00
Guido van Rossum 88b666ca3f SF patch 518765 (Derek Harland): Bug in copy.py when used through
rexec.

When using a restricted environment, imports of copy will fail with an
AttributeError when trying to access types.CodeType.

Bugfix candidate (all the way back to 1.5.3, but at least 2.1.3 and
2.2.1).
2002-02-28 23:19:52 +00:00
Tim Peters e64ef931d6 SF patch 522961: Leak in Python/thread_nt.h, from Gerald S. Williams.
A file-static "threads" dict mapped thread IDs to Windows handles, but
was never referenced, and entries never got removed.  This gets rid of
the YAGNI-dict entirely.
Bugfix candidate.
2002-02-28 21:34:34 +00:00
Guido van Rossum bc64f7c6f3 Edward K. Ream. 2002-02-25 23:12:32 +00:00
Martin v. Löwis b2c92f44d4 Patch #511193: Implement killpg in posixmodule. 2002-02-16 23:35:41 +00:00
Marc-André Lemburg a5d2b4cb18 Break SSL support out of _socket module and place it into a new
helper module _ssl.

The support for the RAND_* APIs in _ssl is now only enabled
for OpenSSL 0.9.5 and up since they were added in that
release.

Note that socketmodule.* should really be renamed to _socket.* --
unfortunately, this seems to lose the CVS history of the file.

Please review and test... I was only able to test the header file
chaos in socketmodule.c/h on Linux. The test run through fine
and compiles don't give errors or warnings.

WARNING: This patch does *not* include changes to the various
non-Unix build process files.
2002-02-16 18:23:30 +00:00
Guido van Rossum ff34626a7e Remove stub for unicode.txt. Resort README in dictionary order. 2002-02-11 01:18:25 +00:00
Marc-André Lemburg 37aa580742 News about the new alias support. 2002-02-10 21:42:47 +00:00
Marc-André Lemburg e92e0a944e Add news about PYC magic and changes to UTF-8 codec. 2002-02-09 11:28:43 +00:00
Tim Peters ab034fab03 Implement os.waitpid() for Windows, in a way that's compatible with Linux
where their capabilities intersect.  Would be nice if people using non-
MSVC compilers (Borland etc) took a whack at doing something similar for
them (this code relies on the MS _cwait function).
2002-02-01 11:27:43 +00:00
Tim Peters 11bd9944e5 New tempfile and os.open() gimmicks for Windows. 2002-02-01 00:52:29 +00:00
Martin v. Löwis ef180dc3d0 Document that get_referrers can return unreachable but uncollected objects.
Fixes #505453.
2002-01-26 20:11:50 +00:00
Martin v. Löwis fb0da9d770 Test for error status of shl_findsym. Fixes #505417. 2.2.1 candiate. 2002-01-26 20:03:48 +00:00
Thomas Heller d45a543418 Another name. 2002-01-18 20:56:28 +00:00
Martin v. Löwis 9668b933e3 Patch #414775: Add --skip-build option to bdist command. 2002-01-12 11:27:42 +00:00
Martin v. Löwis a55ffaeee9 Add a per-message fallback mechanism for translations. 2002-01-11 06:58:49 +00:00
Martin v. Löwis 1be6419871 Add fallback argument to translation(). Request fallbacks on install.
Fixes #500595.
2002-01-11 06:33:28 +00:00
Fred Drake 3673612754 Added item about the webbrowser security fix. 2002-01-10 13:50:31 +00:00
Marc-André Lemburg 3e3eacb5fc Fixed "u#" parser marker to pass through Unicode objects as-is without
going through the buffer interface API.

Added tests for this to the _testcapi module and updated docs.
2002-01-09 16:21:27 +00:00
Guido van Rossum 23105d5c24 Checked in Sean Reifschneider's RPM spec file and patches. Bugfix candidate. 2002-01-06 03:29:16 +00:00
Neal Norwitz e790eae7cf Improve grammar 2002-01-01 21:14:12 +00:00
Martin v. Löwis 93227275dc Patch #497126: Always compile dl. 2002-01-01 20:18:30 +00:00
Martin v. Löwis 7198a525f3 Patch #494783: Rename cmp_op enumerators. 2002-01-01 19:59:11 +00:00
Neal Norwitz 649b75954a SF Patch #494863, file.xreadlines() should raise ValueError if file is closed
This makes xreadlines behave like all other file methods
(other than close() which just returns).
2002-01-01 19:07:13 +00:00
Martin v. Löwis a6e975801e Patch #497098: build support for GNU/Hurd. 2002-01-01 18:41:33 +00:00
Guido van Rossum 606fe4e79f SF patch #497420 (Eduardo Pérez): ftplib: ftp anonymous password
Instead of sending the real user and host, use "anonymous@" (i.e. no
host name at all!) as the default anonymous FTP password.  This avoids
privacy violations.
2001-12-28 20:57:14 +00:00
Guido van Rossum c33e077838 SF patch #497420 (Eduardo Pérez): ftplib: ftp anonymous password
Instead of sending the real user and host, use "anonymous@" (i.e. no
host name at all!) as the default anonymous FTP password.  This avoids
privacy violations.
2001-12-28 20:54:28 +00:00
Jack Jansen 5560269675 Added someone. 2001-12-27 23:37:49 +00:00
Tim Peters 10a3bb53a8 SF bug #495548: troublesome #define in pyport.h
Removed the ancient "#define ANY void".

Bugfix candidate?  Hard call.  The bug report claims the existence of
this #define creates conflicts with other packages, which is easy to
believe.  OTOH, some extension authors may still be relying on its
presence.  I'm afraid you can't win on this one.
2001-12-25 19:07:38 +00:00
Tim Peters af8446f823 Added 2.3a1 section. 2001-12-21 21:36:50 +00:00
Barry Warsaw 52acb49298 Merge of the release22 branch changes back into the trunk. 2001-12-21 20:04:22 +00:00
Guido van Rossum 1cb65e265a ZZZ. 2001-12-20 15:56:23 +00:00
Guido van Rossum 54dc1d31ab Another contributor. 2001-12-20 13:19:36 +00:00
Guido van Rossum f83142910b Fix for SF bug #494904: Cannot pickle a class with a metaclass,
reported by Dan Parisien.
2001-12-19 16:57:36 +00:00
Tim Peters 1fbb577ee2 SF bug #494738: binascii_b2a_base64 overwrites memory.
binascii_b2a_base64():  We didn't allocate enough buffer space for very
short inputs (e.g., a 1-byte input can produce a 5-byte output, but we
only allocated 2 bytes).  I expect that malloc overheads absorbed the
overrun in practice, but computing a correct upper bound is a very simple
change.
2001-12-19 04:41:35 +00:00
Tim Peters 909c091646 Post-release fiddling -- prep for 2.2 final. 2001-12-14 23:16:18 +00:00
Barry Warsaw 0655745ab0 Merge last minute 2.2c1 changes from branch to trunk. 2001-12-14 20:47:12 +00:00
Fred Drake 6c01e25d9f Note the tighter complex() parameter checking. 2001-12-14 17:08:12 +00:00
Jeremy Hylton 61f649d608 For the exec-free var bug. 2001-12-13 19:53:26 +00:00
Tim Peters 6272dfd99f Update Windows buildno for 2.2c1.
Update 2.2c1 release data in NEWS.
2001-12-13 19:34:00 +00:00
Tim Peters bf72fe2650 Added -Qnew news about the test_coercion.py failure. That's the only test
that still fails under -Qnew, and is so tied to details of current
behavior that fixing it before new division becomes the default is
impractical.
2001-12-11 21:43:14 +00:00
Tim Peters f582b82fe9 SF bug #491415 PyDict_UpdateFromSeq2() unused
PyDict_UpdateFromSeq2():  removed it.
PyDict_MergeFromSeq2():  made it public and documented it.
PyDict_Merge() docs:  updated to reveal <wink> that the second
argument can be any mapping object.
2001-12-11 18:51:08 +00:00
Guido van Rossum 1d961f5e5f New fodder. 2001-12-10 15:46:20 +00:00
Guido van Rossum 146483964e Patch supplied by Burton Radons for his own SF bug #487390: Modifying
type.__module__ behavior.

This adds the module name and a dot in front of the type name in every
type object initializer, except for built-in types (and those that
already had this).  Note that it touches lots of Mac modules -- I have
no way to test these but the changes look right.  Apologies if they're
not.  This also touches the weakref docs, which contains a sample type
object initializer.  It also touches the mmap test output, because the
mmap type's repr is included in that output.  It touches object.h to
put the correct description in a comment.
2001-12-08 18:02:58 +00:00
Tim Peters 25059d30c3 SF patch #489173: Make os.spawnv not block the interpreter, from
Anthony Roach.
Release the global interpreter lock around platform spawn calls.
Bugfix candidate?  Hard to say; I favor "yes, bugfix".
These clearly *should* have been releasing the GIL all along, if for no
other reason than compatibility with the similar os.system().  But it's
possible some program out there is (a) multithreaded, (b) calling a spawn
function with P_WAIT, and (c) relying on the spawn call to block all their
threads until the spawned program completes.  I think it's very unlikely
anyone is doing that on purpose, but someone may be doing so by accident.
2001-12-07 20:35:43 +00:00
Jack Jansen 1999ef4973 Test wether we are building on a case-insensitive filesystem (such
as OSX HFS+) and if so add an extension to the python executable, but
only in the build directory, not on the installed python.
2001-12-06 21:47:20 +00:00
Jack Jansen ffa260fb54 sys.platform is now "darwin" without digits appended. 2001-12-06 21:14:00 +00:00
Tim Peters 3caca2326e SF bug #488514: -Qnew needs work
Big Hammer to implement -Qnew as PEP 238 says it should work (a global
option affecting all instances of "/").

pydebug.h, main.c, pythonrun.c:  define a private _Py_QnewFlag flag, true
iff -Qnew is passed on the command line.  This should go away (as the
comments say) when true division becomes The Rule.  This is
deliberately not exposed to runtime inspection or modification:  it's
a one-way one-shot switch to pretend you're using Python 3.

ceval.c:  when _Py_QnewFlag is set, treat BINARY_DIVIDE as
BINARY_TRUE_DIVIDE.

test_{descr, generators, zipfile}.py:  fiddle so these pass under
-Qnew too.  This was just a matter of s!/!//! in test_generators and
test_zipfile.  test_descr was trickier, as testbinop() is passed
assumptions that "/" is the same as calling a "__div__" method; put
a temporary hack there to call "__truediv__" instead when the method
name is "__div__" and 1/2 evaluates to 0.5.

Three standard tests still fail under -Qnew (on Windows; somebody
please try the Linux tests with -Qnew too!  Linux runs a whole bunch
of tests Windows doesn't):
    test_augassign
    test_class
    test_coercion
I can't stay awake longer to stare at this (be my guest).  Offhand
cures weren't obvious, nor was it even obvious that cures are possible
without major hackery.

Question:  when -Qnew is in effect, should calls to __div__ magically
change into calls to __truediv__?  See "major hackery" at tail end of
last paragraph <wink>.
2001-12-06 06:23:26 +00:00
Guido van Rossum bf7c804588 SF patch #489680 (David Abrahams): h2py uses nonexistent method splitfields() 2001-12-06 03:31:04 +00:00
Guido van Rossum 33bab01da6 Fix SF bug #489581: __slots__ leak.
It was easier than I thought, assuming that no other things contribute
to the instance size besides slots -- a pretty good bet.  With a test
suite, no less!
2001-12-05 22:45:48 +00:00
Guido van Rossum d331cb5502 At the PythonLabs meeting someone mentioned it would make Jim really
happy if one could delete the __dict__ attribute of an instance.  I
love to make Jim happy, so here goes...

- New-style objects now support deleting their __dict__.  This is for
  all intents and purposes equivalent to assigning a brand new empty
  dictionary, but saves space if the object is not used further.
2001-12-05 19:46:42 +00:00
Guido van Rossum bebfe03617 Another no-longer-nameless contributor... 2001-12-04 21:33:34 +00:00
Guido van Rossum cd7b7d6110 Add note about fixed hash() of mutable objects. 2001-12-04 21:02:07 +00:00
Guido van Rossum cdbbd0a59d New about super. 2001-12-03 15:46:59 +00:00
Guido van Rossum 22f9c6ddb8 Add Greg Chapman. 2001-12-03 15:37:40 +00:00
Guido van Rossum 4b80085ddd Fix for SF bug #485678.
slot_tp_descr_set(): When deleting an attribute described by a
descriptor implemented in Python, the descriptor's __del__ method is
called by the slot_tp_descr_set dispatch function.  This is bogus --
__del__ already has a different meaning. Renaming this use of __del__
is renamed to __delete__.
2001-12-03 00:54:52 +00:00
Martin v. Löwis 714d2e2487 Patch #487275: windows-1251 charset alias. 2001-12-02 12:26:03 +00:00
Tim Peters cffed4bc21 SF bug 486278 SystemError: Python/getargs.c:1086: bad.
vgetargskeywords():  Now that this routine is checking for bad input
(rather than dump core in some cases), some bad calls are raising errors
that previously "worked".  This patch makes the error strings more
revealing, and changes the exceptions from SystemError to RuntimeError
(under the theory that SystemError is more of a "can't happen!" assert-
like thing, and so inappropriate for bad arguments to a public C API
function).
2001-11-29 03:26:37 +00:00
Tim Peters 6d20b43a4e SF bug 485175: buffer overflow in traceback.c.
Bugfix candidate.
tb_displayline():  the sprintf format was choking off the file name, but
used plain %s for the function name (which can be arbitrarily long).
Limit both to 500 chars max.
2001-11-27 20:30:42 +00:00
Martin v. Löwis 652e1917c6 Properly set static options for tixBalloon and tixResizeHandle.
Expose Tix.ResizeHandle.{detach_widget,hide,show}.
Update Tix demos.
2001-11-25 14:50:56 +00:00
Martin v. Löwis 3a89b2b131 Patch #484847: Default to netscape.exe on OS/2. 2001-11-25 14:35:58 +00:00
Martin v. Löwis 560da62fc7 Rename get_referents to get_referrers. Fixes #483815. 2001-11-24 09:24:51 +00:00
Tim Peters b3c9af17d9 Add skeleton for 2.2c1 news. 2001-11-17 00:21:57 +00:00
Barry Warsaw 012852ba7f Merged in NEWS changes from the r22b2 branch. 2001-11-16 16:17:27 +00:00
Guido van Rossum 3fc08d23c7 Group dict[ionary] news together; and use dict() instead of
dictionary().
2001-11-15 20:33:10 +00:00
Guido van Rossum 3d27df0734 Correct the description of mixed multiple inheritance: the code
special-cases classic classes, it doesn't do anything about other
cases where different metaclasses are involved (except for the trivial
case where one metaclass is a subclass of the others).  Also note that
it's metaclass, not metatype.
2001-11-15 20:27:54 +00:00
Tim Peters 76f7fe37bb News about mixing classic and new-style classes in MI. 2001-11-15 20:02:21 +00:00
Tim Peters 5ebfd36afa CVS patch #477161: New "access" keyword for mmap, from Jay T Miller.
This gives mmap() on Windows the ability to create read-only, write-
through and copy-on-write mmaps.  A new keyword argument is introduced
because the mmap() signatures diverged between Windows and Unix, so
while they (now) both support this functionality, there wasn't a way to
spell it in a common way without introducing a new spelling gimmick.
The old spellings are still accepted, so there isn't a backward-
compatibility issue here.
2001-11-13 23:11:19 +00:00
Jeremy Hylton 249aaeda0a Add note about assignment to __debug__ being an error. 2001-11-09 21:06:24 +00:00
Martin v. Löwis 25ee87cc50 Patch #478654: Expose tk_chooseDirectory.
Also delegate kw arguments through ** calls.
2001-11-07 22:38:08 +00:00
Tim Peters 7a33d8bb64 News about OS/2 Visual Age C++ patches. 2001-11-05 02:51:07 +00:00
Tim Peters 169ded0d68 Finish SF patch 477059: __del__ on new classes vs. GC.
Just doc and NEWS here, about the change in gc.garbage meaning.
2001-11-03 19:57:21 +00:00
Tim Peters 7533587d43 Improved error msg when a symbolic group name is redefined. Added docs
and NEWS.  Bugfix candidate?  That's a dilemma for Anthony <wink>:  /F
did fix a longstanding bug here, but the fix can cause code to raise an
exception that previously worked by accident.
2001-11-03 19:35:43 +00:00
Martin v. Löwis b7b3260128 Patch #471120: Improved doc strings and new wrappers. 2001-11-02 23:48:20 +00:00
Tim Peters ae0f1ed92c Move a name into correct position. 2001-10-31 04:45:45 +00:00
Tim Peters 59ed448bc6 SF patch #474485: pydoc generates some bad html, from Rich Salz. 2001-10-31 04:20:26 +00:00