[issue9319] imp.find_module('test/badsyntax_pep3120') causes segfault

2011-04-18 Thread Andreas Stührk
Andreas Stührk added the comment: How about applying the workaround patch to Python 3.2? An unprecise error message is way better than a segfault. -- ___ Python tracker <http://bugs.python.org/issue9

[issue11906] Test_argparse failure but only in interactive mode

2011-04-22 Thread Andreas Stührk
Andreas Stührk added the comment: That happens because argparse uses `os.basename(sys.argv[0])` (per default) as program name, but `sys.argv[0]` is usually a string of length 0 at interactive sessions. The tests use ``"usage: {} ...".format(program_name)`` (note that there will be

[issue11912] Python shouldn't use the mprotect() system call

2011-04-23 Thread Andreas Stührk
Andreas Stührk added the comment: glibc's `dlopen()` can call `mprotect()`, which is used for loading C extensions. -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/is

[issue11938] duplicated test name in getattr_static's test case

2011-04-27 Thread Andreas Stührk
New submission from Andreas Stührk : There are two tests called "test_descriptor" in getattr_static's test case. Attached is a patch that renames one. -- components: Tests files: duplicated_test_descriptor.patch keywords: patch messages: 134565 nosy: Trundle, michael

[issue7517] freeze.py not ported to python3

2011-04-28 Thread Andreas Stührk
Andreas Stührk added the comment: Note that I also opened issue #11824 for the abiflags problem. -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue7

[issue9756] Crash with custom __getattribute__

2011-04-29 Thread Andreas Stührk
Andreas Stührk added the comment: I think it is reasonable to restrict the self argument of method descriptors and slot wrapper descriptors to real instances of the type. The called method can't cope with the value anyway (in the general case). Alternative Python implementations like J

[issue11343] Make errors due to full parser stack identifiable

2011-04-29 Thread Andreas Stührk
Andreas Stührk added the comment: FWIW, this also affects `ast.literal_eval()`. -- ___ Python tracker <http://bugs.python.org/issue11343> ___ ___ Python-bug

[issue11966] Typo in PyModule_AddIntMacro's documentation

2011-04-30 Thread Andreas Stührk
New submission from Andreas Stührk : The example says "PyModule_AddConstant" instead of "PyModule_AddIntMacro". Attached is a patch for 3.1 branch, but it applies to all branches. -- assignee: docs@python components: Documentation files: PyModule_AddIntMacro_doc.p

[issue11972] input does not strip a trailing newline correctly on Windows

2011-05-01 Thread Andreas Stührk
Andreas Stührk added the comment: See issue #11272. -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue11972> ___ ___ Python-bugs-list mailin

[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2011-05-02 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue1856> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11988] special method lookup docs don't address some important details

2011-05-03 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue11988> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11614] import __hello__ is broken in Python 3

2011-05-12 Thread Andreas Stührk
Andreas Stührk added the comment: A patch against 3.1. The new bytecode is now: 1 0 LOAD_CONST 2 (True) 3 STORE_NAME 1 (initialized) 2 6 LOAD_NAME2 (print) 9 LOAD_CONST 0 ('

[issue11614] import __hello__ is broken in Python 3

2011-05-12 Thread Andreas Stührk
Changes by Andreas Stührk : Added file: http://bugs.python.org/file21988/issue11614_!.patch ___ Python tracker <http://bugs.python.org/issue11614> ___ ___ Python-bug

[issue10509] PyTokenizer_FindEncoding can lead to a segfault if bad characters are found

2010-11-22 Thread Andreas Stührk
New submission from Andreas Stührk : If a non-ascii character is found and there isn't an encoding cookie, a SyntaxError is raised (in `decoding_fgets`) that includes the path of the file (using ``tok->filename``), but that path is never set. You can easily reproduce the crash by

[issue10509] PyTokenizer_FindEncoding can lead to a segfault if bad characters are found

2010-11-22 Thread Andreas Stührk
Changes by Andreas Stührk : -- keywords: +patch Added file: http://bugs.python.org/file19775/PyTokenizer_FindEncoding_fix.patch ___ Python tracker <http://bugs.python.org/issue10

[issue9232] Allow trailing comma in any function argument list.

2010-12-13 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue9232> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10509] PyTokenizer_FindEncoding can lead to a segfault if bad characters are found

2010-12-15 Thread Andreas Stührk
Andreas Stührk added the comment: Yes, it is (at the latest since msg124018). -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue9319] imp.find_module('test/badsyntax_pep3120') causes segfault

2010-12-15 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue9319> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2010-12-25 Thread Andreas Stührk
Andreas Stührk added the comment: It's because `PyErr_Fetch()` which is used in `atexit_callfuncs()` can return an unnormalized exception (e.g. if the exception is set with `PyErr_SetString()`. "value" is then a string). A simple call to `PyErr_NormalizeException()` f

[issue8013] time.asctime segfaults when given a time in the far future

2011-01-01 Thread Andreas Stührk
Andreas Stührk added the comment: Updated patch against py3k branch. -- nosy: +Trundle Added file: http://bugs.python.org/file20213/issue8013_py3k.diff ___ Python tracker <http://bugs.python.org/issue8

[issue8013] time.asctime segfaults when given a time in the far future

