[issue28115] Use argparse for the zipfile module

2016-09-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Options and arguments for zipfile CLI are manually parsed for now. Since CLI becomes more complex, it is worth to convert zipfile to use argparse. -- components: Demos and Tools keywords: easy messages: 276191 nosy: SilentGhost, serhiy.storchaka, sj

[issue28116] Error in what's new - PEP 515

2016-09-13 Thread Pierre Ducroquet
New submission from Pierre Ducroquet: The what's new section about PEP 515 says : «With PEP 515, though, you can use underscores to separate digits as desired to make numeric literals easier to read: 1_000_000_000_000_000. Underscores can be used with other numeric literals beyond integers, e.g

[issue17188] Document 'from None' in raise statement doc.

2016-09-13 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: -petri.lehtinen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue28117] warning: dereferencing type-punned pointer will break strict-aliasing rules

2016-09-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In file included from /home/serhiy/py/cpython/Modules/_sha3/sha3module.c:113:0: /home/serhiy/py/cpython/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c: In function ‘_PySHA3_KeccakP1600_SetBytesInLaneToZero’: /home/serhiy/py/cpython/Modules/_sha3/kcp/KeccakP-16

[issue15393] JSONDecoder.raw_decode breaks on leading whitespace

2016-09-13 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: -petri.lehtinen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue28117] warning: dereferencing type-punned pointer will break strict-aliasing rules

2016-09-13 Thread Christian Heimes
Changes by Christian Heimes : -- dependencies: +Add SHA-3 and SHAKE (Keccak) support stage: -> needs patch ___ Python tracker ___ ___

[issue28114] Crash in unicodeobject.c find_maxchar_surrogates on python-3.6.0b1 for Windows

2016-09-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: end-begin = 0x004550fc90512200-0x00454c49464f5250 = 5168087289776 Seems find_maxchar_surrogates() is called with wrong arguments. -- nosy: +serhiy.storchaka versions: +Python 3.7 ___ Python tracker

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Christian Heimes
New submission from Christian Heimes: Since last week I'm getting a compiler warning in _ssl.c. The compiler warning is related to the type of _ssl_locks_count. It's an unsigned. When I cast it to an int like PyMem_New(PyThread_type_lock, (int)_ssl_locks_count), the warning goes away. gcc -pt

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: It's related to new enabled GCC warnings: see issue #23545 where the warning was already reported. The code is fine. It's just hard to compute the limits of a data type in a C macro :-/ -- ___ Python tracker

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread SilentGhost
SilentGhost added the comment: It seems to be also related to #23545 (Martin saw a similar warning about a month ago). -- nosy: +SilentGhost, martin.panter, serhiy.storchaka ___ Python tracker

[issue28119] Explicit null dereferenced in formatter_unicode.c

2016-09-13 Thread Christian Heimes
New submission from Christian Heimes: Coverity is warning about four cases of potential NULL forwarding in which subsequent code does not expect a NULL value. 30. no_write_call: Although get_locale_info does overwrite locale.decimal_point on some paths, it also contains at least one feasible p

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Christian Heimes
Christian Heimes added the comment: I'm going to add a workaround. _ssl_locks_count is an unsigned int because CRYPTO_num_locks() returns an unsigned int. We can safely use a signed int here. OpenSSL needs about 20, 30 locks or so. -- ___ Python tr

[issue28111] geometric_mean can raise OverflowError when checking for inf

2016-09-13 Thread Mark Dickinson
Mark Dickinson added the comment: For reference, here's the full traceback. Issue #27975 isn't relevant here - the problem is an out-of-range integer being passed to the math.pow operation. taniyama:cpython-git mdickinson$ ./python.exe Python 3.7.0a0 (default, Sep 13 2016, 08:36:28) [GCC 4.2.1

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-13 Thread Xiang Zhang
Xiang Zhang added the comment: > assert list(b.__dict__.keys()) == ['b', 'a']) # AssertionError! No, there is no error. Once an pending slot is encountered it is combined. But inserting pending slots is prohibited and it's far from ideal. We need to know if the pending slot is the last entry

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 579141d6e353 by Victor Stinner in branch 'default': Issue #28040: Cleanup find_empty_slot() https://hg.python.org/cpython/rev/579141d6e353 -- ___ Python tracker __

[issue27889] ctypes interfers with signal handling

2016-09-13 Thread Andre Merzky
Andre Merzky added the comment: FWIW, a workaround seems to be a nested try/except clause: try: try: do_lots_of_work() except RuntimeError as e: print 'signal handling worked' except RuntimeError: print 'signal handling delayed' I did a stress test over 100k runs, and got no unexp

