Commit Graph

360 Commits

Author SHA1 Message Date
Martin v. Löwis 57a34e8026 Patch #1422385: Changes to nis module to support multiple NIS domains 2006-02-04 19:12:37 +00:00
Martin v. Löwis 3e86595280 Patch #1349118: urllib2 now supports user:pass@ style proxy
specifications, raises IOErrors when proxies for unsupported protocols
are defined, and uses the https proxy on https redirections.
2006-01-24 15:51:21 +00:00
Neal Norwitz 3f458d9feb Alphabetize some names and remove a dupe 2006-01-14 21:26:22 +00:00
Martin v. Löwis 11017b172d Patch #1103116: AF_NETLINK sockets basic support. 2006-01-14 18:12:57 +00:00
Neal Norwitz 3b4fff8079 Fix SF bug #1402308, segfault when using mmap(-1, ...)
This didn't crash on Linux, but valgrind complained.
I'm not sure if this test is valid on Windows.

Will backport.
2006-01-11 08:54:45 +00:00
Neal Norwitz 88bbd73d07 SF bug #1400822, Extended version of _curses over{lay,write} does not work
Fix signatures to conform to doc (also fixed ungetmouse()).

Will backport.
2006-01-10 07:05:44 +00:00
Georg Brandl e0aec6df5e Add myself. 2006-01-08 21:13:38 +00:00
Neal Norwitz f599f424a2 SF patch #1355913, PEP 341 - Unification of try/except and try/finally
Modified since ast-arenas was implemented.
2005-12-17 21:33:47 +00:00
Neal Norwitz 23a6958910 Add Michael Urman for work on SF patch #1365916 2005-12-17 18:41:15 +00:00
Martin v. Löwis b45b315855 Patch #1350409: Port signal handling to VS 2005. 2005-11-28 17:34:23 +00:00
Brett Cannon ad07ff2c77 Prevent threading.Thread.join() from blocking when a previous call raised an
exception (e.g., passing in an illegal argument).

Applies patch #1314396.  Thanks Eric Blossom.
2005-11-23 02:15:50 +00:00
Neal Norwitz cf4863831c Fix SF #1345263, colorsys tests, bug in frange
Fix a typo that caused step to be ignored.

Will backport.
2005-11-02 05:54:27 +00:00
Jeremy Hylton 3e0055f8c6 Merge ast-branch to head
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.

The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
2005-10-20 19:59:25 +00:00
Neal Norwitz c5cdcba2d9 SF patch #1227568, Expression AST node not documented. 2005-10-03 00:38:46 +00:00
Neal Norwitz 484d9a409a Patch #1309009, Fix segfault in pyexpat when the XML document is
in latin_1, but Python incorrectly assumes it is in UTF-8 format

Will backport.
2005-09-30 04:46:49 +00:00
Michael W. Hudson 10402a306f Patches #1298449 and #1298499: Add some missing checks for error
returns in cStringIO.c.  Thanks to Andrew Bennetts.

This must be a backport candidate.
2005-09-22 09:19:01 +00:00
Skip Montanaro d3b01deb17 credit source of idea for recent doc changes 2005-05-12 13:44:23 +00:00
Brett Cannon 4380242580 Modified test for tzset to not rely on tm->tm_zone's existence. Also added
sanity checks on tzname if HAVE_TZNAME defined.

