[issue15182] find_library_file() should try to link

2013-01-31 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Sorry for the late answer, but yes: I found this out using an actual compilation. I must admit it was in a bit of an usual situation (32-bit userspace on a mixed 32/64-bit mutilib installation), but most other software packages have no problems configuring

[issue1222585] C++ compilation support for distutils

2013-03-14 Thread Jeroen Demeyer
Changes by Jeroen Demeyer jdeme...@cage.ugent.be: -- nosy: +jdemeyer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1222585 ___ ___ Python-bugs

[issue15182] find_library_file() should try to link

2012-06-25 Thread Jeroen Demeyer
New submission from Jeroen Demeyer jdeme...@cage.ugent.be: The find_library_function() in Lib/distutils/unixccompiler.py does a very simple-minded check to determine the existence of a library. It basically only checks that a certain .so file exists. This may lead to false positives: the mere

[issue17998] internal error in regular expression engine

2013-05-17 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: On Linux Ubuntu 13.04, i686: $ uname -a Linux arando 3.5.0-26-generic #42-Ubuntu SMP Fri Mar 8 23:20:06 UTC 2013 i686 i686 i686 GNU/Linux $ python Python 2.7.5 (default, May 17 2013, 18:43:24) [GCC 4.7.3] on linux2 Type help, copyright, credits or license

[issue18000] _md5 should be built if _ssl cannot be built

2013-05-17 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: I have an Itanium Linux system where compiling Python's _ssl module fails for some reason, with the consequence that there is no md5 support at all in the resulting Python 2.7.5 installation. With Python 2.7.4, setup.py didn't even try to compile _ssl

[issue18000] _md5 should be built if _ssl cannot be built

2013-05-17 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Sure, building _ssl fails with: building '_ssl' extension gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -I. -IInclude -I./Include -I/usr/include -I/home/buildbot/build/sage/iras-1/iras_full/build /sage-5.10.beta4/local/include -I

[issue18000] _md5 should be built if _ssl cannot be built

2013-06-14 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: The problem on the machine that I mentioned was a regression from 2.7.4 to 2.7.5, probably due to #17086. Whether you consider a patch a bugfix or new feature is quite subjective, right? If #17086 is a bugfix, then this can also be a bugfix

[issue17086] backport cross-build patches to the 2.7 branch

2013-06-14 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: This is causing breakage, see #17990 and #18000. -- nosy: +jdemeyer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17086

[issue16202] sys.path[0] security issues

2012-10-11 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: There is a serious security problem with Python's default sys.path. If I execute $ python /tmp/somescript.py then Python will add /tmp as sys.path[0], such that an import foobar will cause Python to read /tmp/foobar (or variations). This vulnerability

[issue16202] sys.path[0] security issues

2012-10-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Robert: I don't think that running scripts in /tmp is inherently unsafe. It is Python's sys.path handling which makes it unsafe. That being said, I am not against distutils being fixed but I do think the root issue should be fixed. And of course you're

[issue16202] sys.path[0] security issues

2012-10-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: If you don't plan any further Python-2 releases, it would be pity that this cannot be fixed. If you do plan a further Python-2 release, I find backwards compatibility a poor excuse. I'm not saying that backwards compatibility should be totally ignored

[issue16202] sys.path[0] security issues

2012-10-15 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: It's sort of the same as #946373, except that bug report deals with other bad consequences of sys.path[0], unrelated to security. #5753 is specifically about the C API, not about running plain Python. -- ___ Python

[issue16202] sys.path[0] security issues

2012-10-15 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I should point out that there is also dangerous code in Lib/test/test_subprocess.py in the test_cwd() function. There, the following is executed from /tmp: python -c 'import sys,os; sys.stdout.write(os.getcwd())' As Python luckily knows where to import

[issue16202] sys.path[0] security issues

2012-11-08 Thread Jeroen Demeyer
Changes by Jeroen Demeyer jdeme...@cage.ugent.be: Added file: http://bugs.python.org/file27923/sys_path_security.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16202

[issue16202] sys.path[0] security issues

2012-11-08 Thread Jeroen Demeyer
Changes by Jeroen Demeyer jdeme...@cage.ugent.be: Removed file: http://bugs.python.org/file27536/sys_path_security.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16202

