[issue9417] Declaring a class creates circular references

2020-04-25 Thread Kay Hayen
Kay Hayen added the comment: What I also meant to say, is that debug Python is not affected, and this had me deeply confused. Any ideas how that could happen? -- ___ Python tracker <https://bugs.python.org/issue9

[issue9417] Declaring a class creates circular references

2020-04-25 Thread Kay Hayen
Kay Hayen added the comment: Today I changed my reference count tests to not use debug Python and came across this issue. >From my testing, Python3.4 is the first affected version, Python3.3 was still >fine, so were 2.7 and 2.6. This leaks: def simpleFunction39(): class Pare

[issue35143] `from __future__ import annotations` has no effect inside `ast.parse`

2019-12-28 Thread Kay Hayen
Kay Hayen added the comment: Thanks a lot, Batuhan, this will feel a lot more correct, from my point of view, this could be closed unless there would be a backport. -- ___ Python tracker <https://bugs.python.org/issue35

[issue36725] Reference leak regression with Python3.8a3

2019-04-25 Thread Kay Hayen
New submission from Kay Hayen : Much like #9366 the same file can be used. This reference leaks according to Nuitka comparative testing: simpleFunction59: FAILED 129511 129512 leaked 1 def simpleFunction59(): a = 3 b = 5 try: a = a * 2 return a finally

[issue11566] hypot define in pyconfig.h clashes with g++'s cmath

2018-12-22 Thread Kay Hayen
Change by Kay Hayen : -- nosy: -Kay.Hayen __ Python tracker <https://bugs.python.org/issue11566> __ ___ Python-bugs-list mailing list Unsub

[issue35143] Annotations future requires unparse, but not accessible from Pythpn

2018-11-02 Thread Kay Hayen
New submission from Kay Hayen : Hello, in trying to know what to put into "__annotations__" at run time, the "from __future__ import annotations" pose a new problem. It is now necessary to "unparse" to ast code that is still there. Code to do so, is

[issue34615] subprocess.call wrong exit code

2018-09-11 Thread Kay Hayen
Kay Hayen added the comment: So I was confused indeed. Actually I am observing in other tests at least, that apparently Nuitka compiled execution in my tests can import _testcapi module, which normal execution of the test does not manage. Then there is the possibility that the exit code

[issue34615] subprocess.call wrong exit code

2018-09-09 Thread Kay Hayen
Kay Hayen added the comment: I think that the whole reason I was doing this, is because with "os.execl" on Windows, the exit code was always lost, but of course it is very important and "subprocess.call" promises to return it. I just tried if 3.7 has any better exit

[issue34615] subprocess.call wrong exit code

2018-09-09 Thread Kay Hayen
New submission from Kay Hayen : Hello there, I am probably confusing myself. I am using this kind of code in Nuitka to emulate "os.execl" on Windows, and so far it never let me down: r = subprocess.call( args, she

[issue34265] Dataclasses test doesn't run independently

2018-07-28 Thread Kay Hayen
Kay Hayen added the comment: Totally is. Closing, sorry for not seeing that one myself. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue34265] Dataclasses test doesn't run independently

