[issue13274] heapq pure python version uses islice without guarding for negative counts
New submission from Ronny Pfannschmidt : the problem manifests when calling with negative counts when the c versions are used, a empty list is returned, however if the pure python version is called islice errors out -- components: Library (Lib) messages: 146483 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: heapq pure python version uses islice without guarding for negative counts type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue13274> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13274] heapq pure python version uses islice without guarding for negative counts
Ronny Pfannschmidt added the comment: however some basic consistency between the cpython and pure python versions within the stdlib would be nice since it basically implicitly breaks unaware code on non cpython -- ___ Python tracker <http://bugs.python.org/issue13274> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13381] compile fails to compile a ast module object giving a incomprehensible error
New submission from Ronny Pfannschmidt : $ python3.2 -c 'import ast;compile(ast.parse(open("testing/test_keymap.py").read()), "test", "exec")' Traceback (most recent call last): File "", line 1, in TypeError: AST string must be of type str note that just compiling the source works fine -- files: test_keymap.py messages: 147401 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: compile fails to compile a ast module object giving a incomprehensible error type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file23652/test_keymap.py ___ Python tracker <http://bugs.python.org/issue13381> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13381] compile fails to compile a ast module object giving a incomprehensible error
Changes by Ronny Pfannschmidt : -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue13381> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13444] closed stdout causes error on stderr when the interpreter unconditionally flushes on shutdown
New submission from Ronny Pfannschmidt : not sure if this is to be considered a bug, but python3.2 tries to flush sys.stdout on shutdown, even if its closed $ python3.2 -c 'import sys;sys.stdout.close()' Exception ValueError: 'I/O operation on closed file.' in <_io.TextIOWrapper name='' mode='w' encoding='ANSI_X3.4-1968'> ignored its related to how Issue #5319 was fixed -- components: Interpreter Core messages: 148055 nosy: Ronny.Pfannschmidt, georg.brandl, mkc, pitrou, terry.reedy priority: normal severity: normal status: open title: closed stdout causes error on stderr when the interpreter unconditionally flushes on shutdown versions: Python 3.2 ___ Python tracker <http://bugs.python.org/issue13444> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13444] closed stdout causes error on stderr when the interpreter unconditionally flushes on shutdown
Ronny Pfannschmidt added the comment: i think checking for closed is the correct solution -- ___ Python tracker <http://bugs.python.org/issue13444> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12216] future imports change the reporting of syntaxerrors
New submission from Ronny Pfannschmidt : >>> compile('def foo(', '', 'exec') Traceback (most recent call last): File "", line 1, in File "", line 1 def foo( ^ SyntaxError: unexpected EOF while parsing vs >>> compile('from __future__ import print_function\ndef foo(', '', 'exec') Traceback (most recent call last): File "", line 1, in File "", line 2 def foo( ^ SyntaxError: invalid syntax -- messages: 137285 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: future imports change the reporting of syntaxerrors versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue12216> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44893] importlib.metadata Entrypoint has a broken _asdict
New submission from Ronny Pfannschmidt : due to ``` def __iter__(self): """ Supply iter so one may construct dicts of EntryPoints easily. """ return iter((self.name, self)) ``` the default namedtuple asdict method is broken instead of returning the fields, recursive objects are returned as ``` (Pdb) v EntryPoint(name='.git', value='setuptools_scm.git:parse', group='setuptools_scm.parse_scm') (Pdb) v._asdict() {'name': '.git', 'value': EntryPoint(name='.git', value='setuptools_scm.git:parse', group='setuptools_scm.parse_scm')} (Pdb) type(v) (Pdb) -- components: Library (Lib) messages: 399419 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: importlib.metadata Entrypoint has a broken _asdict type: behavior versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue44893> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14965] super() and property inheritance behavior
Ronny Pfannschmidt added the comment: im on the noisy list because i faced this first in 2012 a key problem where i ran into this was mixins, - depending on whether a mixin was added or not one would get errors or not from my pov a super object should look like the "next class" so properties of the next base should behave as such, special methods as well -- ___ Python tracker <https://bugs.python.org/issue14965> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6784] byte/unicode pickle incompatibilities between python2 and python3
Ronny Pfannschmidt added the comment: im unlikely to find the time to try and fix pickle/cpickle myself in the next few months -- nosy: +Ronny.Pfannschmidt ___ Python tracker <http://bugs.python.org/issue6784> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14161] python2 file __repr__ does not escape filename
New submission from Ronny Pfannschmidt : behaviour: >>> name = 'woo\raa' >>> open(name, 'w') aa', mode 'w' at 0x295a8a0> expected: >>> name = 'woo\raa' >>> open(name, 'w') note: don't ask why i tried this chunk of code in the first place -- messages: 154649 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: python2 file __repr__ does not escape filename type: behavior versions: Python 2.6, Python 2.7 ___ Python tracker <http://bugs.python.org/issue14161> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34731] pathlib path.match misshandles multiple `**`
New submission from Ronny Pfannschmidt : when porting parts of pytest to pathlib we noted that `path.match` does not quite match normal fnmatch for usages of `**` i believe this is related to always splitting the patter completely and not handling `**` in that case Bruno wrote https://github.com/pytest-dev/pytest/pull/3980/files#diff-63fc5ed688925b327a5af20405bf4b09R19 as a workaround -- components: Library (Lib) messages: 325701 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: pathlib path.match misshandles multiple `**` ___ Python tracker <https://bugs.python.org/issue34731> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34731] pathlib path.match misshandles multiple `**`
Ronny Pfannschmidt added the comment: indeed it is, thanks for the reference i searched only for match and missed the glob -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34731> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29249] Pathlib glob ** bug
Ronny Pfannschmidt added the comment: issue34731 was a duplicate of this pytest was affected, as we port more bits to pathlib we hit this as well bruno kindly implemented a local workaround in https://github.com/pytest-dev/pytest/pull/3980/files#diff-63fc5ed688925b327a5af20405bf4b09R19 -- nosy: +Ronny.Pfannschmidt ___ Python tracker <https://bugs.python.org/issue29249> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14964] distutils2.utils.resolve_name cleanup
New submission from Ronny Pfannschmidt : this patch simplifies and cleans up the resolve_name function -- assignee: eric.araujo components: Distutils2 files: resolve_name.patch keywords: patch messages: 161974 nosy: Ronny.Pfannschmidt, alexis, eric.araujo, tarek priority: normal severity: normal status: open title: distutils2.utils.resolve_name cleanup type: enhancement Added file: http://bugs.python.org/file25766/resolve_name.patch ___ Python tracker <http://bugs.python.org/issue14964> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14964] distutils2.utils.resolve_name cleanup
Ronny Pfannschmidt added the comment: my change is a unrelated cleanup but the ideas in the patch look good the attribute error addition seems relevant i'll adapt my patch to raise the original import error for toplevel import failure and accumuplate the attrbute name so it can raise the correct error -- ___ Python tracker <http://bugs.python.org/issue14964> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14967] distutils2.utils.resolve_name cannot be implemented to give correct errors in all situations
New submission from Ronny Pfannschmidt : due to the lack of a marker that denotes where the module ends and the attribute starts, unrelated import errors can break the try&error chain at unexpected places and the code can pass on to the recursive getattr chain, giving a completely different error instead of the real error this is not solvable without a marker or really nasty hacks o track subsequent imports -- assignee: eric.araujo components: Distutils2 messages: 161990 nosy: Ronny.Pfannschmidt, alexis, eric.araujo, tarek priority: normal severity: normal status: open title: distutils2.utils.resolve_name cannot be implemented to give correct errors in all situations ___ Python tracker <http://bugs.python.org/issue14967> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14967] distutils2.utils.resolve_name cannot be implemented to give correct errors in all situations
Ronny Pfannschmidt added the comment: to correctly implement it we need the : separator back with the separator the import specification is no longer ambigious, and we can use one exact import, and an error will always be an error -- ___ Python tracker <http://bugs.python.org/issue14967> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14967] distutils2.utils.resolve_name cannot be implemented to give correct errors in all situations
Ronny Pfannschmidt added the comment: an example of creating a wrong error would be something like the following: there is a package foo.bar, which does a wrong import in __init__.py we want to resolve the name foo.bar.something we'd get the error that foo has no attribute bar -- ___ Python tracker <http://bugs.python.org/issue14967> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14964] distutils2.utils.resolve_name cleanup
Ronny Pfannschmidt added the comment: updated the patch with more detailed errors -- Added file: http://bugs.python.org/file25771/resolve_name.patch ___ Python tracker <http://bugs.python.org/issue14964> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14964] distutils2.utils.resolve_name cleanup
Ronny Pfannschmidt added the comment: i missused hg export, here is a corrected patch -- Added file: http://bugs.python.org/file25773/resolve_name.patch ___ Python tracker <http://bugs.python.org/issue14964> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15309] buffer/memoryview slice assignment uses only memcpy
New submission from Ronny Pfannschmidt : thats broken for assigning overlaping regions, the memcpy docs explicitly state that memmove should be used in overlap cases -- messages: 165127 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: buffer/memoryview slice assignment uses only memcpy versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue15309> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14161] python2 file __repr__ does not escape filename
Ronny Pfannschmidt added the comment: wtf? you made it possible to return NULL in some case -- ___ Python tracker <http://bugs.python.org/issue14161> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14161] python2 file __repr__ does not escape filename
Ronny Pfannschmidt added the comment: sorry for the buzz, i got myself up to date on the c api now why is there still the unicode case? the PyObject_Repr variant should work fine in both cases -- ___ Python tracker <http://bugs.python.org/issue14161> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16363] super cannot invoke descriptors
New submission from Ronny Pfannschmidt: this means its much harder to have a mixin to change the behaviour of a property instead of super(Mixin, self).prop = foo the code is super(Mixin, type(self)).prop.__set__(self, foo) which is way harder to understand the attached file demonstrates the problem and has a proof of concept for an extended super allowing descriptor invocations -- components: Interpreter Core files: test_super.py messages: 174184 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: super cannot invoke descriptors type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file27792/test_super.py ___ Python tracker <http://bugs.python.org/issue16363> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14965] super() and property inheritance behavior
Changes by Ronny Pfannschmidt : -- nosy: +Ronny.Pfannschmidt ___ Python tracker <http://bugs.python.org/issue14965> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17039] socket.SocketIO hides socket timeouts as blocking errors
New submission from Ronny Pfannschmidt: the change to conform with pep 3114 makes socketSocketIO hide Timeouts, since they are also denoted with EAGAIN (which is one of the blocking errors a nonblocking socket will raise) that causes read/readinto return None, when one would expect a Timeout -- messages: 180660 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: socket.SocketIO hides socket timeouts as blocking errors versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker <http://bugs.python.org/issue17039> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17039] socket.SocketIO hides socket timeouts as blocking errors
Ronny Pfannschmidt added the comment: noticed an error in my testing, sorry for the noise -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue17039> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19658] inspect.getsource weird case
New submission from Ronny Pfannschmidt: got: >>> l = {} >>> import inspect >>> exec(compile('def fun(): pass', '', 'exec'), l, l) >>> inspect.getsource(l['fun']) Traceback (most recent call last): File "", line 1, in File "/home/private/.local/lib/python3.3/inspect.py", line 726, in getsource lines, lnum = getsourcelines(object) File "/home/private/.local/lib/python3.3/inspect.py", line 715, in getsourcelines lines, lnum = findsource(object) File "/home/private/.local/lib/python3.3/inspect.py", line 553, in findsource if not sourcefile and file[0] + file[-1] != '<>': IndexError: string index out of range expected: >>> l = {} >>> import inspect >>> exec(compile('def fun(): pass', '', 'exec'), l, l) >>> inspect.getsource(l['fun']) Traceback (most recent call last): File "", line 1, in File "/home/private/.local/lib/python3.3/inspect.py", line 726, in getsource lines, lnum = getsourcelines(object) File "/home/private/.local/lib/python3.3/inspect.py", line 715, in getsourcelines lines, lnum = findsource(object) File "/home/private/.local/lib/python3.3/inspect.py", line 563, in findsource raise IOError('could not get source code') OSError: could not get source code this is a extraction, it appears that python in certein circumstances creates code objects with that setup on its own, im still further investigating -- messages: 203426 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: inspect.getsource weird case type: behavior versions: Python 2.7, Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/issue19658> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19658] inspect.getsource weird case
Changes by Ronny Pfannschmidt : -- components: +Library (Lib) ___ Python tracker <http://bugs.python.org/issue19658> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20463] sqlite dumpiter dumps invalid script when virtual tables are used
New submission from Ronny Pfannschmidt: when using virtual tables, dumpiter generates a broken db script virtual table entries must be created as master table entries the sqlite tools dump does that correctly however pythons iterdump seems to do that rather different and wrong sqlite3 test.db "create virtual table test using fts4(example);" --- sqlite dump PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; PRAGMA writable_schema=ON; INSERT INTO sqlite_master(type,name,tbl_name,rootpage,sql)VALUES('table','test','test',0,'CREATE VIRTUAL TABLE test using fts4(example)'); CREATE TABLE 'test_content'(docid INTEGER PRIMARY KEY, 'c0example'); CREATE TABLE 'test_segments'(blockid INTEGER PRIMARY KEY, block BLOB); CREATE TABLE 'test_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,leaves_end_block INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx)); CREATE TABLE 'test_docsize'(docid INTEGER PRIMARY KEY, size BLOB); CREATE TABLE 'test_stat'(id INTEGER PRIMARY KEY, value BLOB); PRAGMA writable_schema=OFF; COMMIT; -- python iterdump "import sqlite3; c=sqlite3.connect("test.db"); print("\n".join(c.iterdump()))" BEGIN TRANSACTION; CREATE VIRTUAL TABLE test using fts4(example); CREATE TABLE 'test_content'(docid INTEGER PRIMARY KEY, 'c0example'); CREATE TABLE 'test_docsize'(docid INTEGER PRIMARY KEY, size BLOB); CREATE TABLE 'test_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,leaves_end_block INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx)); CREATE TABLE 'test_segments'(blockid INTEGER PRIMARY KEY, block BLOB); CREATE TABLE 'test_stat'(id INTEGER PRIMARY KEY, value BLOB); COMMIT; -- messages: 209825 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: sqlite dumpiter dumps invalid script when virtual tables are used versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue20463> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20463] sqlite dumpiter dumps invalid script when virtual tables are used
Changes by Ronny Pfannschmidt : -- components: +Extension Modules type: -> behavior ___ Python tracker <http://bugs.python.org/issue20463> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10740] sqlite3 module breaks transactions and potentially corrupts data
Ronny Pfannschmidt added the comment: could we please get the option to opt-out of that behaviour, as a extra connection option maybe with the normal python sqlite bindings its impossible to have database migrations work safely which IMHO makes this a potential data-loss issue -- nosy: +Ronny.Pfannschmidt ___ Python tracker <http://bugs.python.org/issue10740> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10740] sqlite3 module breaks transactions and potentially corrupts data
Ronny Pfannschmidt added the comment: the sqlite binding deciding how to handle transactions -- ___ Python tracker <http://bugs.python.org/issue10740> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10740] sqlite3 module breaks transactions and potentially corrupts data
Ronny Pfannschmidt added the comment: http://hg.python.org/releasing/3.4/file/447c758cdc26/Modules/_sqlite/cursor.c#l789 also i dont see the isolation level being taking into account in other parts of the code -- ___ Python tracker <http://bugs.python.org/issue10740> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17446] doctest test finder doesnt find line numbers of properties
New submission from Ronny Pfannschmidt: examples that are found on a property dont detect the line number class example(object): @property def me(self): """ >>> 1/0 """ pass -- messages: 184384 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: doctest test finder doesnt find line numbers of properties ___ Python tracker <http://bugs.python.org/issue17446> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com