]> granicus.if.org Git - python/log
python
18 years agoMinor fix to the tests pass ok even with -O.
Facundo Batista [Tue, 10 Apr 2007 03:00:37 +0000 (03:00 +0000)]
Minor fix to the tests pass ok even with -O.

18 years agoPatch #1695862: remove old test directory that causes test_urllib failures
Žiga Seilnacht [Mon, 9 Apr 2007 19:10:29 +0000 (19:10 +0000)]
Patch #1695862: remove old test directory that causes test_urllib failures
on Windows buildbots.  The change is a one time fix and will be removed
after a successful buildbot run.

18 years agoAdded optional timeout to SocketHandler.makeSocket (SF #1695948)
Vinay Sajip [Mon, 9 Apr 2007 16:16:10 +0000 (16:16 +0000)]
Added optional timeout to SocketHandler.makeSocket (SF #1695948)

18 years agoDoc that file.next() has undefined behaviour when called on a file opened with
Brett Cannon [Sun, 8 Apr 2007 04:29:32 +0000 (04:29 +0000)]
Doc that file.next() has undefined behaviour when called on a file opened with
'w'.  Closes bug #1569057.

To be backported once 2.5 branch is unfrozen.

18 years agoConvert test_fileinput to use unittest.
Collin Winter [Sat, 7 Apr 2007 04:40:43 +0000 (04:40 +0000)]
Convert test_fileinput to use unittest.

18 years agoConvert test_module to use unittest.
Collin Winter [Fri, 6 Apr 2007 20:03:11 +0000 (20:03 +0000)]
Convert test_module to use unittest.

18 years agoConvert test_gc to use unittest.
Collin Winter [Fri, 6 Apr 2007 20:00:05 +0000 (20:00 +0000)]
Convert test_gc to use unittest.

18 years agoImport cleanup in test_crypt.
Collin Winter [Fri, 6 Apr 2007 19:32:32 +0000 (19:32 +0000)]
Import cleanup in test_crypt.

18 years agoConvert test_stringprep to use unittest.
Collin Winter [Fri, 6 Apr 2007 19:27:40 +0000 (19:27 +0000)]
Convert test_stringprep to use unittest.

18 years agoSome grammar fixes
Andrew M. Kuchling [Fri, 6 Apr 2007 01:11:58 +0000 (01:11 +0000)]
Some grammar fixes

18 years agoConvert test_normalization to use unittest.
Collin Winter [Thu, 5 Apr 2007 20:08:56 +0000 (20:08 +0000)]
Convert test_normalization to use unittest.

18 years agoConvert test_long_future to use unittest.
Collin Winter [Thu, 5 Apr 2007 20:05:07 +0000 (20:05 +0000)]
Convert test_long_future to use unittest.

18 years agoBug #1563759: struct.unpack doens't support buffer protocol objects
Raymond Hettinger [Thu, 5 Apr 2007 18:00:03 +0000 (18:00 +0000)]
Bug #1563759: struct.unpack doens't support buffer protocol objects

18 years agoFix WalkTests.test_traversal() on Windows. The cleanup in
Žiga Seilnacht [Wed, 4 Apr 2007 18:38:47 +0000 (18:38 +0000)]
Fix WalkTests.test_traversal() on Windows.  The cleanup in
MakedirTests.setUp() can now be removed.

18 years agoMake test_softspace use unittest.
Collin Winter [Wed, 4 Apr 2007 18:36:30 +0000 (18:36 +0000)]
Make test_softspace use unittest.

18 years agoMake test_getopt use unittest.
Collin Winter [Wed, 4 Apr 2007 18:33:40 +0000 (18:33 +0000)]
Make test_getopt use unittest.

18 years agoBug #1686475: Support stat'ing open files on Windows again.
Martin v. Löwis [Wed, 4 Apr 2007 18:30:36 +0000 (18:30 +0000)]
Bug #1686475: Support stat'ing open files on Windows again.
Will backport to 2.5.

18 years agoStop using test_support.verify().
Collin Winter [Wed, 4 Apr 2007 18:16:24 +0000 (18:16 +0000)]
Stop using test_support.verify().

18 years agoClean up imports.
Collin Winter [Wed, 4 Apr 2007 18:14:17 +0000 (18:14 +0000)]
Clean up imports.

18 years agoFix a race condition in this test -- instead of assuming that it will take
Guido van Rossum [Wed, 4 Apr 2007 17:43:02 +0000 (17:43 +0000)]
Fix a race condition in this test -- instead of assuming that it will take
the test server thread at most 0.5 seconds to get ready, use an event
variable.

18 years agoFixed the way that the .pem files are looked for, and changed
Facundo Batista [Wed, 4 Apr 2007 14:10:40 +0000 (14:10 +0000)]
Fixed the way that the .pem files are looked for, and changed
how to kill the process in win32 to use the _handle attribute.

18 years agoChanged the whole structure of startup and checking if the
Facundo Batista [Tue, 3 Apr 2007 21:15:34 +0000 (21:15 +0000)]
Changed the whole structure of startup and checking if the
server is available. Hope to not get more false alarms.

18 years agoImplement a contextmanager test.test_support.catch_warning that can
Walter Dörwald [Tue, 3 Apr 2007 18:33:29 +0000 (18:33 +0000)]
Implement a contextmanager test.test_support.catch_warning that can
be used to catch the last warning issued by the warning framework.

Change test_warnings.py and test_structmembers.py to use this
new contextmanager.

18 years agoAdded a SSL server to test_socket_ssl.py to be able to test
Facundo Batista [Tue, 3 Apr 2007 17:29:48 +0000 (17:29 +0000)]
Added a SSL server to test_socket_ssl.py to be able to test
locally. Now, it checks if have openssl available and run
those specific tests (it starts openssl at the beggining of
all the tests and then kills it at the end).

18 years agoAdd tests for the filename.
Walter Dörwald [Tue, 3 Apr 2007 16:53:43 +0000 (16:53 +0000)]
Add tests for the filename.

Test that the stacklevel is handled correctly.

18 years agoDocument that CatchWarningTests is reused by test_structmembers.py.
Walter Dörwald [Tue, 3 Apr 2007 16:16:24 +0000 (16:16 +0000)]
Document that CatchWarningTests is reused by test_structmembers.py.

18 years agoMove the functionality for catching warnings in test_warnings.py into a separate
Walter Dörwald [Tue, 3 Apr 2007 16:08:10 +0000 (16:08 +0000)]
Move the functionality for catching warnings in test_warnings.py into a separate
class to that reusing the functionality in test_structmembers.py doesn't rerun
the tests from test_warnings.py.

18 years agoNow using unittest for the tests infraestructure. Also split the
Facundo Batista [Tue, 3 Apr 2007 14:05:08 +0000 (14:05 +0000)]
Now using unittest for the tests infraestructure. Also split the
tests in those who need the network, and that who doesn't.

18 years agoFix the strange case of
Georg Brandl [Tue, 3 Apr 2007 07:04:27 +0000 (07:04 +0000)]
Fix the strange case of

\begin{methoddesc}[NNTP]{...}

where

\ifx#1\@undefined ended up comparing N and N, therefore executing
the true part of the conditional, blowing up at \@undefined.

18 years ago- Fix an off-by-one bug in locale.strxfrm().
Matthias Klose [Tue, 3 Apr 2007 04:35:59 +0000 (04:35 +0000)]
- Fix an off-by-one bug in locale.strxfrm().

  patch taken from http://bugs.debian.org/416934.

18 years agoSF #1382213: Tutorial section 9.5.1 ignores MRO for new-style classes
Raymond Hettinger [Tue, 3 Apr 2007 01:39:43 +0000 (01:39 +0000)]
SF #1382213:  Tutorial section 9.5.1 ignores MRO for new-style classes

18 years agoSF 1602378 Clarify docstrings for bisect
Raymond Hettinger [Tue, 3 Apr 2007 00:02:11 +0000 (00:02 +0000)]
SF 1602378 Clarify docstrings for bisect

18 years agoFix warnings about object.__init__() signature.
Guido van Rossum [Mon, 2 Apr 2007 23:55:37 +0000 (23:55 +0000)]
Fix warnings about object.__init__() signature.
Two (test_array and test_descr) were bug IMO; the third (copy_reg)
is a work-around which recognizes that object.__init__() doesn't do
anything.

18 years agoArray module's buffer interface can now handle empty arrays.
Raymond Hettinger [Mon, 2 Apr 2007 22:54:21 +0000 (22:54 +0000)]
Array module's buffer interface can now handle empty arrays.

18 years agoSF #1693079: Cannot save empty array in shelve
Raymond Hettinger [Mon, 2 Apr 2007 17:29:30 +0000 (17:29 +0000)]
SF #1693079:  Cannot save empty array in shelve

18 years agoFix the class name of strings.
Georg Brandl [Sun, 1 Apr 2007 23:31:30 +0000 (23:31 +0000)]
Fix the class name of strings.

18 years agoRemove bogus entry.
Georg Brandl [Sun, 1 Apr 2007 23:29:10 +0000 (23:29 +0000)]
Remove bogus entry.

18 years agoSome semantic fixes.
Georg Brandl [Sun, 1 Apr 2007 22:47:31 +0000 (22:47 +0000)]
Some semantic fixes.

18 years agoExplicit class names.
Georg Brandl [Sun, 1 Apr 2007 22:40:12 +0000 (22:40 +0000)]
Explicit class names.

18 years agoLots of explicit class names for method and member descs.
Georg Brandl [Sun, 1 Apr 2007 22:39:10 +0000 (22:39 +0000)]
Lots of explicit class names for method and member descs.

18 years agoAnother fix.
Georg Brandl [Sun, 1 Apr 2007 21:39:52 +0000 (21:39 +0000)]
Another fix.

18 years agoFix a lot of markup and meta-information glitches.
Georg Brandl [Sun, 1 Apr 2007 21:29:15 +0000 (21:29 +0000)]
Fix a lot of markup and meta-information glitches.

18 years agoFix the test for recreating the locale cache object by not worrying about if
Brett Cannon [Sun, 1 Apr 2007 19:46:19 +0000 (19:46 +0000)]
Fix the test for recreating the locale cache object by not worrying about if
one of the test locales cannot be set.

18 years agotime.strptime's caching of its locale object was being recreated when the
Brett Cannon [Sun, 1 Apr 2007 18:47:27 +0000 (18:47 +0000)]
time.strptime's caching of its locale object was being recreated when the
locale changed but not used during the function call it was recreated during.

The test in this checkin is untested (OS X does not have the proper locale
support for me to test), although the fix for the bug this deals with
was tested by the OP (#1290505).  Once the buildbots verify the test at least
doesn't fail it becomes a backport candidate.

18 years agoSF #1685563, MSVCCompiler creates redundant and long PATH strings
Neal Norwitz [Sun, 1 Apr 2007 18:24:22 +0000 (18:24 +0000)]
SF #1685563, MSVCCompiler creates redundant and long PATH strings

If MSVCCompiler.initialize() was called multiple times, the path
would get duplicated.  On Windows, this is a problem because the
path is limited to 4k.  There's no benefit in adding a path multiple
times, so prevent that from occuring.  We also normalize the path
before checking for duplicates so things like /a and /a/ won't both
be stored.

Will backport.

18 years agoShut up an occaisonal buildbot error due to test files being left around.
Collin Winter [Sat, 31 Mar 2007 19:31:34 +0000 (19:31 +0000)]
Shut up an occaisonal buildbot error due to test files being left around.

18 years agoBug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS
Georg Brandl [Sat, 31 Mar 2007 18:56:11 +0000 (18:56 +0000)]
Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS
returned by python-config if Python was built with --enable-shared
because that prevented the shared library from being used.

18 years agoFix method names. Will backport.
Neal Norwitz [Sat, 31 Mar 2007 18:54:18 +0000 (18:54 +0000)]
Fix method names.  Will backport.

18 years agoTypo fix.
Georg Brandl [Sat, 31 Mar 2007 11:59:54 +0000 (11:59 +0000)]
Typo fix.

18 years agoDuplicate label fix.
Georg Brandl [Sat, 31 Mar 2007 11:58:36 +0000 (11:58 +0000)]
Duplicate label fix.

18 years agoMarkup fix.
Georg Brandl [Sat, 31 Mar 2007 11:54:58 +0000 (11:54 +0000)]
Markup fix.

18 years agorepair string literal.
Georg Brandl [Sat, 31 Mar 2007 10:17:31 +0000 (10:17 +0000)]
repair string literal.

18 years agoMarkup fix.
Georg Brandl [Fri, 30 Mar 2007 19:14:02 +0000 (19:14 +0000)]
Markup fix.

18 years agoDuplicate label fix.
Georg Brandl [Fri, 30 Mar 2007 19:01:38 +0000 (19:01 +0000)]
Duplicate label fix.

18 years agoAdd item. (Oops, accidentally checked this in on my branch)
Andrew M. Kuchling [Fri, 30 Mar 2007 18:00:15 +0000 (18:00 +0000)]
Add item.  (Oops, accidentally checked this in on my branch)

18 years agoMarkup fix.
Georg Brandl [Fri, 30 Mar 2007 17:48:39 +0000 (17:48 +0000)]
Markup fix.

18 years agoDuplicate label fix.
Georg Brandl [Fri, 30 Mar 2007 17:47:21 +0000 (17:47 +0000)]
Duplicate label fix.

18 years agoLabel name fix.
Georg Brandl [Fri, 30 Mar 2007 17:39:39 +0000 (17:39 +0000)]
Label name fix.

18 years agoMarkup fix.
Georg Brandl [Fri, 30 Mar 2007 15:49:05 +0000 (15:49 +0000)]
Markup fix.

18 years agoBump the patch level version of distutils since there were a few bug fixes since
Marc-André Lemburg [Fri, 30 Mar 2007 15:01:42 +0000 (15:01 +0000)]
Bump the patch level version of distutils since there were a few bug fixes since
the 2.5.0 release.

18 years agoBug #1688274: add documentation for C-level class objects.
Collin Winter [Fri, 30 Mar 2007 14:01:25 +0000 (14:01 +0000)]
Bug #1688274: add documentation for C-level class objects.

18 years agoAdded the posibility to pass the timeout to FTP.connect, not only when
Facundo Batista [Fri, 30 Mar 2007 13:00:35 +0000 (13:00 +0000)]
Added the posibility to pass the timeout to FTP.connect, not only when
instantiating the class. Docs and tests are updated.

18 years agoAdded timout parameter to telnetlib.Telnet. Also created
Facundo Batista [Thu, 29 Mar 2007 18:22:35 +0000 (18:22 +0000)]
Added timout parameter to telnetlib.Telnet. Also created
test_telnetlib.py with a basic test and timeout ones.
Docs are also updated.

18 years agoIn Windows' time.clock(), when QueryPerformanceFrequency() fails,
Georg Brandl [Thu, 29 Mar 2007 12:42:07 +0000 (12:42 +0000)]
In Windows' time.clock(), when QueryPerformanceFrequency() fails,
the C lib's clock() is used, but it must be divided by CLOCKS_PER_SEC
as for the POSIX implementation (thanks to #pypy).

18 years agoThese are actually methods.
Georg Brandl [Thu, 29 Mar 2007 07:41:32 +0000 (07:41 +0000)]
These are actually methods.

18 years agoMake test_zipfile clean up its temporary files properly.
Collin Winter [Thu, 29 Mar 2007 02:28:16 +0000 (02:28 +0000)]
Make test_zipfile clean up its temporary files properly.

18 years agoConsolidate patches #1690164, 1683397, and 1690169, all of which refactor XML-related...
Collin Winter [Wed, 28 Mar 2007 23:34:06 +0000 (23:34 +0000)]
Consolidate patches #16901641683397, and 1690169, all of which refactor XML-related test suites. The patches are applied together because they use a common output/xmltests file.
Thanks to Jerry Seutter for all three patches.

18 years agoAdded timeout to smtplib (to SMTP and SMTP_SSL). Also created
Facundo Batista [Wed, 28 Mar 2007 18:25:54 +0000 (18:25 +0000)]
Added timeout to smtplib (to SMTP and SMTP_SSL). Also created
the test_smtplib.py file, with a basic test and the timeout
ones. Docs are updated too.

18 years agoBug 1688393. Adds a control of negative values in
Facundo Batista [Wed, 28 Mar 2007 03:45:20 +0000 (03:45 +0000)]
Bug 1688393. Adds a control of negative values in
socket.recvfrom, which caused an ugly crash.

18 years agoThe basic test cases of poplib.py.
Facundo Batista [Tue, 27 Mar 2007 18:50:29 +0000 (18:50 +0000)]
The basic test cases of poplib.py.

18 years agoAdded an optional timeout to poplib.POP3. Also created a
Facundo Batista [Tue, 27 Mar 2007 18:23:21 +0000 (18:23 +0000)]
Added an optional timeout to poplib.POP3. Also created a
test_poplib.py file with a basic test and the timeout
ones. Docs are also updated.

18 years agoForgot to add the file before the previous commit, here go
Facundo Batista [Mon, 26 Mar 2007 20:56:09 +0000 (20:56 +0000)]
Forgot to add the file before the previous commit, here go
the ftplib tests.

18 years agoSome nits.
Georg Brandl [Mon, 26 Mar 2007 20:28:28 +0000 (20:28 +0000)]
Some nits.

18 years agoAdded an optional timeout to FTP class. Also I started a test_ftplib.py
Facundo Batista [Mon, 26 Mar 2007 20:18:31 +0000 (20:18 +0000)]
Added an optional timeout to FTP class. Also I started a test_ftplib.py
file to test the ftp lib (right now I included a basic test, the timeout
one, and nothing else).

18 years agoMarkup fix.
Georg Brandl [Sun, 25 Mar 2007 19:04:55 +0000 (19:04 +0000)]
Markup fix.

18 years agoMarkup fix.
Georg Brandl [Sun, 25 Mar 2007 18:44:35 +0000 (18:44 +0000)]
Markup fix.

18 years agoClosing the HTTP connection after each test, and listening more.
Facundo Batista [Sun, 25 Mar 2007 03:20:05 +0000 (03:20 +0000)]
Closing the HTTP connection after each test, and listening more.

18 years agoRedone the tests, using the infrastructure already present
Facundo Batista [Sun, 25 Mar 2007 01:53:21 +0000 (01:53 +0000)]
Redone the tests, using the infrastructure already present
for threading and socket serving.

18 years agoChange the docs to no longer claim that unittest is preferred over doctest for
Brett Cannon [Sun, 25 Mar 2007 01:32:36 +0000 (01:32 +0000)]
Change the docs to no longer claim that unittest is preferred over doctest for
regression tests.

18 years agoRevert accidental change.
Georg Brandl [Sat, 24 Mar 2007 22:27:56 +0000 (22:27 +0000)]
Revert accidental change.

18 years agoRemove typo accent.
Georg Brandl [Sat, 24 Mar 2007 22:20:34 +0000 (22:20 +0000)]
Remove typo accent.

18 years agoPatch #1489771: update syntax rules in Python Reference Manual.
Žiga Seilnacht [Sat, 24 Mar 2007 14:24:26 +0000 (14:24 +0000)]
Patch #1489771: update syntax rules in Python Reference Manual.
Python 2.5 added support for explicit relative import statements and
yield expressions, which were missing in the manual.
Also fix grammar productions that used the names from the Grammar file,
markup that broke the generated grammar.txt, and wrap some lines that
broke the pdf output.  Will backport.

18 years agoMake test_relpath() pass on Windows.
Collin Winter [Fri, 23 Mar 2007 22:24:39 +0000 (22:24 +0000)]
Make test_relpath() pass on Windows.

18 years agoSurrounded with try/finally to socket's default timeout setting
Facundo Batista [Fri, 23 Mar 2007 20:23:08 +0000 (20:23 +0000)]
Surrounded with try/finally to socket's default timeout setting
changes in the tests, so failing one test won't produce strange
results in others. Also relaxed the timeout settings in the test
(where actually the value didn't mean anything).

18 years agoPrevent creation (followed by a segfault) of array types when the size
Thomas Heller [Fri, 23 Mar 2007 19:55:27 +0000 (19:55 +0000)]
Prevent creation (followed by a segfault) of array types when the size
overflows the valid Py_ssize_t range.  Check return values of
PyMem_Malloc.

Will backport to release25-maint.

18 years agoAdd note about type.__init__().
Guido van Rossum [Fri, 23 Mar 2007 19:39:01 +0000 (19:39 +0000)]
Add note about type.__init__().

18 years agoAdded a 'create_connect()' function to socket.py, which creates a
Facundo Batista [Fri, 23 Mar 2007 18:54:07 +0000 (18:54 +0000)]
Added a 'create_connect()' function to socket.py, which creates a
connection with an optional timeout, and modified httplib.py to
use this function in HTTPConnection. Applies patch 1676823.

18 years agoAdd a type.__init__() method that enforces the same signature as
Guido van Rossum [Fri, 23 Mar 2007 18:53:03 +0000 (18:53 +0000)]
Add a type.__init__() method that enforces the same signature as
type.__new__(), and then calls object.__init__(cls), just to be anal.

This allows us to restore the code in string.py's _TemplateMetaclass
that called super(...).__init__(name, bases, dct), which I commented
out yesterday since it broke due to the stricter argument checking
added to object.__init__().

18 years agoBug #978833: Revert r50844, as it broke _socketobject.dup.
Martin v. Löwis [Fri, 23 Mar 2007 13:27:15 +0000 (13:27 +0000)]
Bug #978833: Revert r50844, as it broke _socketobject.dup.
Will backport.

18 years agoPatch #1686451: Fix return type for PySequence_{Count,Index,Fast_GET_SIZE}.
Martin v. Löwis [Fri, 23 Mar 2007 10:35:49 +0000 (10:35 +0000)]
Patch #1686451: Fix return type for PySequence_{Count,Index,Fast_GET_SIZE}.
Will backport.

18 years agoAdd Mark Dickinson for SF # 1675423.
Neal Norwitz [Fri, 23 Mar 2007 05:17:23 +0000 (05:17 +0000)]
Add Mark Dickinson for SF # 1675423.

18 years ago- Bug #1683368: The object.__init__() and object.__new__() methods are
Guido van Rossum [Fri, 23 Mar 2007 04:58:42 +0000 (04:58 +0000)]
- Bug #1683368: The object.__init__() and object.__new__() methods are
  now stricter in rejecting excess arguments.  The only time when
  either allows excess arguments is when it is not overridden and the
  other one is.  For backwards compatibility, when both are
  overridden, it is a deprecation warning (for now; maybe a Py3k
  warning later).

When merging this into 3.0, the warnings should become errors.

Note: without the change to string.py, lots of spurious warnings happen.
What's going on there?

18 years agoExplain the purpose of the b_needsfree flag (forward ported from release25-maint).
Thomas Heller [Thu, 22 Mar 2007 20:34:37 +0000 (20:34 +0000)]
Explain the purpose of the b_needsfree flag (forward ported from release25-maint).

18 years agoBack out "Patch #1643874: memory leak in ctypes fixed."
Thomas Heller [Thu, 22 Mar 2007 19:44:31 +0000 (19:44 +0000)]
Back out "Patch #1643874: memory leak in ctypes fixed."

The code in this patch leaves no way to give up the ownership of a
BSTR instance.

18 years agoBug #1685704: use -m switch in timeit docs.
Georg Brandl [Thu, 22 Mar 2007 08:05:45 +0000 (08:05 +0000)]
Bug #1685704: use -m switch in timeit docs.

18 years agoAdd test and fix for fromkeys() optional argument.
Raymond Hettinger [Wed, 21 Mar 2007 20:33:57 +0000 (20:33 +0000)]
Add test and fix for fromkeys() optional argument.

18 years agoBug #1675967: re patterns pickled with older Python versions can
Žiga Seilnacht [Wed, 21 Mar 2007 20:07:56 +0000 (20:07 +0000)]
Bug #1675967: re patterns pickled with older Python versions can
now be unpickled. Will backport.

18 years agoMinor clarification, saying that blocking means no timeout (from bug #882297)
Facundo Batista [Wed, 21 Mar 2007 19:41:24 +0000 (19:41 +0000)]
Minor clarification, saying that blocking means no timeout (from bug #882297)

18 years agoPut code examples at left margin instead of indenting them
Andrew M. Kuchling [Wed, 21 Mar 2007 16:59:20 +0000 (16:59 +0000)]
Put code examples at left margin instead of indenting them

18 years agoFix sentence, and fix typo in example
Andrew M. Kuchling [Wed, 21 Mar 2007 16:57:32 +0000 (16:57 +0000)]
Fix sentence, and fix typo in example