[issue28120] The Blaze test suite segfaults with 4a5b61b0d090

2016-09-13 Thread STINNER Victor
New submission from STINNER Victor: In the issue #4a5b61b0d090, Stefan Krah wrote: "The Blaze test suite segfaults with 4a5b61b0d090". I may be related to compact dict and the issue #28040. Stefan: Can you please explain what is Blaze? Explain how to reproduce the issue? Try to get the Python

[issue28077] Fix find_empty_slot in dictobject

2016-09-13 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue28077] Fix find_empty_slot in dictobject

2016-09-13 Thread Berker Peksag
Berker Peksag added the comment: Victor committed the patch in msg276042 in 579141d6e353. -- nosy: +berker.peksag ___ Python tracker ___ _

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: Stefan Krah: "It could still be a stack overflow, but on the surface it does not look like one. It's definitely related to the aforementioned revision: (...)" The initial bug reported in this issue is now fixed. Even if the Blaze issue is related, I would real

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue27322] test_compile_path fails when python has been installed

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: test_compileall depends on sys.path? It doesn't seem reliable to me. I suggest to create a temporary directory and replace sys.path to only have one item: this directory. I don't know which files are expected to be there, but we can probably copy .py to this

[issue20825] containment test for "ip_network in ip_network"

2016-09-13 Thread Michel Albert
Michel Albert added the comment: Are there any updates on this? Not sure if it's too late again to get it applied for the next Python (3.6) release? -- ___ Python tracker ___ __

[issue28077] Fix find_empty_slot in dictobject

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: > Victor committed the patch in msg276042 in 579141d6e353. Well, my change is a little bit different than find_empty_slot.patch. I removed the return value and I kept "ep = &ep0[mp->ma_keys->dk_nentries];". -- ___ P

[issue28117] warning: dereferencing type-punned pointer will break strict-aliasing rules

2016-09-13 Thread Christian Heimes
Christian Heimes added the comment: The compile warning occurs on 32bit builds only: http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%203.x -- ___ Python tracker

[issue28121] If module starts with comment or empty line then frame.f_code.co_firstlineno is inconsistent with inspect.findsource

2016-09-13 Thread Aivar Annamaa
New submission from Aivar Annamaa: Following program shows that frame.f_code.co_firstlineno ignores first line if it is a comment (or empty line), but inspect.getsource(frame.f_code) returns also the first line: # first line import inspect frame = inspect.currentframe() print(frame.f_code.co_f

[issue28121] If module starts with comment or empty line then frame.f_code.co_firstlineno is inconsistent with inspect.findsource

2016-09-13 Thread Aivar Annamaa
Changes by Aivar Annamaa : -- components: +Interpreter Core type: -> behavior versions: +Python 3.5 ___ Python tracker ___ ___ Python

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Martin Panter
Martin Panter added the comment: As Serhiy suggested in the other bug, one workaround is just to disable the warning with -Wno-type-limits. It would depend if the benefits of the warning outweigh the annoyance of coming up with a more complicated workaround for this specific case. --

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Christian Heimes
Christian Heimes added the comment: The code is going to go away with OpenSSL 1.1.0. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue28122] email.header.decode_header can not decode string with quotation

2016-09-13 Thread sijian liang
Changes by sijian liang : -- components: email files: demo.py nosy: barry, r.david.murray, sijian liang priority: normal severity: normal status: open title: email.header.decode_header can not decode string with quotation type: behavior versions: Python 2.7 Added file: http://bugs.python

[issue28122] email.header.decode_header can not decode string with quotation

2016-09-13 Thread sijian liang
New submission from sijian liang: #!/usr/bin/python #-*- coding:utf-8 -*- import email # from email.parser import Parser def decode_email_header(header, sep=''): l = [] for s, c in header: if c: l.append(s.decode(c)) else:

[issue28114] Crash in unicodeobject.c find_maxchar_surrogates on python-3.6.0b1 for Windows

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: > Trying to build numpy-1.11.2rc1 wheels for Python 3.6.0b1 on Windows 10 with > `python.exe setup.py bdist_wheel`, python36.dll (32 and 64 bit) segfaults in > the `find_maxchar_surrogates` function. I ran "python setup.py bdist_wheel" on numpy-1.11.2rc1 on Li

