| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Font.__del__ is run.
|
| |
|
|
|
|
| |
e.g. SimpleXMLRPCServer wasn't in here yet.
|
| |
|
| |
|
|
|
|
| |
Wrapped in a try/except.
|
| |
|
|
|
|
| |
Add tests for the output of the TextCalendar and HTMLCalendar classes.
|
| |
|
|
|
|
|
|
| |
"O" arguments, so must not decref them. This accounts
for why running test_contextlib.test_main() in a loop
eventually tried to deallocate Py_None.
|
|
|
|
|
|
|
|
|
|
|
|
| |
report failures, we'll see.
Skip certain hopeless tests: compiler and logging.
compiler will likely always show varying leaks since it doesn't work
on a defined set of modules unless -u compiler is specified. But that
takes forever (we only run with -u network currently).
logging causes hangs when running with -R.
|
|
|
|
| |
Add tests for generator expressions too.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
code work with C++ compilers.
|
|
|
|
| |
with the getstring() results in pattern_subx. Will come back to that.
|
| |
|
|
|
|
| |
compile.c to add a cast.
|
|
|
|
|
| |
still has errors from the casts of asdl_seq_GET to cmpop_ty, but
otherwise it's C++ clean.
|
|
|
|
| |
for the bogus failure.
|
|
|
|
|
| |
[x for x in it if x if x], were broken for no good reason by the PEP 308
patch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to avoid confusing situations like:
>>> int("")
ValueError: invalid literal for int():
>>> int("2\n\n2")
ValueError: invalid literal for int(): 2
2
Also report the base used, to avoid:
ValueError: invalid literal for int(): 2
They now report:
>>> int("")
ValueError: invalid literal for int() with base 10: ''
>>> int("2\n\n2")
ValueError: invalid literal for int() with base 10: '2\n\n2'
>>> int("2", 2)
ValueError: invalid literal for int() with base 2: '2'
(Reporting the base could be avoided when base is 10, which is the default,
but hrm.) Another effect of these changes is that the errormessage can be
longer; before, it was cut off at about 250 characters. Now, it can be up to
four times as long, as the unrepr'ed string is cut off at 200 characters,
instead.
No tests were added or changed, since testing for exact errormsgs is (pardon
the pun) somewhat errorprone, and I consider not testing the exact text
preferable. The actually changed code is tested frequent enough in the
test_builtin test as it is (120 runs for each of ints and longs.)
|
|
|
|
| |
stream (see SF bug #1463840).
|
|
|
|
|
|
|
|
|
|
| |
interpolate PY_FORMAT_SIZE_T for refcount display
instead of casting refcounts to long.
I understand that gcc on some boxes delivers
nuisance warnings about this, but if any new ones
appear because of this they'll get fixed by magic
when the others get fixed.
|
| |
|
| |
|
|
|
|
|
| |
entirely happy with the two new VISIT macros in compile.c, but I
couldn't see a better approach.
|
| |
|
|
|
|
|
| |
void* to their respective _ty types. Fix signature of
ast_for_exprlist.
|
| |
|
|
|
|
| |
after the type objects.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mismatches. At least I hope this fixes them all.
This reverts part of my change from yesterday that converted everything
in Parser/*.c to use PyObject_* API. The encoding doesn't really need
to use PyMem_*, however, it uses new_string() which must return PyMem_*
for handling the result of PyOS_Readline() which returns PyMem_* memory.
If there were 2 versions of new_string() one that returned PyMem_*
for tokens and one that return PyObject_* for encodings that could
also fix this problem. I'm not sure which version would be clearer.
This seems to fix both Guido's and Phillip's problems, so it's good enough
for now. After this change, it would be good to review Parser/*.c
for consistent use of the 2 memory APIs.
|
|
|
|
| |
Explicitly cast void* to int to cmpop_ty.
|
| |
|
|
|
|
| |
in Python/Python-ast.c. Not sure what to do about those.
|
|
|
|
|
| |
solution) in the same way as listobject.c got changed. Hoping for a better
solution.
|
| |
|
| |
|
| |
|
|
|
|
| |
in #1454485.
|
| |
|
|
|
|
|
|
|
|
|
| |
PyTypeObject structures, I had to make prototypes for the functions, and
move the structure definition ahead of the functions. I'd dearly like a better
way to do this - to change this would make for a massive set of changes to
the codebase.
There's still some warnings - this is purely to get rid of errors first.
|
|
|
|
| |
fails with an error condition.
|
| |
|
|
|
|
|
|
|
| |
malloc/realloc type functions, as well as renaming one variable called 'new'
in tokensizer.c. Still lots more to be done, going to be checking in one
chunk at a time or the patch will be massively huge. Still compiles ok with
gcc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"x86 OpenBSD trunk" buildbot due to changing Python so that
Python-exposed addresses are always non-negative.
test_int_pointer_arg(): This line failed now whenever the
box happened to assign an address to `ci` "with the sign
bit set":
self.failUnlessEqual(addressof(ci), func(byref(ci)))
The problem is that the ctypes addressof() inherited "all
addresses are non-negative now" from changes to
PyLong_FromVoidPtr(), but byref() did not inherit that
change and can still return a negative int.
I don't know whether, or what, the ctypes implementation wants
to do about that (possibly nothing), but in the meantime
the test fails frequently.
So, introduced a Python positive_address() function in
the test module, that takes a purported machine address and,
if negative, converts it to a non-negative value "with the
same bits". This should leave the test passing under all
versions of Python.
Belated thanks to Armin Rigo for teaching me the sick trick ;-)
for determining the # of bits in a machine pointer via abuse
of the struct module.
|
|
|
|
|
|
|
| |
tests. Alas, because only the "x86 OpenBSD trunk" buildbot fails
these tests, and test_descr stops after the first failure, there's
no sane way for me to fix these short of fixing one and then
waiting for the buildbot to reveal the next one.
|