Christian Heimes
fb2d25a154
Issue #1646 : Make socket support TIPC. The socket module now has support
...
for TIPC under Linux, see http://tipc.sf.net/ for more information.
Thanks to Alberto Bertogli for the patch
2008-01-07 16:12:44 +00:00
Raymond Hettinger
dc55f35f38
Add another named tuple subclassing example.
2008-01-07 09:03:49 +00:00
Jeffrey Yasskin
fd1c24518b
Fix issue 1747: allow classic classes to be checked for being subclasses of
...
ABCs.
2008-01-07 06:09:40 +00:00
Raymond Hettinger
1db6f80cd5
Cleanup subclassing example to more clearly show fixed-width print format.
2008-01-07 05:50:35 +00:00
Raymond Hettinger
b8e0072fec
Add subclassing example to docs for named tuples.
2008-01-07 04:24:49 +00:00
Raymond Hettinger
844f71b7e4
Speed-up named tuple's _make() constructor.
2008-01-06 22:11:54 +00:00
Georg Brandl
e260ba2d33
#1325 : Add docs and tests for zipimporter.archive and zipimporter.prefix.
2008-01-06 16:49:50 +00:00
Georg Brandl
c45346f57a
#1591 : Clarify docstring of Popen3.
2008-01-06 14:33:52 +00:00
Georg Brandl
183a084da3
#1742 : don't raise exception on os.path.relpath("a", "a"), but return os.curdir.
...
Reported by Jesse Towner.
2008-01-06 14:27:15 +00:00
Georg Brandl
e2a902c669
#1696393 : don't check for '.' and '..' in ntpath.walk since
...
they aren't returned from os.listdir anymore.
Reported by Michael Haggerty.
2008-01-06 14:17:36 +00:00
Raymond Hettinger
1166872006
Small code simplification. Forgot that classmethods can be called from intances.
2008-01-06 09:02:24 +00:00
Guido van Rossum
c6a04c2629
Patch #1637 : fix urlparse for URLs like ' http://x.com?arg=/foo '.
...
Fix by John Nagle.
2008-01-05 22:19:06 +00:00
Georg Brandl
f725b9587c
Doc patch #1730 from Robin Stocker; minor corrections mostly to os.rst.
2008-01-05 19:44:22 +00:00
Andrew M. Kuchling
0589914e60
Fix comment typo
2008-01-05 15:13:49 +00:00
Jeffrey Yasskin
9871d8fe22
Continue rolling back pep-3141 changes that changed behavior from 2.5. This
...
round included:
* Revert round to its 2.6 behavior (half away from 0).
* Because round, floor, and ceil always return float again, it's no
longer necessary to have them delegate to __xxx___, so I've ripped
that out of their implementations and the Real ABC. This also helps
in implementing types that work in both 2.6 and 3.0: you return int
from the __xxx__ methods, and let it get enabled by the version
upgrade.
* Make pow(-1, .5) raise a ValueError again.
2008-01-05 08:47:13 +00:00
Fred Drake
f7476c4d46
clean up a comment
2008-01-05 04:38:38 +00:00
Raymond Hettinger
1b50fd7cb3
Add error-checking to namedtuple's _replace() method.
2008-01-05 02:17:24 +00:00
Raymond Hettinger
02740f73ff
Improve namedtuple's _cast() method with a docstring, new name, and error-checking.
2008-01-05 01:35:43 +00:00
Guido van Rossum
ced4eb06e4
Patch #1698 by Senthil: allow '@' in username when parsed by urlparse.py.
2008-01-05 01:21:57 +00:00
Guido van Rossum
3b83549ea0
Patch #1725 by Mark Dickinson, fixes incorrect conversion of -1e1000
...
and adds errors for -0x.
2008-01-05 00:59:59 +00:00
Christian Heimes
a47b75b0a0
socket.ioctl is only available on Windows
2008-01-04 15:48:06 +00:00
Christian Heimes
04ae916fa2
Added interface to Windows' WSAIoctl and a simple example for a network sniffer.
2008-01-04 15:23:30 +00:00
Lars Gustäbel
2ee1c760cc
Issue #1735 : TarFile.extractall() now correctly sets
...
directory permissions and times.
(will backport to 2.5)
2008-01-04 14:00:33 +00:00
Christian Heimes
0687561c94
Bug #1713 : posixpath.ismount() claims symlink to a mountpoint is a mountpoint.
2008-01-04 13:21:07 +00:00
Jeffrey Yasskin
737c73f96f
Make math.{floor,ceil}({int,long}) return float again for backwards
...
compatibility after r59671 made them return integral types.
2008-01-04 08:01:23 +00:00
Raymond Hettinger
e0734e7dc0
Minor fix-ups to named tuples:
...
* Make the _replace() method respect subclassing.
* Using property() to make _fields read-only wasn't a good idea.
It caused len(Point._fields) to fail.
* Add note to _cast() about length checking and alternative with the star-operator.
2008-01-04 03:22:53 +00:00
Christian Heimes
76d19f68e4
Added _struct._clearcache() for regression tests
2008-01-04 02:54:42 +00:00
Christian Heimes
f2f41ebef4
Fixed refleak tests for _struct changes
2008-01-04 02:46:19 +00:00
Christian Heimes
8267d1dfe5
Bug #1481296 : Fixed long(float('nan'))!=0L.
2008-01-04 00:37:34 +00:00
Christian Heimes
0613188bc3
Fixed #1687 : plistlib.py restricts <integer> to Python int when writing
2008-01-04 00:04:52 +00:00
Raymond Hettinger
2f6621cce7
Finish-up the struct module optimizations started at the Iceland NFS sprint.
2008-01-04 00:01:15 +00:00
Christian Heimes
eebb79cc69
Added copysign(x, y) function to the math module
2008-01-03 22:32:26 +00:00
Christian Heimes
e2ca4245c9
Added math.isinf() and math.isnan()
2008-01-03 20:23:15 +00:00
Guido van Rossum
ae04c3356e
Issue #1700 , reported by Nguyen Quan Son, fix by Fredruk Lundh:
...
Regular Expression inline flags not handled correctly for some unicode
characters. (Forward port from 2.5.2.)
2008-01-03 19:12:44 +00:00
Jeffrey Yasskin
2f3c16be73
Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (just
...
the complex_pow part), r56649, r56652, r56715, r57296, r57302, r57359, r57361,
r57372, r57738, r57739, r58017, r58039, r58040, and r59390, and new
documentation. The only significant difference is that round(x) returns a float
to preserve backward-compatibility. See http://bugs.python.org/issue1689 .
2008-01-03 02:21:52 +00:00
Guido van Rossum
27edd829d7
Patch #1696 . Don't attempt to close None in dry-run mode.
2008-01-02 19:00:46 +00:00
Kurt B. Kaiser
0a11232978
Change docstrings to comments so test output will display normally.
2008-01-02 05:23:38 +00:00
Kurt B. Kaiser
0f7c25d20f
Issue1177
...
r58207 and r58247 patch logic is reversed. I noticed this when I
tried to use urllib to retrieve a file which required auth.
Fix that and add a test for 401 error to verify.
2008-01-02 04:11:28 +00:00
Martin v. Löwis
f5d902fc47
Always convert Text.index result to string.
...
This improves compatibility with Tcl 8.5, which would
otherwise return textindex objects.
2008-01-01 21:08:18 +00:00
Christian Heimes
9a1d8cec11
Added support for new Windows build dirs in PC/ to distutils.sysconfig
2008-01-01 14:37:32 +00:00
Guido van Rossum
96b3249670
Fix an odd error which would only occur close to new year's eve, due
...
to use of datetime.datetime.now() instead of utcnow() for comparison.
(I think the test can still fail if it's executed pretty much *at*
new year's eve, but that's not worth fixing.)
2008-01-01 04:15:29 +00:00
Christian Heimes
cdaa2cbfd5
Added wininst-9.0.exe executable for VS 2008
...
Integrated bdist_wininst into PCBuild9 directory
2007-12-31 14:47:07 +00:00
Kurt B. Kaiser
28c7bcf38e
Configure Dialog: improved layout for keybinding. Patch 1457 Tal Einat.
2007-12-28 04:18:01 +00:00
Brett Cannon
a6e515b90d
Remove a straggling debugging print line.
2007-12-25 06:44:59 +00:00
Brett Cannon
4e438bcc56
Actually execute the tests for the getter/setter/deleter tests on properties.
...
Also fix the test by having the test classes inherit from object.
Are the getter/setter/deleter attributes supposed to be able to chain? As of
right now they can't as the property tries to call what the property returns,
which is another property when they are chained.
2007-12-25 00:14:34 +00:00
Guido van Rossum
e9a0e885db
Patch #1672 by Joseph Armbruster. Use tempdir() to get a temporary directory.
2007-12-20 17:28:10 +00:00
Brett Cannon
905c31c73d
Add tests for the warnings module; specifically formatwarning and showwarning.
...
Still need tests for warn_explicit and simplefilter.
2007-12-20 10:09:52 +00:00
Guido van Rossum
0b7b6fdff3
Patch #1549 by Thomas Herve.
...
This changes the rules for when __hash__ is inherited slightly,
by allowing it to be inherited when one or more of __lt__, __le__,
__gt__, __ge__ are overridden, as long as __eq__ and __ne__ aren't.
2007-12-19 22:51:13 +00:00
Guido van Rossum
02de8979cc
Patch #1583 by Adam Olsen.
...
This adds signal.set_wakeup_fd(fd) which sets a file descriptor to
which a zero byte will be written whenever a C exception handler runs.
I added a simple C API as well, PySignal_SetWakeupFd(fd).
2007-12-19 19:41:06 +00:00
Raymond Hettinger
80016c9555
Fix issue 1661: Flags argument silently ignored in re functions with compiled regexes.
2007-12-19 18:13:31 +00:00