Closes bug #1096244.  Thanks Gregory Bond.
2005-02-10 20:48:03 +00:00
Raymond Hettinger bab4143348 SF patch #1116583: NameError in cookielib domain check 2005-02-05 01:31:19 +00:00
Skip Montanaro 0af3ade6aa Add strptime() constructor to datetime class. Thanks to Josh Spoerri for
the changes.
2005-01-13 04:12:31 +00:00
Raymond Hettinger f9245578c9 Acknowledge contribution of a thorough tutorial review. 2004-12-03 08:33:32 +00:00
Raymond Hettinger 3b0c7c20a1 SF patch #1077353: add key= argument to min and max
(First draft of patch contributed by Steven Bethard.)
2004-12-03 08:30:39 +00:00
Raymond Hettinger 96b49a51d0 SF patch 1062495: Modules/zipimport.c does not compile on solaris (Contributed by Niki W. Waibel.)
Simple renaming to avoid a conflict that prevented compilation on Solaris.
2004-11-10 13:13:05 +00:00
Jeremy Hylton def9d2a17c Fix for SF bug 988120 via patch 1061941.
If read() returned less than the number of bytes request, the full amount was subtracted from length instead of the actually read amount.
2004-11-07 16:13:49 +00:00
Brett Cannon 06a30b087e Fix minor reST error in Misc/NEWS.
Applies patch #1051866.  Thanks Felix Wiemann.
2004-10-22 06:22:54 +00:00
Anthony Baxter a024034b94 Patch 1046644 - improved distutils support for SWIG. 2004-10-14 10:02:08 +00:00
Anthony Baxter 22dcf66f84 Patch 983206: distutils obeys LDSHARED env var. Removed the code in
Python's own setup.py that did the same thing (and tested on Solaris,
where LDSHARED is needed...)
2004-10-13 15:54:17 +00:00
Anthony Baxter e4f8a48b8f 969574 2004-10-13 14:55:56 +00:00
Martin v. Löwis 39a317890f Patch #1025790: Add status code constants to httplib. 2004-09-18 09:03:49 +00:00
Martin v. Löwis 23c48a12d9 Patch #808120: Add --force-arch=ARCH to bdist_rpm.py. 2004-09-10 06:32:54 +00:00
Jeremy Hylton 566d934745 compiler.transformer: correct lineno attribute when possible
SF patch #1015989

The basic idea of this patch is to compute lineno attributes for all AST nodes.  The actual
implementation lead to a lot of restructing and code cleanup.

The generated AST nodes now have an optional lineno argument to constructor.  Remove the
top-level asList(), since it didn't seem to serve any purpose.  Add an __iter__ to ast nodes.
Use isinstance() instead of explicit type tests.

Change transformer to use the new lineno attribute, which replaces three lines of code with one.
Use universal newlines so that we can get rid of special-case code for line endings.  Use
lookup_node() in a few more frequently called, but simple com_xxx methods().  Change string
exception to class exception.
2004-09-07 15:28:01 +00:00
Tim Peters 0973b99e1c SF patch 936813: fast modular exponentiation
This checkin is adapted from part 1 (of 3) of Trevor Perrin's patch set.

x_mul()
  - sped a little by optimizing the C
  - sped a lot (~2X) if it's doing a square; note that long_pow() squares
    often
k_mul()
  - more cache-friendly now if it's doing a square
KARATSUBA_CUTOFF
  - boosted; gradeschool mult is quicker now, and it may have been too low
    for many platforms anyway
KARATSUBA_SQUARE_CUTOFF
  - new
  - since x_mul is a lot faster at squaring now, the point at which
    Karatsuba pays for squaring is much higher than for general mult
2004-08-29 22:16:50 +00:00
Martin v. Löwis e064b41f5a Patch #914575: difflib side by side diff support, diff.py s/b/s HTML option. 2004-08-29 16:34:40 +00:00
Raymond Hettinger 08158a0c65 Add Nick Coghlan for his patch solving an issue with joining string
subclasses.
2004-08-23 23:30:20 +00:00
Andrew M. Kuchling 955d00922c Add name 2004-08-07 14:17:50 +00:00
Anthony Baxter 32083f64a7 notes for @decorator 2004-08-02 06:24:59 +00:00
Marc-André Lemburg 17b6d28c64 New codec: [ 996067 ] hp-roman8 codec 2004-07-28 15:37:54 +00:00
Martin v. Löwis 7b9190b8fc Patch #998149: imaplib deleteacl and myrights. 2004-07-27 05:07:19 +00:00
Martin v. Löwis cc0f93233a Patch #605370: Add description[s] for RFC 2980 compliance. 2004-07-26 12:40:50 +00:00
Andrew M. Kuchling 79d7e92a5c Add item 2004-07-10 21:21:55 +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
Michael W. Hudson 30ea2f223f This closes patch:
[ 960406 ] unblock signals in threads

