Commit Graph

31535 Commits

Author SHA1 Message Date
Brett Cannon 5399c6d3d4 Switch from getting LDFLAGS and CPPFLAGS from the environment to the Makefile.
This is to avoid a problem that inconsistently comes up where the environment
variable is unset while the Makefile clearly has the values set and are used
during ``make``.

Closes bug #1081045.
2004-12-18 20:48:09 +00:00
Raymond Hettinger 7e71fa5cfa Bug #1083645
* The decimal module wouldn't load on builds without threads.
2004-12-18 19:07:19 +00:00
Raymond Hettinger 193814c308 Small boost to PySequence_Fast(). Lists build faster than tuples for
unsized iterable inputs.
2004-12-18 19:00:59 +00:00
Andrew MacIntyre a3be258477 fix unterminated comment 2004-12-18 09:51:05 +00:00
Raymond Hettinger bf72b71630 Refactor:
* Improve algorithm -- no more O(n) steps except sched.cancel().
* Improve thread safety of sched.run() and sched.empty()
  (other threads could alter the queue between the time the queue was
   first checked and when the lead event was deleted).
* Localize variable access in sched.run() to minimize overhead.
2004-12-17 13:52:20 +00:00
Raymond Hettinger 6f5b741a46 SF bug #1086555: refcount problem in syslog 2004-12-16 23:52:04 +00:00
Raymond Hettinger b0900e6a21 SF #1085304: Make array.array pickle-able 2004-12-16 16:23:40 +00:00
Raymond Hettinger e6bdb37e5b Add missing decref. 2004-12-16 15:10:21 +00:00
Raymond Hettinger 4d01259fb2 SF bug #1085744: Performance issues with PySequence_Tuple()
* Added missing error checks.
* Fixed O(n**2) growth pattern.  Modeled after lists to achieve linear
  amortized resizing.  Improves construction of "tuple(it)" when "it" is
  large and does not have a __len__ method.  Other cases are unaffected.
