* 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.
* 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.
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.
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.
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.
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.
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.