[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> ___ __

[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_

[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

[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: > 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-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-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

[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-24 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: Alternatively, instead of not implementing `loader.get_source()`, we could define a new semantic: if it returns `NotImplemented`, assume that the loader doesn't know how to get the sources. In that case, linecache would fal

[issue33261] inspect.isgeneratorfunction fails on hand-created methods

2018-04-18 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: Can we please go back to the original issue? If you think that __code__ should be an alias for __call__.__code__, that is a different issue. On https://github.com/python/cpython/pull/6448#issuecomment-381507329 I posted an alter

[issue33261] inspect.isgeneratorfunction fails on hand-created methods

2018-04-14 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: > I would like python_coded_callable.__code__ to be the code object executed > when python_coded_callable is called First of all, that doesn't answer the question of what to do with non-Python coded callables where there is

[issue33261] inspect.isgeneratorfunction fails on hand-created methods

2018-04-14 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: The only attributes that a method is guaranteed to have are __func__ and __self__ (which are the arguments passed to the MethodType constructor). All other attributes are looked up through __func__ by the C version of the following

[issue33261] inspect.isgeneratorfunction fails on hand-created methods

2018-04-14 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: > I am wondering if, instead, the bug is in m, the object returned by > MethodType, or in attribute lookup thereupon. What would you expect m.__code__ to return then? Methods support arbitrary callables and certainly not a

[issue33265] contextlib.ExitStack abuses __self__

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

[issue13585] Add contextlib.ExitStack

2018-04-11 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: Follow-up: https://bugs.python.org/issue33265 -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue33265] contextlib.ExitStack abuses __self__

2018-04-11 Thread Jeroen Demeyer
New submission from Jeroen Demeyer <j.deme...@ugent.be>: In contextlib, there is code which roughly looks like def _exit_wrapper(exc_type, exc, tb): return cm_exit(cm, exc_type, exc, tb) _exit_wrapper.__self__ = cm This creates a new function _exit_wrappe

[issue13585] Add contextlib.ExitStack

2018-04-11 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: Why this? _exit_wrapper.__self__ = cm It seems that you are trying to create something which is exactly like a method except that it's not a method. Is there any reason to not use an actual method? It would actually simplify the co

[issue33261] inspect.isgeneratorfunction fails on hand-created methods

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

[issue33261] inspect.isgeneratorfunction fails on hand-created methods

2018-04-11 Thread Jeroen Demeyer
New submission from Jeroen Demeyer <j.deme...@ugent.be>: The inspect functions isgeneratorfunction, iscoroutinefunction, isasyncgenfunction can fail on methods that do not have a __code__ attribute: >>> from types import MethodType >>> class Callable: ...

[issue33222] Various test failures if PYTHONUSERBASE is not canonicalized

2018-04-04 Thread Jeroen Demeyer
New submission from Jeroen Demeyer <j.deme...@ugent.be>: Setting PYTHONUSERBASE=/tmp/x/.. causes the Python test suite to fail: == FAIL: test_user_similar (test.test_sysconfig.TestSys

[issue30071] Duck-typing inspect.isfunction()

2018-04-04 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: Superseded by https://www.python.org/dev/peps/pep-0575/ -- stage: test needed -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bugs.

[issue30071] Duck-typing inspect.isfunction()

2018-03-22 Thread Jeroen Demeyer
Jeroen Demeyer <j.deme...@ugent.be> added the comment: See https://mail.python.org/pipermail/python-ideas/2018-March/049398.html -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

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

2018-03-20 Thread Jeroen Demeyer
Change by Jeroen Demeyer <j.deme...@ugent.be>: -- nosy: +jdemeyer ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue11566> ___ _

[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-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-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

[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

[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: 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-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

[issue30537] Using PyNumber_AsSsize_t in itertools.islice

2018-01-12 Thread Jeroen Demeyer
Jeroen Demeyer <jdeme...@cage.ugent.be> added the comment: Just to note that this bug affects SageMath too: https://trac.sagemath.org/ticket/24528 Thanks for fixing! -- nosy: +jdemeyer ___ Python tracker <rep...@bugs.python.or

[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.

[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

[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: 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
Changes by Jeroen Demeyer <jdeme...@cage.ugent.be>: -- nosy: +jdemeyer ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29988> ___ _

[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

[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-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
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-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-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
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

[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

[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

[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

[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.

[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

[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

[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

[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

[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

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-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-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

[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

[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

[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' >>>

[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

[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
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

[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> ___ ___

[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

[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> ___ __

[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

[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

[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

[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

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

[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

[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-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-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

[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

<    1   2   3   4   5   6