[issue16202] sys.path[0] security issues

2012-11-08 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I updated sys_path_security.patch by a newer version. This version will be merged in the Python package of Sage (http://www.sagemath.org/). I realise that it looks unlikely that it will be merged in CPython, but at least it's here for reference

[issue25592] distutils docs: data_files always uses sys.prefix

2015-11-09 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: The documentation for distutils claims that sys.exec_prefix is used in certain cases to install data_files, but this is simply not true (maybe it was true in the past or this sentence was copy/pasted from somewhere else?) -- assignee: docs@python

[issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self"

2015-11-28 Thread Jeroen Demeyer
Changes by Jeroen Demeyer <jdeme...@cage.ugent.be>: -- type: -> crash ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25750> ___ __

[issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self"

2015-11-29 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Thanks for the pointer. My patch does fix the crash in Lib/test/crashers/borrowed_ref_2.py on Python 2.7.10. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27177] re match.group should support __index__

2016-06-02 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I would still argue that it's a bug. The intention of PEP 357 is that __index__ should be used whenever some object needs to be converted to a Py_ssize_t, which is exactly what you do here. -- ___ Python tracker

[issue27177] re match.group should support __index__

2016-06-01 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: ``` >>> class zero(object): ... def __index__(self): ... return 0 ... >>> z = zero() >>> import re >>> p = re.compile('(a)b') >>> m = p.match('ab') >>> m.group(0) 'ab' >>>

[issue27177] re match.group should support __index__

2016-06-18 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: My use case is SageMath: http://trac.sagemath.org/ticket/20750 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue4949] Constness in PyErr_NewException

2016-03-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Follow-up: #26476 -- nosy: +jdemeyer ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4949> ___ ___

[issue26476] Constness in _PyErr_BadInternalCall

2016-03-03 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: PyErr_BadInternalCall() calls _PyErr_BadInternalCall(__FILE__, __LINE__). Since __FILE__ is a string constant, the first argument of _PyErr_BadInternalCall should be a "const char*" instead of a "char*". This is a follow-up to #4949. Mo

[issue26476] Constness in _PyErr_BadInternalCall

2016-03-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > It is questionable wherever it should be backported to 2.7. It violates the C++ standard (for extension modules written in C++), so it's clearly a bug. -- ___ Python tracker <rep...@bugs.python.org&

[issue26476] Constness in _PyErr_BadInternalCall

2016-03-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > CPython is written on C and provides C API. If you look at the title of https://docs.python.org/2/extending/extending.html clearly C++ extensions are also supported. > Even if change the signature of one function, this will not help much, > beca

[issue13285] signal module ignores external signal changes

2017-01-25 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Let me add that this "low-level opaque object" would be rather easy to implement on POSIX systems (I have no clue about other systems such as Windows). I could implement it, but it would be good to have some pre-approval from Python devs that it's a

[issue13285] signal module ignores external signal changes

2017-01-26 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Here is a proposal for an API: * getsignal: return the Python-level signal handler (this is an existing function) * setsignal: set the Python-level signal handler (but not the OS-level signal handler) * getossignal: get the OS-level signal handler as opaque

[issue29588] importing ssl can fail with NameError: name 'PROTOCOL_TLS' is not defined

2017-02-17 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: This is a regression introduced in Python 2.7.13: Importing the ssl module can fail with >>> import ssl Traceback (most recent call last): File "", line 1, in File "/Users/jdemeyer/sage/local/lib/python/ssl.py", line

[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2016-09-08 Thread Jeroen Demeyer
Changes by Jeroen Demeyer <jdeme...@cage.ugent.be>: -- keywords: +patch Added file: http://bugs.python.org/file44464/no_strict_proto.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.pytho

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2016-12-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: @serhiy.storchaka: yes, changing the order of the base classes fixes the issue with __new__. Also manually assigning __new__ works, like class C(A, B): __new__ = B.__new__ What is broken by this patch is only the auto-detection of which __new__ (really

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2016-12-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Wouldn't it be possible to fix assignment of __new__ without breaking backwards compatibility (and then apply the same patch for all Python versions)? I have a feeling that breaking the auto-detection of tp_new is a new bug introduced by this patch

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2016-12-11 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Here is more minimal breaking example. This clearly shows that this patch breaks backwards compatibility. ``` $ cat obj.pyx cdef class OBJ(object): pass $ ipython Python 2.7.13rc1 (default, Dec 11 2016, 14:21:24) Type "copyright", "credi

[issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self"

2017-01-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: If you are on POSIX, you could also use cysignals to get a traceback (simply import cysignals, which will install a handler for fatal signals like SIGSEGV). -- ___ Python tracker <rep...@bugs.python.org>

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2017-01-04 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: It worries me that nothing in the Python docs nor in any PEP describes how tp_new is inherited. In my opinion, ​this patch makes a significant change which should be subject to a PEP. However, neither the old nor new behaviour is described anywhere. This also

[issue13285] signal module ignores external signal changes

2017-04-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Ping? I'll try to implement this in cysignals (which is more difficult than doing it in CPython because I cannot access all internals of the Python signal module). -- ___ Python tracker <rep...@bugs.python.

[issue13285] signal module ignores external signal changes

2017-04-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I have a preliminary implementation (in the cysignals package) at https://github.com/sagemath/cysignals/pull/53 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30057] signal.signal should check tripped signals

2017-04-12 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: There is a race condition in calling signal.signal() if the signal arrives while (or right before) signal.signal() is being executed: the function signal.signal(sig, action) marks the signal "sig" as not tripped. Because of this, signals ca

[issue30057] signal.signal should check tripped signals

2017-04-12 Thread Jeroen Demeyer
Changes by Jeroen Demeyer <jdeme...@cage.ugent.be>: Added file: http://bugs.python.org/file46802/fix30057-py3.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30057] signal.signal should check tripped signals

2017-04-12 Thread Jeroen Demeyer
Changes by Jeroen Demeyer <jdeme...@cage.ugent.be>: -- keywords: +patch Added file: http://bugs.python.org/file46801/fix30057-py2.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30071] Duck-typing inspect.isfunction()

2017-04-15 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > As indicated above, perfect emulation seems impossible for Cython or any > other external compiler that does not use the same bytecode. True, Cython functions are not implemented using Python bytecode, so perfect emulation is impossible. The use case

[issue30071] Duck-typing inspect.isfunction()

2017-04-14 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: Python is supposed to encourage duck-typing, but the "inspect" module doesn't follow this advice. A particular problem is that Cython functions are not recognized by the inspect module to be functions: http://cython.readthedocs.io/en/latest/src

[issue30071] Duck-typing inspect.isfunction()

2017-04-14 Thread Jeroen Demeyer
Changes by Jeroen Demeyer <jdeme...@cage.ugent.be>: -- keywords: +patch Added file: http://bugs.python.org/file46803/isfunction.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30071] Duck-typing inspect.isfunction()

2017-04-14 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > If inspect reports something is a duck, it should be an actual duck, not just > something that quacks. The problem is that some Python packages (Sphinx and IPython for example) really need to know whether it quacks. And the only tool the

[issue30071] Duck-typing inspect.isfunction()

2017-04-15 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: For the record: the __code__ attribute of a Cython function is a real "code" object (the same type as the __code__ attribute of a Python function). Of course not all fields are relevant, for example co_code is empty. So I think it's clear that Cy

[issue30071] Duck-typing inspect.isfunction()

2017-04-14 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: At the very least, the inspect module should use more duck-typing internally. For example, consider this code from "getfile": if ismethod(object): object = object.__func__ if isfunction(object): object = objec

[issue30071] Duck-typing inspect.isfunction()

2017-04-19 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > So I expect that the case you 'care most about' already works. Yes, it works. That's the most ironic part of this issue: getfullargspec(func) works but packages like Sphinx will not call getfullargspec(func) because they do not detect that &q

[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-06-28 Thread Jeroen Demeyer
Changes by Jeroen Demeyer <jdeme...@cage.ugent.be>: -- nosy: +jdemeyer ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29988> ___ _

[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-06-28 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Nice analysis. I always assumed that `with` was safe from such race conditions, but it isn't. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-06-28 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Or we could steal a bit in the opcode encoding or something. That seems like a very reasonable and easy-to-implement solution. It would generalize this check: https://github.com/python/cpython/blob/e82cf8675bacd7a03de508ed11865fc2701dcef5/Python/ceva

[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-06-28 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Actually, I think it's between the end of the `try` and the beginning of the > `finally` (which is precisely the same place that *breaks* for a with > statement). Sorry, this is wrong and Erik was right. But the special case doesn't work a

[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-06-28 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > It seems like that does at least try to guarantee that a signal can't > interrupt between: > > lock.acquire() > try: > ... Actually, I think it's between the end of the `try` and the beginning of the `finally` (which is precis

[issue31388] Provide a way to defer SIGINT handling in the current thread

2017-11-14 Thread Jeroen Demeyer
Jeroen Demeyer <jdeme...@cage.ugent.be> added the comment: It's not only about ensuring that cleanup code gets run, but also about ensuring that the interrupt is actually seen. Currently, if you press CTRL-C at the "wrong" moment (during __del__), it will just get ignored.

[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-05-14 Thread Jeroen Demeyer
Change by Jeroen Demeyer <j.deme...@ugent.be>: -- nosy: +jdemeyer ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue5755> ___ __

[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-05-14 Thread Jeroen Demeyer
Change by Jeroen Demeyer <j.deme...@ugent.be>: -- pull_requests: +6476 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.py

[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-05-15 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: > Or just remove it I updated the PR to do that. I didn't want to propose that initially because that patch was proposed here almost 2 years ago but not accepted. -- ___ Python tra

[issue33445] test_cprofile should fail instead of displaying a message

2018-05-08 Thread Jeroen Demeyer
Change by Jeroen Demeyer <j.deme...@ugent.be>: -- keywords: +patch pull_requests: +6420 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33445] test_cprofile should fail instead of displaying a message

2018-05-08 Thread Jeroen Demeyer
New submission from Jeroen Demeyer <j.deme...@ugent.be>: When this test from Lib/test/test_profile.py fail, it just prints a message and doesn't fail the testsuite: def test_cprofile(self): results = self.do_profiling() expected = self.get_expected_

[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-06-04 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > 2.7 doesn't have CFLAGS_NODIST I meant backporting this patch as-is to 2.7 without adding -Wstrict-prototypes to CFLAGS_NODIST -- ___ Python tracker <https://bugs.python.org/iss

[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-06-04 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Can we backport this to 3.7 and 3.6? I think it's safe and helpful. And 2.7 for the same reasons. -- ___ Python tracker <https://bugs.python.org/iss

[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-06-07 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +7099 ___ Python tracker <https://bugs.python.org/issue5755> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33418] Memory leaks in functions

2018-07-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > While this is a obvious bug, f.__module__ = f seems very unnatural. Sure. -- ___ Python tracker <https://bugs.python.org/issu

[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: > How does CPython display the source for tracebacks in Cython modules? Do you mean the "python" command-line program? That uses a different algorithm: to find a file FOO, it searches [os.path.join(p, os.path.b

[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: Since you are asking various "meta" questions, let me explain the wider context first. This bug report is coming from SageMath. Currently, SageMath only supports Python 2.7 but we are slowly and steadily porting it to Py

[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: > But the standard library has no need to ever find source for extension modules > So there's no need for the stdlib to be involved The standard library is not a closed system. It's not meant to support only itself, i

[issue32797] Tracebacks from Cython modules no longer work

2018-04-30 Thread Jeroen Demeyer
Change by Jeroen Demeyer <j.deme...@ugent.be>: -- keywords: +patch pull_requests: +6349 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32797] Tracebacks from Cython modules no longer work

2018-04-30 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: > IMO, debating whether a None return means there's absolutely no chance of > there being source is silly - the best the loader can say is that it can't > provide source. I don't think it is silly: if "None" mea

[issue33418] Memory leaks in functions

2018-05-03 Thread Jeroen Demeyer
Change by Jeroen Demeyer <j.deme...@ugent.be>: -- components: +Interpreter Core type: -> resource usage ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33418] Memory leaks in functions

2018-05-03 Thread Jeroen Demeyer
New submission from Jeroen Demeyer <j.deme...@ugent.be>: This is a memory leak: >>> while True: ...def f(): pass ...f.__doc__ = f This also: >>> while Tru

[issue32773] distutils should NOT preserve timestamps

2018-02-05 Thread Jeroen Demeyer
New submission from Jeroen Demeyer <jdeme...@cage.ugent.be>: When a Python project is installed, distutils copies the files from the build to install directory using copy_file(). In this copy operation, timestamps are preserved. In other words, the timestamp of the installed file

[issue32773] distutils should NOT preserve timestamps

2018-02-06 Thread Jeroen Demeyer
Jeroen Demeyer <jdeme...@cage.ugent.be> added the comment: This is a bug report and not a feature request. I don't think that there should be an option. It should just do the right thing, which is NOT preserving timestamps. -- ___ Python t

[issue32773] distutils should NOT preserve timestamps

2018-02-06 Thread Jeroen Demeyer
Jeroen Demeyer <jdeme...@cage.ugent.be> added the comment: I am genuinely curious to hear a good reason why timestamps should be preserved by distutils. I cannot really imagine what could possibly break. As I said, this is the standard for many non-Python projects and it seems to wor

[issue32773] distutils should NOT preserve timestamps

2018-02-06 Thread Jeroen Demeyer
Jeroen Demeyer <jdeme...@cage.ugent.be> added the comment: > if so wouldn't that still require an internal option? No, you just need to change the calls to the copy_file() function to add the keyword argument preserve_times=False If you agree, then I could easily provid

[issue32797] Tracebacks from Cython modules no longer work

2018-02-09 Thread Jeroen Demeyer
Jeroen Demeyer <jdeme...@cage.ugent.be> added the comment: > Why? What would that help with? PEP 302 says get_source() can return None > [if] no sources are found. Returning None implies that it's absolutely impossible that there are sources to be found. But in certain cases

[issue32797] Tracebacks from Cython modules no longer work

2018-02-09 Thread Jeroen Demeyer
Jeroen Demeyer <jdeme...@cage.ugent.be> added the comment: > I don't think there's a bug in Python here, and that this is a problem that > needs to be solved on the Cython end. I'm not necessarily disagreeing here. It all depends on how ExtensionFileLoader is meant to be used. S

[issue32797] Tracebacks from Cython modules no longer work

2018-02-08 Thread Jeroen Demeyer
New submission from Jeroen Demeyer <jdeme...@cage.ugent.be>: Displaying the source code in tracebacks for Cython-compiled extension modules in IPython no longer works due to PEP 302. Various fixes are possible, the two most obvious ones are: 1. linecache should continue sea

[issue1617161] Instance methods compare equal when their self's are equal

2018-06-21 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I just posted to python-dev about this issue: https://mail.python.org/pipermail/python-dev/2018-June/153959.html However, I think that comparing using "==" is the right thing to do. So I think that >>> [].append == [].append False s

[issue33925] builtin_function_or_method compares __self__ by identity instead of equality

2018-06-21 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > This is a duplicate of issue1617161. Well, it's really the opposite. That issue seems to be arguing that __self__ should be compared using "is" while I think it should be compared using "==". -- ___

[issue33925] builtin_function_or_method compares __self__ by identity instead of equality

2018-06-21 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : Methods of Python functions compare equal if the functions are equal and if __self__ is equal: >>> class X: ... def __eq__(self, other): return True ... def meth(self): pass >>> X().meth == X().meth True This is because X() ==

[issue34280] METH_NOARGS: no longer require that second arg is NULL

2018-07-30 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +8077 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34280> ___ ___ Py

[issue34280] METH_NOARGS: no longer require that second arg is NULL

2018-07-30 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : A C function with signature METH_NOARGS takes two arguments where the first is "self" and the second is guaranteed to be NULL. Given that this second argument really should never be used, I would like to drop the guarantee that the argume

[issue34245] Python library should be installed writable

2018-07-27 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : In Makefile.pre.in, there is this: # Shared libraries must be installed with executable mode on some systems; # rather than figuring out exactly which, we always give them executable mode. # Also, making them read-only seems to be a good idea

[issue34245] Python library should be installed writable

2018-07-27 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +8012 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34245> ___ ___ Py

[issue34245] Python library should be installed writable

2018-07-27 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Also, some tools may want to edit the library after installation. Rebasing on Cygwin is an example of that. -- ___ Python tracker <https://bugs.python.org/issue34

[issue34245] Python library should be installed writable

2018-07-27 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Isn't it useful to avoid accidental change while open files with editor for > just reading? Why would that argument apply to a binary file (and only to binary files)? > Is there any real world problem about read-only library? It makes it slight

[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2018-07-31 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I always assumed that enabling profiling only from the Python bytecode interpreter was a deliberate choice. -- nosy: +jdemeyer ___ Python tracker <https://bugs.python.org/issue29

[issue34211] Cygwin build broken due to use of _Type in static declaration in _abc module

2018-07-31 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: For those who are not very aware of Cygwin issues: what is wrong with PyVarObject_HEAD_INIT(_Type, 0); -- nosy: +jdemeyer ___ Python tracker <https://bugs.python.org/issue34

[issue34280] METH_NOARGS: no longer require that second arg is NULL

2018-07-31 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: OK, I closed this without applying the change. It means one extra special case in PEP 580, but it's not a big deal. -- ___ Python tracker <https://bugs.python.org/issue34

[issue34287] bufferedio.c uses unused argument of METH_NOARGS functions

2018-07-31 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +8091 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34287> ___ ___ Py

[issue34287] bufferedio.c uses unused argument of METH_NOARGS functions

2018-07-31 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : A METH_NOARGS function has a second unused argument which is always NULL (this is guaranteed by the documentation). However, some functions in Modules/_io/bufferedio.c actually that second NULL argument. This is technically not a bug, but it looks more

[issue34280] METH_NOARGS: no longer require that second arg is NULL

2018-07-31 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34280> ___ ___ Pyth

[issue34211] Cygwin build broken due to use of _Type in static declaration in _abc module

2018-08-01 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Linker issues are always tricky... I understand that there is no problem within libpython, so the questions below refer to extension modules. I am asking them from the point of view of somebody writing Python extension modules who is clueless about Cygwin

[issue32773] distutils should NOT preserve timestamps

2018-08-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I started a discussion at https://mail.python.org/mm3/archives/list/distutils-...@python.org/thread/4FHEGHZYWCDRWVPGYLAU5VUS5BAX73MO/ -- ___ Python tracker <https://bugs.python.org/issue32

[issue34126] Profiling certain invalid calls crashes Python

2018-08-03 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- resolution: -> fixed status: open -> closed ___ Python tracker <https://bugs.python.org/issue34126> ___ ___ Python-bugs-list

[issue32797] Tracebacks from Cython modules no longer work

2018-08-04 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Then instead of adding the source directory to sys.path What's wrong with that? Installing the .pyx sources together with the .so compiled modules makes a lot of sense to me: it is very analogous to installing the .py sources together with the .pyc b

[issue32797] Tracebacks from Cython modules no longer work

2018-08-04 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > In my view (and that of the documentation for sys.path), sys.path is where > you put things that the Python interpreter can load - .so files, .pyc files > and .py files. It's quite typical for packages to install stuff in site-packa

[issue32797] Tracebacks from Cython modules no longer work

2018-08-04 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: To everybody who mentioned that Cython sources don't belong on sys.path: where *do* they belong then? One issue which hasn't been mentioned before is packaging. By installing Cython sources along with the generated .so files, we can re-use all the existing

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > In a subdirectory similar to __pycache__. I thought about that, but I don't like the idea because then the directory structure of the actual sources would be different from the directory structure of the installed sources. So for example, how should &

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Nick: do you agree that this "source-only metapath" should by default contain an entry to look in sys.path for source files? -- ___ Python tracker <https://bugs.python.o

[issue32797] Tracebacks from Cython modules no longer work

2018-08-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Keeping two identical package structures in different places, one for .py > files and generated .so files, and one for Cython source files (.pyx, .pxd, > .pxi), is not desirable from a user perspective, and would require namespace &

  1   2   3   4   5   6   >