2011-01-02 Thread Andreas Stührk
Andreas Stührk added the comment: The real problem with years >= is that it is undefined behaviour anyway (see e.g. http://pubs.opengroup.org/onlinepubs/9699919799/functions/asctime.html: "the behavior is undefined if the above algorithm would attempt to generate more than 26

[issue8013] time.asctime segfaults when given a time in the far future

2011-01-02 Thread Andreas Stührk
Andreas Stührk added the comment: Sorry, I meant " years > " of course. -- ___ Python tracker <http://bugs.python.org/issue8013> ___ ___ Pytho

[issue8013] time.asctime segfaults when given a time in the far future

2011-01-02 Thread Andreas Stührk
Andreas Stührk added the comment: It's documented under "Year 2000 (Y2K) issues": http://docs.python.org/library/time.html#time-y2kissues -- ___ Python tracker <http://bugs.py

[issue10814] assertion failed on Windows buildbots

2011-01-03 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue10814> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2011-01-03 Thread Andreas Stührk
Andreas Stührk added the comment: So I guess someone should feel responsible and commit that patch. For convenience, I updated the patch to inline the raise. -- Added file: http://bugs.python.org/file20246/issue10756_normalize_exceptions_v2.diff

[issue10827] Functions in time module should support year < 1900 when accept2dyear = 0

2011-01-04 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue10827> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6284] C/API PyErr_AsUnicode()

2011-01-07 Thread Andreas Stührk
Andreas Stührk added the comment: There should also be a call to `PyErr_NormalizeException()`, as `PyErr_Fetch()` can return unnormalized exceptions (see e.g. issue #10756). -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue6

[issue10874] test_urllib2 shouldn't use is operator for comparing strings

2011-01-09 Thread Andreas Stührk
New submission from Andreas Stührk : See the attached patch (applies to 2.7 and 3.2). -- components: Tests files: test_urllib2.patch keywords: patch messages: 125846 nosy: Trundle, lukasz.langa priority: normal severity: normal status: open title: test_urllib2 shouldn't use is ope

[issue10922] Unexpected exception when calling function_proxy.__class__.__call__(function_proxy)

2011-01-16 Thread Andreas Stührk
Andreas Stührk added the comment: I think this is a duplicate of issue #9756: `methoddescr_call()` checks whether the given argument is acceptable as "self" argument and does so using `PyObject_IsInstance()`. As the class in the given code returns the type of the proxied obje

[issue9756] Crash with custom __getattribute__

2011-02-04 Thread Andreas Stührk
Andreas Stührk added the comment: See also issue #10922. -- ___ Python tracker <http://bugs.python.org/issue9756> ___ ___ Python-bugs-list mailing list Unsub

[issue11133] inspect.getattr_static code execution

2011-02-20 Thread Andreas Stührk
Andreas Stührk added the comment: Attached is a patch that fixes the issue: The dict methods are now used directly and before every access to an instance's "__dict__" attribute, it is checked that that attribute is really the instance's attribute and not a class attribu

[issue11133] inspect.getattr_static code execution

2011-02-21 Thread Andreas Stührk
Andreas Stührk added the comment: > The patch is not sufficient - instances may have a class member "__dict__" > whilst still having an instance __dict__. Sure, but I don't think there is a way how you can access the instance __dict__ in that case inside Python code. At l

[issue11133] inspect.getattr_static code execution

2011-02-21 Thread Andreas Stührk
Andreas Stührk added the comment: Updated patch. -- Added file: http://bugs.python.org/file20830/inspect_issue_11133_v2.patch ___ Python tracker <http://bugs.python.org/issue11

[issue13908] PyType_FromSpec() lacks PyType_Ready() call

2012-01-29 Thread Andreas Stührk
New submission from Andreas Stührk : As already stated by Amaury in http://mail.python.org/pipermail/python-dev/2011-October/113829.html, that leads to crashes: >>> import xxlimited >>> repr(xxlimited.Str) [1]19575 segmentation fault (core dumped) ./python

[issue12029] Catching virtual subclasses in except clauses

2012-09-16 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue12029> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15667] PEP 3121, 384 refactoring applied to pickle module

2012-11-11 Thread Andreas Stührk
Andreas Stührk added the comment: See also issue #11349. -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue15667> ___ ___ Python-bugs-list mailin

[issue16047] Tools/freeze no longer works in Python 3

2012-11-13 Thread Andreas Stührk
Andreas Stührk added the comment: See also issue #11824 for the ABI tags changes. -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue16047> ___ ___

[issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk

2012-12-04 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue16612> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20637] Support key-sharing dictionaries in subclasses

2014-02-16 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker <http://bugs.python.org/issue20637> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28603] traceback module can't format/print unhashable exceptions

2016-11-03 Thread Andreas Stührk
New submission from Andreas Stührk: The traceback module tries to handle loops caused by an exception's __cause__ or __context__ attributes when printing tracebacks. To do so, it adds already seen exceptions to a set. Unfortunately, it doesn't handle unhashable exceptions: &

[issue28603] traceback module can't format/print unhashable exceptions

2016-11-07 Thread Andreas Stührk
Andreas Stührk added the comment: It was reported as bug to a project that uses the traceback module (https://github.com/bpython/bpython/issues/651). Parsley (https://pypi.python.org/pypi/Parsley) is at least one library that uses unhashable exceptions, although I guess it's by acciden

<    1   2