| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
the changes.
|
|
|
|
|
| |
user error messages (otherwise difficult to do without instrumenting
the source).
|
|
|
|
| |
to floats.
|
| |
|
|
|
|
|
|
|
|
| |
PyNumber_Check, rather than trying to convert to a float. Reimplemented
writer - now raises exceptions when it sees a quotechar but neither
doublequote or escapechar are set. Doublequote results are now more
consistent (eg, single quote should generate """", rather than "",
which is ambiguous).
|
|
|
|
| |
gets).
|
| |
|
|
|
|
|
|
|
| |
when this limit is reached. Limit defaults to 128k, and is changed
by module set_field_limit() method. Previously, an unmatched quote
character could result in the entire file being read into the field
buffer, potentially exhausting virtual memory.
|
| |
|
|
|
|
| |
dialect type (which has a better idea of what is and isn't valid).
|
|
|
|
|
|
| |
was done because we were previously performing validation of the dialect
from python, but this is now down within the C module. Also, the method
we were using to detect classes did not work with new-style classes.
|
|
|
|
|
| |
record objects of internal dialect type, rather than instances of
python objects.
|
| |
|
|
|
|
| |
left in stream).
|
|
|
|
|
|
| |
a delimiter. Previously, the 'network location' (<authority> in RFC 2396) would
become 'www.example.com?query=spam', while RFC 2396 does not allow a '?' in
<authority>. See bug #548176 for further discussion.
|
|
|
|
|
|
| |
* replace deltree with shutil.rmtree()
* replace mkdirs with os.makedirs()
* fold touchfile into GlobTests.mktemp()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`glob.glob()` currently calls itself recursively to build a list of matches of
the dirname part of the pattern and then filters by the basename part. This is
effectively BFS. ``glob.glob('*/*/*/*/*/foo')`` will build a huge list of all
directories 5 levels deep even if only a handful of them contain a ``foo``
entry. A generator-based recusion would never have to store these list at once
by implementing DFS. This patch converts the `glob` function to an `iglob`
recursive generator . `glob()` now just returns ``list(iglob(pattern))``.
I also cleaned up the code a bit (reduced duplicate `has_magic()` checks and
created a second `glob0` helper func so that the main loop need not be
duplicated).
Thanks to Cherniavsky Beni for the patch!
|
|
|
|
|
|
|
|
| |
test_threading.test_foreign_thread(): new test does a basic check that
"foreign" threads can using the threading module, and that they create
a _DummyThread instance in at least one use case. This isn't a very
good test, since a thread created by thread.start_new_thread() isn't
particularly "foreign".
|
|
|
|
| |
does what it's supposed to do.
|
| |
|
| |
|
|
|
|
|
| |
implementation features better error reporting, and better compliance
with the PEP.
|
| |
|
| |
|
| |
|
|
|
|
| |
to an uninitialized pointer: fixes the problem and adds a test case
|
|
|
|
|
| |
a minor change after the coercion, to accept two objects not necessarily of
the same type but with the same tp_compare.
|
|
|
|
|
| |
this is useful for locating supporting data files, just as it is in Python
modules
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
trying to return a complete line even if a size parameter was given (see
http://www.python.org/sf/1076985). This leads to buffer overflows with long
source lines under Windows if e.g. cp1252 is used as the source encoding.
This patch reverts the behaviour of readline() to something that behaves more
like Python 2.3: If a size parameter is given, read() is called only once.
As a side effect of this, readline() now supports all types of linebreaks
supported by unicode.splitlines().
Note that the tokenizer is still broken and it's possible to provoke segfaults
(see http://www.python.org/sf/1089395).
|
|
|
|
|
| |
immediately segfaults, due to a typo! This was obviously never tested...
Added a test for it, and also fixed the documentation.
|
|
|
|
| |
Closes bug #1083645. Thanks Detlef Vollmann.
|
|
|
|
| |
* The decimal module wouldn't load on builds without threads.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
the fodder modules to separate files to get rid of the imp.load_source()
trickery.
|
|
|
|
| |
Michael Hudson.
|
| |
|
|
|
|
|
| |
errors don't get provoked that way. Also add a bunch of cross-references
to bugs.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(First draft of patch contributed by Steven Bethard.)
|
| |
|
|
|
|
| |
slightly modified.
|
| |
|
| |
|