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
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 in
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
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 seq
Dingyuan Wang added the comment:
The new patch should now pass all tests correctly.
The main idea is:
* if the token is INDENT, push it on the `indents` stack and continue
* if a new line starts, AND the position of the first token >= the length of
the last indent level, we assume the ind
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
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 will
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 compresse
Dingyuan Wang added the comment:
My patch for this.
--
keywords: +patch
Added file: http://bugs.python.org/file41039/storedirectory.patch
___
Python tracker
<http://bugs.python.org/issue25
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://
Changes by Dingyuan Wang :
--
nosy: +gumblex
___
Python tracker
<http://bugs.python.org/issue23962>
___
___
Python-bugs-list mailing list
Unsubscribe:
11 matches
Mail list logo