[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2016-09-13 Thread Jens Timmerman
Jens Timmerman added the comment: small setup.py file to reproduce this problem if people still had trouble reproducing (this works with the attached d002-distutils-type-checks-can-fail-issue-23102.patch) ``` #!/usr/bin/env python ''' Installation script that breaks ''' from distutils.command

[issue22458] Add fractions benchmark

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: The issue is not closed, but moved to https://github.com/python/performance/pull/10 Please continue the discussion there. I'm now slowly trying to move benchmark issues to GitHub. -- resolution: -> third party status: open -> closed

[issue26284] Fix telco benchmark

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I'm not sure if you want to make any change to bm_telco.py of the performance. If yes, please open an issue at https://github.com/python/performance > So LGTM. Hum, it looks like you are happy, so I now close this issue :-) I'm slowly trying to move d

[issue26436] Add the regex-dna benchmark

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: Can you please open a pull request on the new performance module? https://github.com/python/performance -- nosy: +haypo ___ Python tracker

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Martin Panter
Martin Panter added the comment: Perhaps another way to defeat the warning is to make PyMem_New() an inline function? I haven’t tried, but this way would make all the data types involved more explicit. -- ___ Python tracker

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: Martin: "Perhaps another way to defeat the warning is to make PyMem_New() an inline function?" See the issue #28092 for compilation issues of inline functions. We should decide if inline functions are ok or not. -- ___

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-13 Thread Stefan Krah
Stefan Krah added the comment: I don't understand how the original issue is fixed if 1e7b636b6009 exhibits the SystemError and the very next revision 4a5b61b0d090 (the fix) segfaults. And the test suite works with the previous dict. Sure, it can be a third party issue, but this constellation *d

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: Stefan Krah: "I don't understand how the original issue is fixed if 1e7b636b6009 exhibits the SystemError" "SystemError: returned NULL without setting an error" is a generic error, basically it says that a C function has bug :-) It's hard to know exactly which

[issue28119] Explicit null dereferenced in formatter_unicode.c

2016-09-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +haypo, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28120] The Blaze test suite segfaults with 4a5b61b0d090

2016-09-13 Thread Stefan Krah
Stefan Krah added the comment: Sorry Victor, I have been reporting memory related issues for a long time here. ;) I'm already using Valgrind, why would I set PYTHONMALLOC=debug? -- ___ Python tracker _

[issue26383] benchmarks (perf.py): number of decimal places in csv output

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the bug report. The issue has been fixed in performance: https://github.com/python/performance/commit/2b63335248645ce7392c8cf835ef799d41beeeba -- nosy: +haypo resolution: -> fixed status: open -> closed __

[issue28120] The Blaze test suite segfaults with 4a5b61b0d090

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: > I'm already using Valgrind, why would I set PYTHONMALLOC=debug? Valgrind doesn't understand Python frames. PYTHONMALLOC=debug can show you more information from Python internals, especially when using the tracemalloc module: https://docs.python.org/dev/whatsn

[issue28121] If module starts with comment or empty line then frame.f_code.co_firstlineno is inconsistent with inspect.findsource

2016-09-13 Thread SilentGhost
Changes by SilentGhost : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue15369] pybench and test.pystone poorly documented

2016-09-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 08a0b75904c6 by Victor Stinner in branch 'default': Remove pybench microbenchmark https://hg.python.org/cpython/rev/08a0b75904c6 -- nosy: +python-dev ___ Python tracker

[issue28120] The Blaze test suite segfaults with 4a5b61b0d090

2016-09-13 Thread Stefan Krah
Stefan Krah added the comment: Victor, I'm beginning to resent your tone. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue15369] pybench and test.pystone poorly documented

2016-09-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset e03c1b6830fd by Victor Stinner in branch 'default': Remove pystone microbenchmark https://hg.python.org/cpython/rev/e03c1b6830fd -- ___ Python tracker

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-09-13 Thread Xiang Zhang
New submission from Xiang Zhang: _PyDict_GetItem_KnownHash should handle dk_lookup return value the same as PyDict_GetItem. BTW, it seems PyDict_GetItem can call _PyDict_GetItem_KnownHash to remove duplicate code, if you like, maybe another issue? diff -r 6acd2b575a3c Objects/dictobject.c ---

[issue15369] pybench and test.pystone poorly documented

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: We now have a good and stable benchmark suite: https://github.com/python/performance I removed pystone and pybench from Python 3.7. Please use performance instead of old and not reliable microbenchmarks like pybench or pystone. -- nosy: +haypo resolut

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: Please create a patch file and attach it to the issue, so we can review it more easily. -- ___ Python tracker ___ _

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-09-13 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, I thought this is trivial so I didn't. Now upload the file patch ;). -- keywords: +patch Added file: http://bugs.python.org/file44625/issue28123.patch ___ Python tracker

[issue28114] Crash in unicodeobject.c find_maxchar_surrogates on python-3.6.0b1 for Windows

2016-09-13 Thread Eryk Sun
Eryk Sun added the comment: parse_envlist is calling PyUnicode_FromFormat with the format "%U=%U", but passing it bytes: |Debug Error! Program: C:\Program Files\Python36\python_d.exe abort() has been called (Press Retry to debug the application) (1e8.374): Break instructi

[issue28114] Crash in unicodeobject.c find_maxchar_surrogates on python-3.6.0b1 for Windows

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: > parse_envlist is calling PyUnicode_FromFormat with the format "%U=%U", but > passing it bytes: Ah, it's a regression introduced by the issue #27781 with the change e20c7d8a8187: parse_envlist() was modified to first call PyUnicode_FromFormat("%U=%U") and th

[issue28122] email.header.decode_header can not decode string with quotation

2016-09-13 Thread era
era added the comment: The double quotes around the "human readable" part of the email address are not allowed. Python is handling this correctly. -- nosy: +era ___ Python tracker

[issue28120] The Blaze test suite segfaults with 4a5b61b0d090

2016-09-13 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue28124] Rework SSL module documentation

2016-09-13 Thread Christian Heimes
New submission from Christian Heimes: The documentation of the SSL module needs a rework. It's confusing and hard to understand even for experienced developers. The documentation should start with basic use cases and easy-to-reuse best practices. * The module starts with move ssl.wrap_socket()

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: I understand the the code doesn't handle correctly lookup failures. Such failure is easy to trigger in pure Python using a custom __eq__() method for example. Can you please write an unit test for it? -- ___ Python

[issue28109] What's new item for PEP 526 -- Variable annotations

2016-09-13 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : Added file: http://bugs.python.org/file44626/whats-new-pep-526-v3a.diff ___ Python tracker ___ ___ Python-bugs-li

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-09-13 Thread Xiang Zhang
Xiang Zhang added the comment: _PyDict_GetItem_KnownHash is not invoked by any other dict methods. So to achieve it in pure Python level, we have to rely on others modules and objects such as OrderedDict, lru_cache. Is it a good idea to rely on those? -- __

[issue28120] The Blaze test suite segfaults with 4a5b61b0d090

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #28123: "_PyDict_GetItem_KnownHash ignores DKIX_ERROR return". -- ___ Python tracker ___ ___

[issue28114] Crash in unicodeobject.c find_maxchar_surrogates on python-3.6.0b1 for Windows

2016-09-13 Thread Eryk Sun
Eryk Sun added the comment: Here's a snippet to reproduce this bug: import os, sys environb = {os.fsencode(k):os.fsencode(v) for k,v in os.environ.items()} os.spawnve(os.P_WAIT, sys.executable, ('python', '--version'), environb) (Now that Windows Python provisionally supports bytes

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: > _PyDict_GetItem_KnownHash is not invoked by any other dict methods. Oh, I missed that. In this case, I suggest you to expose the function at Python level using the _testcapi module. And then use _testcapi._PyDict_GetItem_KnownHash() in test_dict. It would b

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-09-13 Thread Xiang Zhang
Xiang Zhang added the comment: How about let PyDict_GetItem call it? Just like the relationship of delitem and delitem_knownhash. You can see they share most codes. If we do that, it seems we can easily write a test(or there has already been a test) for it. --

[issue28046] Remove the concept of platform-specific directories

2016-09-13 Thread Matthias Klose
Matthias Klose added the comment: I don't like the _PYTHON_SYSCONFIGDATA_NAME hack. This should be based on the target, not on a name for just a particular file. Following up on that in #28125. -- ___ Python tracker

[issue28125] identify cross builds by a more generic environment setting.

2016-09-13 Thread Matthias Klose
New submission from Matthias Klose: I don't like the _PYTHON_SYSCONFIGDATA_NAME hack introduced in #28046. This should be based on the target, not on a name for just a particular file. Plus the abi flags should not be set by hand, you'll get in trouble at least for naming extensions, or buil

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: Xiang Zhang added the comment: > How about let PyDict_GetItem call it? PyDict_GetItem() is like the most important function in term of performance for Python. If you want to touch it, you must benchmark it. I would prefer to keep it as it is. > Just like the r

[issue28125] identify cross builds by a more generic environment setting.

2016-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo, zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Martin Panter
Martin Panter added the comment: I was thinking of “static inline” for PyMem_New(). I understand the Centos and OS X Tiger problem is only related “extern inline” vs plain “inline”, and “static inline” should not be affected. -- ___ Python tracker

[issue28120] The Blaze test suite segfaults with 4a5b61b0d090

2016-09-13 Thread Christian Heimes
Christian Heimes added the comment: The blaze test suite fails in pytest. $ sudo dnf builddep python-numpy python-h5py $ virtualenv -p ../bin/python3.6 venvblaze $ cd venvblaze $ bin/pip install install blaze pyyaml requests dask pytest h5py bin/pytest -v lib/python3.6/site-packages/blaze/tests/

[issue28120] The Blaze test suite segfaults with 4a5b61b0d090

2016-09-13 Thread Christian Heimes
Christian Heimes added the comment: $ PYTHONFAULTHANDLER=1 bin/pytest -v lib/python3.6/site-packages/blaze/tests/test_sql.py === test session starts =

[issue28120] The Blaze test suite segfaults with 4a5b61b0d090

2016-09-13 Thread Christian Heimes
Christian Heimes added the comment: It's a bug in sqlalchemy. The test suite of sqlalchemy is crashing, too. $ PYTHONFAULTHANDLER=1 ../bin/pytest -v -s === test session starts ==

[issue28120] The Blaze test suite segfaults with 4a5b61b0d090

2016-09-13 Thread Stefan Krah
Stefan Krah added the comment: It fails in pytest and has a segfault. The pytest issue should probably be separate issue (it could also be a blaze issue). This is a minimal reproducer for the segfault: = from blaze.expr import symbol fro

[issue23404] 'make touch' does not work with git clones of the source repository

2016-09-13 Thread Martin Panter
Martin Panter added the comment: Okay so my “make -t” trick has various flaws. You still have to know the filenames to specify, it requires Makefile to be generated by configure in the source tree, and it creates empty files if you use it in a separate build directory. Another idea: instead o

[issue28120] SQLAlchemy's expire_instance() causes _PyDict_Pop: Assertion `ix >= 0' failed.

2016-09-13 Thread Christian Heimes
Changes by Christian Heimes : -- title: The Blaze test suite segfaults with 4a5b61b0d090 -> SQLAlchemy's expire_instance() causes _PyDict_Pop: Assertion `ix >= 0' failed. ___ Python tracker ___

[issue28120] SQLAlchemy's expire_instance() causes _PyDict_Pop: Assertion `ix >= 0' failed.

2016-09-13 Thread Christian Heimes
Christian Heimes added the comment: The issue is not related to Blaze. It is caused by a SQLAlchemy method. expire_instance() calls pop(name, None) on instance __dict__. -- ___ Python tracker _

[issue28120] SQLAlchemy's expire_instance() causes _PyDict_Pop: Assertion `ix >= 0' failed.

2016-09-13 Thread Stefan Krah
Stefan Krah added the comment: Thanks, Christian! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Matthias Klose
Matthias Klose added the comment: updated patch that always used memcpy for the little endian case. -- Added file: http://bugs.python.org/file44628/pyhash.diff ___ Python tracker ___

[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2016-09-13 Thread Chris Jerdonek
Chris Jerdonek added the comment: An idea occurred to me on this recently. Instead of changing TextTestResult to call test.id() everywhere instead of str(test), what about making TextTestResult DRY by having it call a new method called something like self.getName(test)? With this approach, cu

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Matthias Klose
Changes by Matthias Klose : Removed file: http://bugs.python.org/file44515/pyhash.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Matthias Klose
Changes by Matthias Klose : Removed file: http://bugs.python.org/file44628/pyhash.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Matthias Klose
Changes by Matthias Klose : Added file: http://bugs.python.org/file44629/pyhash.diff ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Christian Heimes
Christian Heimes added the comment: I'm a bit worried that the patch might slow down the general case of SipHash24. When I was working on SipHash24 I made sure that the general case in PyBytes_Object and PyUnicode_Object are fast and always aligned. Do all compilers optimize that case? For MSV

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Stefan Krah
Stefan Krah added the comment: FWIW, MSVC optimizes memcpy: http://bugs.python.org/issue15993 The pgo issue has been fixed according to Steve Dower. -- nosy: +skrah ___ Python tracker _

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Matthias Klose
Matthias Klose added the comment: a variant of the patch that keeps the parameter types of _le64toh. -- Added file: http://bugs.python.org/file44630/pyhash2.diff ___ Python tracker _

[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2016-09-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9cabcb4411ac by Martin Panter in branch '2.7': Issue #15819: Drop dead code; -IInclude already added unconditionally https://hg.python.org/cpython/rev/9cabcb4411ac -- ___ Python tracker

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Matthias Klose
Matthias Klose added the comment: I can check, if the memcpy is optimized away. As an alternative, we could use __builtin_memcpy. That is available for clang as well (would have to check icc). -- ___ Python tracker

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue28126] Py_MEMCPY: Use memcpy on Windows?

2016-09-13 Thread Christian Heimes
New submission from Christian Heimes: Py_MEMCPY() has a special case for small blocks on Windows to work around an ancient performance issue in MSVC. Can we safely assume that recent MSVC properly optimize memcpy()? See #28055 /* Py_MEMCPY can be used instead of memcpy in cases where the copie

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Christian Heimes
Christian Heimes added the comment: I created #28126 for MSVC. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue28120] SQLAlchemy's expire_instance() causes _PyDict_Pop: Assertion `ix >= 0' failed.

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: I added debug traces to _PyDict_Pop(). It looks like the assertion failed after dictresize() converts a splitted table into a combined table. After the resize, the key '_columns_plus_names' cannot be found anymore, whereas it was found before. The string thin

[issue28125] identify cross builds by a more generic environment setting.

2016-09-13 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +xdegaye ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue28120] Bug in _PyDict_Pop() on a splitted table

2016-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- title: SQLAlchemy's expire_instance() causes _PyDict_Pop: Assertion `ix >= 0' failed. -> Bug in _PyDict_Pop() on a splitted table ___ Python tracker _

[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2016-09-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 36550e4f9b4c by Martin Panter in branch '3.5': Issue #15819: Remove old unconditional -IInclude option https://hg.python.org/cpython/rev/36550e4f9b4c New changeset a90daae58323 by Martin Panter in branch '3.6': Issue #15819: Merge include search fro

[issue28120] Bug in _PyDict_Pop() on a splitted table

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: To reproduce the issue: * compile Python 3.6 in debug mode * download https://pypi.python.org/pypi/SQLAlchemy/1.1.0b3 * Then type: --- ./python -m venv venvsqla cd venvsqla source bin/activate python -m pip install pytest tar -xf ../SQLAlchemy-1.1.0b3.tar.gz

[issue16189] ld_so_aix not found

2016-09-13 Thread Martin Panter
Martin Panter added the comment: Closing this assuming that revision ca1ddd365f5f (committed to 3.5 and 3.6+ branches) fixed it. -- nosy: +martin.panter resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> AIX shared library extension modules installation

[issue28120] Bug in _PyDict_Pop() on a splitted table

2016-09-13 Thread Xiang Zhang
Xiang Zhang added the comment: No need, you can reproduce it by this: >>> class C: ... pass ... >>> a, b = C(), C() >>> a.a, a.b = 1, 2 >>> b.a = 1 >>> b.__dict__.pop('b') python: Objects/dictobject.c:1739: _PyDict_Pop: Assertion `ix >= 0' failed. Aborted (core dumped) -- nosy: +xi

[issue28120] Bug in _PyDict_Pop() on a splitted table

2016-09-13 Thread Xiang Zhang
Xiang Zhang added the comment: I submit a patch that can solve this. Actually I find it before but forget about it -- keywords: +patch Added file: http://bugs.python.org/file44631/issue28120.patch ___ Python tracker

[issue28120] Bug in _PyDict_Pop() on a splitted table

2016-09-13 Thread Christian Heimes
Christian Heimes added the comment: Good work! This example is a bit easier to understand: class Cls: pass a = Cls() a.x = 1 a.y = 2 b = Cls() b.x = 1 print(hasattr(b, 'y')) print(b.__dict__.pop('y', None)) $ ./python d.py False python: Objects/dictobject.c:1743: _PyDict_Pop: Assertion

[issue28126] Py_MEMCPY: Use memcpy on Windows?

2016-09-13 Thread Steve Dower
Steve Dower added the comment: Yes, memcpy (or preferably memcpy_s, which includes the size of the destination) are basically intrinsics that will inline short copies and call out to a range of implementations depending on alignment/overlap/etc. --

  1   2   3   >