2018-07-28 Thread Kay Hayen
New submission from Kay Hayen : When I run: python3.7 test/test_dataclasses.py == ERROR: test_classvar_module_level_import (__main__.TestStringAnnotations

[issue34251] MSI build fails

2018-07-27 Thread Kay Hayen
New submission from Kay Hayen : Hello there, building an MSI for my project fails. I am calling it like this: assert subprocess.call( ( sys.executable, "setup.py", "bdist_msi", "--target-v

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-22 Thread Kay Hayen
Kay Hayen added the comment: As somebody whose opinion is even less important: Did you consider my suggestion to make it a "SyntaxError" for "del __annotations__" on a class level or even module level or at all? Or does this go

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-17 Thread Kay Hayen
Kay Hayen added the comment: Thanks for pointing out, where it comes from, Serhiy. So, should the test case be removed then. I still am not so sure about the bug nature. Because using the standard mechanism will do this: x : int class C: del __annotations__ x : float y : int

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-17 Thread Kay Hayen
New submission from Kay Hayen : I am getting this: PYTHONPATH=`pwd` /c/Python37_32/python test/test_opcodes.py .F.. == FAIL: test_do_not_recreate_annotations (__main__.OpcodeTest

[issue34042] Reference loss for local classes

2018-07-06 Thread Kay Hayen
Kay Hayen added the comment: Hello, so it's harmless and it explains the other reference counting issue, where a change in call convention could make a reference counting bug show or go away: codecs.open(TESTFN, encoding='cp949') This was showing it, where as codecs.open(TESTFN, &qu

[issue34042] Reference loss for local classes

2018-07-05 Thread Kay Hayen
Kay Hayen added the comment: Just to confirm, this is also happening on Windows as well, with both 32 and 64 bits. -- ___ Python tracker <https://bugs.python.org/issue34

[issue34042] Reference loss for local classes

2018-07-04 Thread Kay Hayen
New submission from Kay Hayen : I have a test in Nuitka, designed to detect reference counting problems with Python code. It basically takes a snapshot of the refcount, runs a function until it stabilizes, then says PASS, or else reports the last diff. Obviously for CPython it's supposed

[issue34024] Builtin types take no keyword arguments anymore

2018-07-02 Thread Kay Hayen
Kay Hayen added the comment: Hello Ned, sorry for noise. I checked that, but oversaw it. Maybe I also wasn't expecting this. There has been such a huge trend towards * and ** support for like everything, e.g. class definitions in 3.6, that this felt like a move in the opposite direction

[issue34024] Builtin types take no keyword arguments anymore

2018-07-02 Thread Kay Hayen
New submission from Kay Hayen : Hello, things like list(sequence = something) ought to work in Python 3.6 back to the oldest Python2 I know. However, in 3.7 this raises an exception about not accepting keyword arguments. I noticed the same for tuple, int, float(x=9.0), and probably a lot

[issue31745] Overloading "Py_GetPath" does not work

2017-10-10 Thread Kay Hayen
New submission from Kay Hayen <kay.ha...@gmail.com>: Hello, for my Python compiler Nuitka, I want to make sure that compiled binaries in standalone mode do not access the original installation, but solely the distribution folder created. I am using the new API Py_SetPath on P

[issue30878] The staticmethod doesn't properly reject keyword arguments

2017-07-08 Thread Kay Hayen
New submission from Kay Hayen: Check out this: python3.6 -c "staticmethod(function=1)" Traceback (most recent call last): File "", line 1, in TypeError: staticmethod expected 1 arguments, got 0 python3.6 -c "staticmethod()" Traceback (most recent call last):

[issue27942] Default value identity regression

2016-09-24 Thread Kay Hayen
Kay Hayen added the comment: Same with 3.6b1, still present. -- nosy: +kayhayen ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28257] Regression for star argument parameter error messages

2016-09-23 Thread Kay Hayen
New submission from Kay Hayen: Hello, there is a regression in the beta (alpha 4 was ok) for this kind of code: print("Complex call with both invalid star list and star arguments:") try: a = 1 b = 2.0 functionWithDefaults(1,c = 3,*a,**b) except TypeError as e: pr

[issue27942] Default value identity regression

2016-09-02 Thread Kay Hayen
New submission from Kay Hayen: Consider this: def defaultKeepsIdentity(arg = "str_value"): print(arg is "str_value") defaultKeepsIdentity() This has been outputing "True" on every Python release I have seen so far, but not so on 3.6.0a4. Normally strin

[issue11566] hypot define in pyconfig.h clashes with g++'s cmath

2016-08-11 Thread Kay Hayen
Kay Hayen added the comment: This also affects Python2.7.12 on Windows with latest MinGW. I think something similar needs to be added for GCC version check: /* VS 2010 and above already defines hypot as _hypot */ #if _MSC_VER < 1600 #define hypot _hypot #endif Not sure which gcc version fi

[issue16967] Keyword only argument default values are evaluated before other defaults

2014-06-20 Thread Kay Hayen
Kay Hayen added the comment: I can confirm that Python3.4 is not affected. Python 3.3 and 3.2 still are. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16967

[issue9716] The inittab modules cannot be packages

2014-06-20 Thread Kay Hayen
Kay Hayen added the comment: Are you still tracking this as a feature request. If so, please note that I don't need it anymore. The meta path based import mechanism is fully sufficient to me. -- ___ Python tracker rep...@bugs.python.org http

[issue16967] Keyword keyword only default parameters are evaluated before po

2013-01-14 Thread Kay Hayen
New submission from Kay Hayen: Suprisingly, keyword only arguments become evaluated first: def f(a=undefined1,*,b=undefined2):pass ... Traceback (most recent call last): File stdin, line 1, in module NameError: name 'undefined2' is not defined It should be undefined1. I am sure

[issue13792] The os.execl call doesn't give programs exit code

2012-01-17 Thread Kay Hayen
Kay Hayen kayha...@gmx.de added the comment: Does the Python standard library not offer anything that does replace with current process code with another? I checked with subprocess, and admittedly it's not that. Does Win32 API offer nothing

[issue13792] The os.execl call doesn't give programs exit code

2012-01-15 Thread Kay Hayen
New submission from Kay Hayen kayha...@gmx.de: Hello, I am the author of the Python compiler Nuitka. It has the ability to immediately execute the created executable file. For that I am using os.execl to immediately replace the compiler and run the freshly created binary instead. This worked

[issue13792] The os.execl call doesn't give programs exit code

2012-01-15 Thread Kay Hayen
Kay Hayen kayha...@gmx.de added the comment: Well, I saw that code, but expected that there must be more to it. But I found out, the bug is actually caused by at least MinGW. See below how I build a program with it, that does execl on an error exiting program and then the errorlevel variable

[issue13735] The protocol 0 of cPickle does not given stable dictionary values

2012-01-08 Thread Kay Hayen
Kay Hayen kayha...@gmx.de added the comment: It seems that there is an extra BINPUT 2, whatever it does. I am attaching a variant that does pickletools.dis on the 3 dumps. Protocol 2 : Dumping read const const stream '\x80\x02}q\x01U\x07modulesq\x02Ns.' 0: \x80 PROTO 2 2

[issue13735] The protocol 0 of cPickle does not given stable dictionary values

2012-01-08 Thread Kay Hayen
Kay Hayen kayha...@gmx.de added the comment: Sending my attached file stream.py through 2to3.py it shows that CPython 3.2 doesn't exihibit the issue for either protocol, which may be because it's now unicode key, but as it's the only value I tried, I can't tell. Hope this helps. Regarding

[issue13735] The protocol 0 of cPickle does not given stable dictionary values

2012-01-08 Thread Kay Hayen
Kay Hayen kayha...@gmx.de added the comment: I see, if it's refcount dependent, that explains why it changes from interpreter provided dictionary and self-created one. So, I take, I should always call pickletools.optimize( cPickle.dumps( value )) then. Thanks, Kay

[issue13735] The protocol 0 of cPickle does not given stable dictionary values

2012-01-07 Thread Kay Hayen
New submission from Kay Hayen kayha...@gmx.de: Hello, I am implementing a Python compiler (Nuitka) that is testing if when it compiles itself, it gives the same output. I have been using protocol = 0 ever since with pickle module for historic reasons (gcc bug with raw strings lead me

[issue9716] The inittab modules cannot be packages

2010-09-13 Thread Kay Hayen
Kay Hayen kayha...@gmx.de added the comment: Why did you remove Python2.7 from the versions list? Isn't this supposed to track the affected versions? (This is not the first time I encountered that.) I understand that you may not fix all bugs in 2.x, but is it already unsupported in the sense

[issue9716] The inittab modules cannot be packages

2010-08-30 Thread Kay Hayen
New submission from Kay Hayen kayha...@gmx.de: Hello, I try to include modules with PyImport_AppendInittab or PyImport_ExtendInittab and that works fine. But if these modules are part of a package, i.e. I provide package_name.module_name as the name, they never get considered. Is there any

[issue9690] Cannot distinguish bstr from str in ast module.

2010-08-27 Thread Kay Hayen
Kay Hayen kayha...@gmx.de added the comment: This is to inform you that I worked around the bug by reading the source file in question and checking the indicated position. This is currently the only way to decide if a literal should be unicode or str with unicode_literals from future imported

[issue9690] Cannot distinguish bstr from str in ast module.

2010-08-26 Thread Kay Hayen
Kay Hayen kayha...@gmx.de added the comment: You didn't understand. Please tell me, how to decide if this is a unicode literal or a str (2.x) literal: value=Str(s='d') It's just not possible. When I found a from __future__ import unicode_literals in the code before, it means I should convert

[issue9690] Cannot distinguish bstr from str in ast module.

2010-08-26 Thread Kay Hayen
Kay Hayen kayha...@gmx.de added the comment: Hello Benjamin, thank you for the response. What do you mean with there is nothing we can do about it. Is it not possible to add another field indicating the prefix given to a literal? BTW: I believe raw strings are also no longer recognizable

[issue9690] Cannot distinguish bstr from str in ast module.

2010-08-25 Thread Kay Hayen
New submission from Kay Hayen kayha...@gmx.de: There is no way to decide if a string literal should be non-unicode when the default has been set to unicode_literals. Please see: import ast ast.dump( ast.parse( c = d ) ) Module(body=[Assign(targets=[Name(id='c', ctx=Store())], value=Str(s

[issue9656] compiler module provides wrong AST for extended slice of length 1

2010-08-21 Thread Kay Hayen
New submission from Kay Hayen kayha...@gmx.de: Please check the following: [GCC 4.4.5 20100728 (prerelease)] on linux2 Type help, copyright, credits or license for more information. import compiler compiler.parse( d[1,] = None ) Module(None, Stmt([Assign([Subscript(Name('d'), 'OP_ASSIGN

[issue9366] Reference leak for local new style class

2010-07-24 Thread Kay Hayen
New submission from Kay Hayen kayha...@gmx.de: Hello, I have created tests that check the reference counting and found that the following simple function leaks references in CPython: def simpleFunction39(): class Parent( object ): pass I have attached a test that needs to be run