New submission from Dingyuan Wang:
When compiling the PyPy default branch [1] on a Debian testing machine with
Python 2.7.13, cpython randomly crashes.
(gdb) bt
#0 update_refs () at ../Modules/gcmodule.c:332
#1 collect.lto_priv () at ../Modules/gcmodule.c:924
#2 0x5562a804
New submission from Dingyuan Wang:
We have the sqlite3.set_authorizer function, where the first argument to its
callback is one of the Authorizer Action Codes that the SQLite documentations
defines[1]. However, the constants in the sqlite3 module is not up to date. The
code in _sqlite
Changes by Dingyuan Wang <abcdoyle...@gmail.com>:
--
nosy: +gumblex
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23962>
___
_
Dingyuan Wang added the comment:
Yes, patching zipfile is enough. I wrote a test using `unzip -t` to check the
zip. ZipFile.testzip can't detect this kind of error because
zlib.decompressobj(-15) will decode b'' to b'' without errors.
--
Added file: http://bugs.python.org/file41120
Dingyuan Wang added the comment:
$ mkdir foo; touch foo/a.txt; python3 -c "import shutil;
shutil.make_archive('foo', 'zip', base_dir='foo')"; unzip -t foo.zip
Archive: foo.zip
testing: foo/
error: invalid compressed data to inflate
testing:
New submission from Dingyuan Wang:
The _make_zipfile in shutil uses ZIP_DEFLATED compression by default, and the
fix introduced by #24982 adds directory entries. In zipfile.ZipFile.write,
directories is added as 0 file_size, 0 compress_size, regardless of the
compression method. Deflate
Dingyuan Wang added the comment:
My patch for this.
--
keywords: +patch
Added file: http://bugs.python.org/file41039/storedirectory.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Dingyuan Wang added the comment:
I mean the patch only restores tabs in indentation. The reports above should be
corrected.
Tabs between tokens and other race conditions can't be restored exactly
providing the token stream. This won't affect the syntax. I wonder if it's also
a bug or a wont
Dingyuan Wang added the comment:
Sorry for the inconvenience. I failed to find this old bug.
I think there is another problem. The docs of `untokenize` said The iterable
must return sequences with **at least** two elements, the token type and the
token string. Any additional sequence elements
New submission from Dingyuan Wang:
If a script uses tabs for indentation, tokenize.untokenize won't restore
original indentation correctly from the second line of the indentation level,
and thus breaks the file.
This affects all Python versions.
Test code:
python2 -c 'import sys, tokenize
10 matches
Mail list logo