although the changes do not correspond exactly to any patch attached to
that report.

Non-main threads no longer have all signals masked.

A different interface to readline is used.

The handling of signals inside calls to PyOS_Readline is now rather
different.

These changes are all a bit scary!  Review and cross-platform testing
much appreciated.
2004-07-07 17:44:12 +00:00
Andrew M. Kuchling 93b4b88e96 [Patch #974633] Check PyObject_MALLOC return for error 2004-06-29 14:03:04 +00:00
Raymond Hettinger 70b3a1ab0a Fix leak found by Eric Huss. 2004-06-25 22:20:33 +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
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 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
Raymond Hettinger 57c2d930f6 Add a final permutation step to the tuple hash function.
Prevents a collision pattern that occurs with nested tuples.
(Yitz Gale provided code that repeatably demonstrated the weakness.)
2004-06-10 18:42:15 +00:00
Andrew M. Kuchling b6568b91fd Add a name (old change sitting in my tree) 2004-06-02 15:37:04 +00:00
Raymond Hettinger 354433a59d SF patch #872326: Generator expression implementation
(Code contributed by Jiwon Seo.)

The documentation portion of the patch is being re-worked and will be
checked-in soon.  Likewise, PEP 289 will be updated to reflect Guido's
rationale for the design decisions on binding behavior (as described in
in his patch comments and in discussions on python-dev).

The test file, test_genexps.py, is written in doctest format and is
meant to exercise all aspects of the the patch.  Further additions are
welcome from everyone.  Please stress test this new feature as much as
possible before the alpha release.
2004-05-19 08:20:33 +00:00
Nicholas Bastin c723a14bfb ...for work done at PyCon 2004 (and beyond...) 2004-03-23 23:29:01 +00:00
Raymond Hettinger 31017aed36 SF #904720: dict.update should take a 2-tuple sequence like dict.__init_
(Championed by Bob Ippolito.)

The update() method for mappings now accepts all the same argument forms
as the dict() constructor.  This includes item lists and/or keyword
arguments.
2004-03-04 08:25:44 +00:00
Raymond Hettinger b32e640489 SF patch #875689: >100k alloc wasted on startup
(Contributed by Mike Pall.)

Make sure fill_free_list() is called only once rather than 106 times
when pre-allocating small ints.
2004-02-08 18:54:37 +00:00
Martin v. Löwis 12af0485f8 Patch #874083: Bluetooth support for socket module. 2004-01-31 12:34:17 +00:00
Raymond Hettinger 0c4102760c SF Patch #864863: Bisect C implementation
(Contributed by Dmitry Vasiliev.)
2004-01-05 10:13:35 +00:00
Andrew MacIntyre f1ca7f561c complete backout of listobject.c v2.171 2003-12-28 07:43:56 +00:00
Andrew MacIntyre d57caed52c Performance of list([]) in 2.3 came up in a thread on comp.lang.python,
which can be reviewed via
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2003-12/1011.html

Duncan Booth investigated, and discovered that an "optimisation" was
in fact a pessimisation for small numbers of elements in a source list,
compared to not having the optimisation, although with large numbers
of elements in the source list the optimisation was quite beneficial.

He posted his change to comp.lang.python (but not to SF).

Further research has confirmed his assessment that the optimisation only
becomes a net win when the source list has more than 100 elements.

I also found that the optimisation could apply to tuples as well,
but the gains only arrive with source tuples larger than about 320
elements and are nowhere near as significant as the gains with lists,
(~95% gain @ 10000 elements for lists, ~20% gain @ 10000 elements for
tuples) so I haven't proceeded with this.

The code as it was applied the optimisation to list subclasses as
well, and this also appears to be a net loss for all reasonable sized
sources (~80-100% for up to 100 elements, ~20% for more than 500
elements; I tested up to 10000 elements).

Duncan also suggested special casing empty lists, which I've extended
to all empty sequences.

On the basis that list_fill() is only ever called with a list for the
result argument, testing for the source being the destination has
now happens before testing source types.
2003-12-25 13:28:48 +00:00
Martin v. Löwis d8921379e9 Patch #798297: Add IMAP THREAD command. 2003-11-10 06:44:44 +00:00
Guido van Rossum 967b063add Plug tempfile.mktemp() hole (Iustin Pop). 2003-11-10 02:27:19 +00:00
Martin v. Löwis 48440b7c27 Patch #: Add POP3 over SSL support. 2003-10-31 12:52:35 +00:00
Brett Cannon 90f7d254a9 Added Bjorn Pettersen for initial conversion of Lib/platform.py's docstring to LaTeX. 2003-10-14 21:47:28 +00:00
Brett Cannon eab353ddc7 See rev. 1.250 for log message 2003-10-12 04:29:10 +00:00
Guido van Rossum 02c58f865c SF patch #820195 by Wojtek Walczak (gminick at users.sourceforge.net):
make obj.__contains__() returns True/False instead of 1/0.
2003-10-08 21:08:29 +00:00
Raymond Hettinger 3b9cff1ef5 SF 798269: bug fix for doctest (sf bug id: 798254
(Contributed by Alexander Belopolsky.)
2003-09-02 02:17:46 +00:00
Raymond Hettinger ec99b5fbfa SF patch #798534: Windows os.popen needlessly gets a reference to tuple ()
(Contributed by Andrew Gaul.)

Fixes a minor leak.
2003-09-01 22:34:31 +00:00
Raymond Hettinger 14cc1e3222 SF patch #798467: Update docstring of has_key for bool changes
(Contributed by George Yoshida.)
2003-09-01 22:17:18 +00:00
Andrew M. Kuchling 69f31eb80c [Patch #739124] Add use_default_colors() to curses module 2003-08-13 23:11:04 +00:00
Jeremy Hylton ed860039f5 SF patch 764470 2003-07-17 19:18:50 +00:00
Jeremy Hylton dabc37ce7b SF bug 770601. 2003-07-17 17:23:30 +00:00
Raymond Hettinger a4148c3cc8 Added Bob Halley for work on socket.timeout 2003-06-29 03:27:45 +00:00
Raymond Hettinger 90a2041ffd Added Steven Taschuk for efforts fixing zipfile.py 2003-06-28 20:10:26 +00:00
Raymond Hettinger c4370d94e1 Add the IDLEFORK team. 2003-06-09 08:55:14 +00:00
Raymond Hettinger 22952a3efc SF bug 735293: Command line timeit.py sets sys.path badly
Paul Moore's patch to have timeit.py check the current directory for
imports (instead of the directory for Lib/timeit.py).
2003-05-20 04:59:56 +00:00
Brett Cannon b539d05cbe John J. Lee contributed two urllib2 patches. 2003-05-12 22:39:57 +00:00
Jeremy Hylton 0f7b16173f help with MSVC 7 support in distutils 2003-05-09 16:08:22 +00:00
Jeremy Hylton c1b2cb9d8f SF bug 622042: Don't expect response body from HEAD request.
Bug fix candidate.
2003-05-05 16:13:58 +00:00
Guido van Rossum 47dfa4a89a Patch by Jp Calderone:
- The socket module now provides the functions inet_pton and inet_ntop
  for converting between string and packed representation of IP addresses.
  See SF patch #658327.

This still needs a bit of work in the doc area, because it is not
available on all platforms (especially not on Windows).
2003-04-25 05:48:32 +00:00
Guido van Rossum a26854095b - Several methods of nntplib.NNTP have grown an optional file argument
which specifies a file where to divert the command's output
  (already supported by the body() method).  (SF patch #720468)
  Thanks to Terry Carroll.
2003-04-19 18:04:57 +00:00
Jack Jansen 49754af873 Frank Vercruesse gave an okay on removing the copyright notice:
"Hereby I make the script in question available under the terms and
conditions of the latest Python License."
2003-03-25 10:20:55 +00:00
Skip Montanaro a0b3e6d191 add several people involved with PEP 305 and the csv package 2003-03-20 23:41:03 +00:00
Thomas Wouters dcf6d2c97d Add Hye-Shik Chang for SF patch/bugreport #703471. 2003-03-17 11:34:01 +00:00
Guido van Rossum d11b62edd0 - New function time.tzset() provides access to the C library tzet()
function, if supported.  (SF patch #675422, by Stuart Bishop.)
2003-03-14 21:51:36 +00:00
Raymond Hettinger 2c2d322884 SF patch #667730: More DictMixin
* Adds missing pop() methods to weakref.py
* Expands test suite to broaden coverage of objects with
  a mapping interface.

Contributed by Sebastien Keim.
2003-03-09 07:05:43 +00:00
Neal Norwitz 573e033488 Alphabetize some names
Add Grant Olson for patch provided to fix bug #678518
2003-02-10 01:09:49 +00:00
Guido van Rossum 7d9ea5013f - Thanks to Scott David Daniels, a subtle bug in how the zlib
extension implemented flush() was fixed.  Scott also rewrite the
  zlib test suite using the unittest module.  (SF bug #640230 and
  patch #678531.)

Backport candidate I think.
2003-02-03 20:45:52 +00:00
Guido van Rossum 99d4abf8a2 Support socket timeout in SSL, by Geoff Talvola.
(SF patch #675750, to fix SF bug #675552.)
2003-01-27 22:22:50 +00:00
Martin v. Löwis b32c886d71 Gyro Func for patch #661719. 2003-01-15 11:53:13 +00:00
Guido van Rossum 6d0d3655af Fix from Michael Stone for SF bug #660476 and #513033 (bogus thread
state swaps in readline).
2003-01-07 20:34:19 +00:00
Neal Norwitz b9ef4aea5e SF #651082, tarfile module implementation from Lars Gustäbel 2003-01-05 23:19:43 +00:00
Martin v. Löwis 24a880b499 Patch #656590: /dev/ptmx support for ptys. 2002-12-31 12:55:15 +00:00
Tim Peters 4643bd9a9c Apparently FreeBSD enables some HW floating-point exceptions by default.
This can cause core dumps when Python runs.  Python relies on the 754-
(and C99-) mandated default "non-stop" mode for FP exceptions.  This
patch from Ben Laurie disables at least one FP exception on FreeBSD at
Python startup time.
2002-12-28 21:56:08 +00:00
Martin v. Löwis 79acb9edfa Patch #614055: Support OpenVMS. 2002-12-06 12:48:53 +00:00
Tim Peters 7da3432be6 Added Marius Gedminas, for contributions to the datetime code. 2002-11-25 21:13:13 +00:00
Martin v. Löwis 0d1fdea8ef Patch #494845: Support string concatenation, detect non-string data,
add globbing support, find modules by name instead of by file.
2002-11-22 08:36:54 +00:00
Martin v. Löwis d899605e30 Patch #633547: Support plural forms. Do TODOs in test suite. 2002-11-21 21:45:32 +00:00
Michael W. Hudson d5c124af25 Richie Hindle 2002-11-08 13:09:39 +00:00
Martin v. Löwis 1da9c57c74 Patch #630829: Don't block on IAC, process suboptions. 2002-11-04 09:56:00 +00:00
Martin v. Löwis 74b51ac1e5 Patch #613256: Add nescape method to xml.sax.saxutils. 2002-10-26 14:50:45 +00:00
Martin v. Löwis edb6bff67f Add Daniel Stutzbach, for #512981. 2002-10-26 14:43:07 +00:00
Neal Norwitz d8407a7031 Add new encoding for Ukrainian Cyrillic 2002-10-17 22:15:33 +00:00