2004-12-16 10:38:38 +00:00
Gregory P. Smith 8a6a59c58b fixed compilation against BerkeleyDB 3.2.9 (sf bug # 1077040) 2004-12-16 09:47:28 +00:00
Walter Dörwald 3fa932f7ed Fix typo (from SF bug #1086127). 2004-12-15 23:44:18 +00:00
Walter Dörwald 29ddfba3d8 Fix copy & paste error in comments. 2004-12-14 21:28:07 +00:00
Raymond Hettinger 744aaa02e0 SF bug #1084457: ossaudiodev no longer undocumented 2004-12-14 07:19:22 +00:00
Marc-André Lemburg b4cebd465a Correct mapping of Python codec name to C encoding name for UTF-8 (the C lib
doesn't seem to like "UTF-8").

Removed the UTF-8 aliases since these should be available for all locales.
2004-12-13 19:56:01 +00:00
Johannes Gijsbers 537d3fcf93 Check in missing png version of pyfav.gif. 2004-12-13 13:07:59 +00:00
Gregory P. Smith e76c8c0383 rewrote the bsddb module BerkeleyDB library and include file locating
code.  This version is much cleaner and makes a proper attempt at
pairing up the correct header file and library.
2004-12-13 12:01:24 +00:00
Anthony Baxter 57ee770df1 note for amk 2004-12-13 11:39:33 +00:00
Gregory P. Smith 7af53a6de4 the bsddb module now also works with BerkeleyDB 4.3. 2004-12-13 09:57:32 +00:00
Gregory P. Smith 8b7e917ab2 * Adds support for building against BerkeleyDB 4.3.21
* bumped the module version number up to 4.3.0
2004-12-13 09:51:23 +00:00
Johannes Gijsbers f4a70f35b0 Patch #1080684: typo repair. Thanks George Yoshida!
- Doc/lib/libbase64.tex
s/algorith/algorithm

- Doc/lib/libpickle.tex
s/interchangable/interchangeable

- Doc/lib/libxmlrpclib.tex
s/{_cmp__}/{__cmp__}

leading underscore needs to be double, not single.

- Doc/ref/ref6.tex
0/1 => False/True
2004-12-12 16:52:40 +00:00
Johannes Gijsbers 1542f34c42 Patch #1011890: fix inspect.getsource breaking with line-continuation &
more. Thanks to Simon Percivall!

The patch makes changes to inspect.py in two places:

* the pattern to match against functions at line 436 is
modified: lambdas should be matched even if not
preceded by whitespace, as long as "lambda" isn't part
of another word.

* the BlockFinder class is heavily modified. Changes are:
- checking for "def", "class" or "lambda" names
before setting self.started to True. Then checking the
same line for word characters after the colon (if the
colon is on that line). If so, and the line does not
end with a line continuation marker, raise EndOfBlock
immediately.
- adding self.passline to show that the line is to be
included and no more checking is necessary on that
line. Since a NEWLINE token is not generated when a
line continuation marker exists, this allows getsource
to continue with these functions even if the following
line would not be indented.

Also add a bunch of
'quite-unlikely-to-occur-in-real-life-but-working-anyway' tests.
2004-12-12 16:46:28 +00:00
Johannes Gijsbers cb9015dc08 Patch #736962: port test_inspect to unittest. As part of this, move out
the fodder modules to separate files to get rid of the imp.load_source()
trickery.
2004-12-12 16:20:22 +00:00
Johannes Gijsbers 6b220b0355 Use os.geteuid() for checking whether we are root, as suggested by
Michael Hudson.
2004-12-12 15:52:57 +00:00
Martin v. Löwis eb68be465f Replace VB with VC. 2004-12-12 15:29:21 +00:00
Andrew MacIntyre a4a8afb4e1 OS/2 specific fixes related to SF bug # 1003471.
Also revise a related function to minimise file handle/pipe leakage
and improve reliability.
2004-12-12 08:30:51 +00:00
Andrew MacIntyre d0278ec97f OS/2 specific fixes related to SF bug # 1003471 2004-12-12 08:28:11 +00:00
Brett Cannon 222d5b466b Setting textwrap.TextWrapper().expand_tabs to True calls expandtabs, not
expand_tabs, on the object being wrapped.
2004-12-11 09:53:52 +00:00
Raymond Hettinger a9ef5e565d SF bug #1083202L UnboundLocalError raised by atexit module
The sys module could be called before being imported.
2004-12-11 02:49:40 +00:00
Marc-André Lemburg bb4f1bdd8b locale.py now uses an updated locale alias table (built using
Tools/i18n/makelocalealias.py, a tool to parse the X11 locale
alias file); the encoding lookup was enhanced to use Python's
encoding alias table

As sige-effect, this fixes SF bug [ 1080864 ] locale.py doesn't recognize
valid locale setting.
2004-12-10 21:58:14 +00:00
Marc-André Lemburg 9ab8818c87 Rearranged mappings to value sorting order. 2004-12-10 21:54:35 +00:00
Raymond Hettinger 8ef9b3e527 SF bug #1082944: Incorrect docs for PyUnicode_TailMatch
* Note correct return type is int.
* Note that -1 returned on failure.
2004-12-10 17:12:32 +00:00
Tim Peters 7f06187d31 Whitespace normalization. 2004-12-07 21:17:46 +00:00
Fred Drake 333da5f000 remove the other half of one of the regsub-related comments; the other
half was removed in revision 1.25
2004-12-07 14:08:24 +00:00
Raymond Hettinger 3557f42658 Combined several entries. 2004-12-07 12:02:02 +00:00
Raymond Hettinger 6c1e0fe7ba Remove reference to old pickle feature. 2004-12-07 08:26:10 +00:00
Raymond Hettinger 57aef9cb29 Remove outdated references to the regsub module. 2004-12-07 07:55:07 +00:00
Raymond Hettinger a6b45cc31d Eliminate the deprecated option to return None instead of a tuple of arguments in __reduce__(). 2004-12-07 07:05:57 +00:00
Brett Cannon 84667c063a Change code in setup.py for parsing LDFLAGS and CPPFLAGS to use optparse
instead of getopt.  Required making use of gettext._ as optional (optparse
changed OK'ed by Greg Ward in private email).
2004-12-07 03:25:18 +00:00
Brett Cannon 516592f4ff setup.py now uses the library directories specified in LDFLAGS (``-L``
directories) and the include directories specified in CPPFLAGS (``-I``
directories) for compiling the extension modules.

This has led to the core being compiled with the values in the shell's
CPPFLAGS.  It has also removed the need for special casing to use Fink and
DarwinPorts under darwin since the needed directories can now be specified in
LDFLAGS and CPPFLAGS (e.g., DarwinPorts users can now do
``LDFLAGS=-L/opt/local/lib; CPPFLAGS=-I/opt/local/include; ./configure`` for
everything to work properly).

Parsing the values in the environment variables is done with getopt.  While optparse
would have been a nicer solution it cannot be used because of dependency issues
at execution time; optparse uses gettext which uses struct which will not have
been compiled when the code is imported.  If optparse ever makes its
importation of gettext optional by catching ImportError and setting _() to an
identity function then it can be used.
2004-12-07 00:42:59 +00:00
Brett Cannon 9e635cf3ae Put parentheses around the assignment in the 'while' loop conditional
expression in min_max() to shut gcc up.
2004-12-07 00:25:35 +00:00
Johannes Gijsbers 25946ddac9 Patch #1075928: AUTH PLAIN in smtplib.
smtplib can not log in to some server using command AUTH PLAIN, it sends
``user\0user\0pass'' to the server, but ``\0user\0pass'' has better
compatibility.
2004-12-06 21:25:26 +00:00
Johannes Gijsbers b8b09d0513 SF bug #1076467: don't run test_on_error as root, as the permission
errors don't get provoked that way. Also add a bunch of cross-references
to bugs.
2004-12-06 20:50:15 +00:00
Raymond Hettinger a32d22a509 Remove deprecated xmllib from inclusion in the docs. 2004-12-06 12:29:56 +00:00
Walter Dörwald e208412348 Fix for SF bug #947894: calendar.weekheader() undocumented 2004-12-06 07:58:14 +00:00
Brett Cannon c8aa848ece Have test_mkalias_relative check that sys.prefix already exists; otherwise test
is pointless.

Also add a note to the docs for the 'test' package that test cases should check
first that any conditions needed in the operating system are met before having
a test run.

Closes bug #1077302.  THanks, Ian Holsman.
2004-12-06 06:08:59 +00:00
Brett Cannon 98809b76ae Very minor grammatical fix and removal of a tab. 2004-12-06 06:01:13 +00:00
Peter Astrand 5f5e141589 Changed signature of call function to avoid confusion: this 'args' is not the same as the one to the Popen constructor 2004-12-05 20:15:36 +00:00
Raymond Hettinger c7979f16ec Removed deprecated tzparse module. 2004-12-05 11:38:18 +00:00
Raymond Hettinger b2594050ea Added optional None arguments to itertools.islice(). 2004-12-05 09:25:51 +00:00
Fred Drake d2f70cbe8e remove dependencies that are no longer used for the library reference 2004-12-05 07:00:30 +00:00