[issue36117] Allow rich comparisons for real-valued complex objects.

2019-02-26 Thread Brandt Bucher
New submission from Brandt Bucher : Currently, it isn't legal to perform <, >, <=, or >= rich comparisons on any complex objects, even though these operations are mathematically well-defined for real numbers. The attached PR addresses this by defining rich comparisons for real-valued complex

[issue36117] Allow rich comparisons for real-valued complex objects.

2019-02-26 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +12073 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue36117] Allow rich comparisons for real-valued complex objects.

2019-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think we should do this. In numerical computation we should not depend on exact floating point values, because is affected by computation errors. It would be hard to debug the program when some complex numbers are orderable, but other are not, and

[issue36117] Allow rich comparisons for real-valued complex objects.

2019-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you need to order real-valued complex object, convert them to float objects first. -- ___ Python tracker ___ __

[issue36117] Allow rich comparisons for real-valued complex objects.

2019-02-26 Thread Brandt Bucher
Brandt Bucher added the comment: I don't really see, though, how comparing complex(42) == float(42) is any less dangerous than complex(42) <= float(42). It seems odd to me, personally, that real-valued complex objects are valid for *some* rich comparisons (but not others) when the math is un

[issue36117] Allow rich comparisons for real-valued complex objects.

2019-02-26 Thread Mark Dickinson
Mark Dickinson added the comment: -1 from me. The rules for when things are comparable or not should be kept simple. -- ___ Python tracker ___ ___

[issue36106] resolve sinpi() name clash with libm

2019-02-26 Thread Kubilay Kocak
Kubilay Kocak added the comment: Downstream issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232792 -- nosy: +koobs versions: +Python 2.7, Python 3.8 ___ Python tracker __

[issue36118] Cannot correctly concatenate nested list that contains more than ~45 entries with other nested lists.

2019-02-26 Thread Domenico Barbieri
New submission from Domenico Barbieri : Here is an example of what happens: >>> x = [["a", "b", ... , "BZ"]] >>> y = [[], [1,2,3,4,5, ... , 99]] >>> y[0] = x[0] >>> print(y[0]) >>> ["a", "b", "c", ... , "BZ", [1,2,3,4,5, ... , 99]] -- messages: 336634 nosy: Domenico Barbieri priority:

[issue36118] Cannot correctly concatenate nested list that contains more than ~45 entries with other nested lists.

2019-02-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: I cannot reproduce the behaviour you show. First problem: ``...`` is a legal Python object, Ellipsis, so your example code literally means: # x = [["a", "b", ... , "BZ"]] x is a list containing one sublist, which contains exactly four objects. So when I r

[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x

2019-02-26 Thread Geoff Shannon
Change by Geoff Shannon : -- pull_requests: +12074 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x

2019-02-26 Thread Geoff Shannon
Geoff Shannon added the comment: I took a shot at fixing this in a smaller more targeted patch. I think this should still solve the major issue of pty.spawn hanging on platforms that don't raise an error. In addition, pty.spawn should now _ALWAYS_ return the terminal to the previous settin

[issue36106] resolve sinpi() name clash with libm

2019-02-26 Thread Dmitrii Pasechnik
Change by Dmitrii Pasechnik : -- pull_requests: +12076 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue31904] Python should support VxWorks RTOS

2019-02-26 Thread Peixing Xin
Change by Peixing Xin : -- pull_requests: +12077 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue36030] add internal API function to create tuple without items array initialization

2019-02-26 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- pull_requests: +12078 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue36030] add internal API function to create tuple without items array initialization

2019-02-26 Thread Sergey Fedoseev
Sergey Fedoseev added the comment: I added WIP PR with discussed micro-optimization, here are benchmark results: $ python -m perf compare_to --min-speed 1 -G master.json tuple-untracked.json Slower (1): - sqlite_synth: 5.16 us +- 0.10 us -> 5.22 us +- 0.08 us: 1.01x slower (+1%) Faster (19):

[issue36117] Allow rich comparisons for real-valued complex objects.

2019-02-26 Thread Eric V. Smith
Eric V. Smith added the comment: -1. We don't want to have objects that are orderable depending on their values. I can't think of anywhere else we do this. It would be very easy to have a complex == 42+0.001j, after some calculation. This near-zero imaginary part would prevent it from be

[issue36030] add internal API function to create tuple without items array initialization

2019-02-26 Thread Sergey Fedoseev
Sergey Fedoseev added the comment: This optimization also can be used for BUILD_TUPLE opcode and in pickle module, if it's OK to add _PyTuple_StealFromArray() function :-) -- ___ Python tracker

[issue36106] resolve sinpi() name clash with libm

2019-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b545ba0a508a5980ab147ed2641a42be3b31a2db by Serhiy Storchaka (Dima Pasechnik) in branch '2.7': [2.7] bpo-36106: resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027) (GH-12050) https://github.com/python/cpython/commit/b545ba0a50

[issue36106] resolve sinpi() name clash with libm

2019-02-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36119] Can't add/append in set/list inside shared dict

2019-02-26 Thread Andrei Stefan
New submission from Andrei Stefan : I'm creating a shared dict for multiprocessing purposes: from multiprocessing import Manager manager = Manager() shared_dict = manager.dict() If I add a set or a list as a value in the dict: shared_dict['test'] = set() or shared_dict['test'] = list() I can

[issue36109] test_descr: test_vicious_descriptor_nonsense() fails randomly

2019-02-26 Thread STINNER Victor
Change by STINNER Victor : -- title: test_descr fails on AMD64 Windows8 3.x buildbots -> test_descr: test_vicious_descriptor_nonsense() fails randomly ___ Python tracker ___ _

[issue36103] Increase shutil.COPY_BUFSIZE

2019-02-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: @Inada: having played with this in the past I seem to remember that on Linux the bigger bufsize doesn't make a reasonable difference (but I may be wrong), that's why I suggest to try some benchmarks. In issue33671 I pasted some one-liners you can use (and

[issue36119] Can't add/append in set/list inside shared dict

2019-02-26 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: https://docs.python.org/3/library/multiprocessing.html#proxy-objects > If standard (non-proxy) list or dict objects are contained in a referent, > modifications to those mutable values will not be propagated through the > manager because the proxy

[issue35652] Add use_srcentry parameter to shutil.copytree() II

2019-02-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset c606a9cbd48f69d3f4a09204c781dda9864218b7 by Giampaolo Rodola in branch 'master': bpo-35652: shutil.copytree(copy_function=...) erroneously pass DirEntry instead of path str (GH-11997) https://github.com/python/cpython/commit/c606a9cbd48f69d3

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2019-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: I think the only reason I didn't mention this discrepancy in my doc updates is because I wasn't aware there *was* a discrepancy. The weird syntax was then just an incorrect amalgamation of "optional argument" notation with an improperly escaped regex suffix.

[issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem()

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: > It seems like the change introduced a regression: bpo-36110. While the test has been fixed, IMHO we need to better document this subtle behavior change since it can be surprising. The test failed because PyObject_GetAttr() no longer ignores exceptions when

[issue36103] Increase shutil.COPY_BUFSIZE

2019-02-26 Thread Inada Naoki
Inada Naoki added the comment: > Also on Linux "echo 3 | sudo tee /proc/sys/vm/drop_caches" is supposed to > disable the cache. As I said already, shutil is not used only with cold cache. If cache is cold, disk speed will be upper bound in most cases. But when cache is hot, or using very fa

[issue36120] Regression - Concurrent Futures

2019-02-26 Thread Jonathan
New submission from Jonathan : I'm using Concurrent Futures to run some work in parallel (futures.ProcessPoolExecutor) on windows 7 x64. The code works fine in 3.6.3, and 3.5.x before that. I've just upgraded to 3.7.2 and it's giving me these errors: Process SpawnProcess-6: Traceback (most re

[issue36120] Regression - Concurrent Futures

2019-02-26 Thread Jonathan
Jonathan added the comment: There's also this error too: Traceback (most recent call last): File "c:\_libs\Python37\lib\multiprocessing\process.py", line 297, in _bootstrap self.run() File "c:\_libs\Python37\lib\multiprocessing\process.py", line 99, in run self._target(*self._args

[issue36121] csv: Non global alternative to csv.field_size_limit

2019-02-26 Thread Carlos Ramos
New submission from Carlos Ramos : The function csv.field_size_limit gets and sets a global variable. It would be useful to change this limit in a per-reader or per-thread basis, so that a library can change it without affecting global state. -- components: Extension Modules messages:

[issue36120] Regression - Concurrent Futures

2019-02-26 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thank you for the report. Please add a script that contains the least amount of code that would replicate the error. Thanks! >From the devguide: > last but not least, you have to describe the problem in detail, including > what you expected to happen, what

[issue36122] Second run of 2to3 continues to modify output

2019-02-26 Thread bers
New submission from bers : I did this on Windows 10: P:\>python --version Python 3.7.2 P:\>echo print 1, 2 > Test.py P:\>python Test.py File "Test.py", line 1 print 1, 2 ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(1, 2)? P:\>2to3 -w Test.py Refac

[issue36120] Regression - Concurrent Futures

2019-02-26 Thread Jonathan
Jonathan added the comment: The "ProcessPoolExecutor Example" on this page breaks for me: https://docs.python.org/3/library/concurrent.futures.html -- ___ Python tracker ___

[issue36122] Second run of 2to3 continues to modify output

2019-02-26 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This seems to be same as issue35417 and some resolution on detecting these type of cases at issue10375. -- nosy: +benjamin.peterson, xtreak ___ Python tracker ___

[issue36098] asyncio: ssl client-server with "slow" read

2019-02-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for the report. We definitely have to fix `AttributeError`. Unfortunately, SSL implementation in asyncio is very tricky. Yuri has an experimental asyncio ssl replacement in his uvloop project rewritten from scratch. There is a plan to port it into asy

[issue36116] test_multiprocessing_spawn fails on AMD64 Windows8 3.x

2019-02-26 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue36121] csv: Non global alternative to csv.field_size_limit

2019-02-26 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Carlos, I think this can be added as a new `field_size_limit` keyword argument to csv.reader(). I will work on it. -- nosy: +remi.lapeyre ___ Python tracker __

[issue36123] Race condition in test_socket

2019-02-26 Thread Joannah Nanjekye
New submission from Joannah Nanjekye : Looking at the buildbot failures, there is a race condition in a test_socket test: def _testWithTimeoutTriggeredSend(self): address = self.serv.getsockname() with open(support.TESTFN, 'rb') as file: with socket.create_conne

[issue36123] Race condition in test_socket

2019-02-26 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- keywords: +patch pull_requests: +12079 stage: -> patch review ___ Python tracker ___ ___ Python-bug

[issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h

2019-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: Next incompatibility: https://github.com/python-hyper/brotlipy/issues/147 (which indirectly broke httpbin) -- ___ Python tracker ___ _

[issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h

2019-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: (On closer inspection, that's actually be the same breakage as already mentioned above) However, what I'm not clear on is how this would affect projects that had *already* generated their cffi code, and include that in their sdist. Are all those sdists going

[issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h

2019-02-26 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @nick which indirectly broke httpbin and this one is used by python-requests and we can't execute the tests of requests. -- nosy: +matrixise ___ Python tracker

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: Yep, I completely understand (and agree with) the desire to eliminate the code injection exploit that was introduced decades ago by using exec() to run lines starting with "import " (i.e. "import sys; "). I just don't want to lose the "add this location to sys

[issue31916] ensurepip not honoring value of $(DESTDIR) - pip not installed

2019-02-26 Thread Cheryl Sabella
Cheryl Sabella added the comment: Closing as third-party as @yan12125's report pinpoints the cause of the issue as part of pip. -- nosy: +cheryl.sabella resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker

[issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h

2019-02-26 Thread Armin Rigo
Armin Rigo added the comment: @nick the C sources produced by cffi don't change. When they are compiled, they use Py_LIMITED_API so you can continue using a single compiled module version for any recent-enough Python 3.x. The required fix is only inside the cffi module itself. --

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-26 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +12080 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue36120] Regression - Concurrent Futures

2019-02-26 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thank you. I just tried running the example and it worked OK for me in the 3.8 master build. I believe your report is a duplicate of issue 35797. -- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> conc

[issue36085] Enable better DLL resolution

2019-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: As a note in favour of the "Allow package nesting to be encoded in names, not just directories" approach, we actually have a similar problem affecting builtin modules: they're currently limited to top-level modules, with no way for the module to indicate that

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-26 Thread Aaryn Tonita
Aaryn Tonita added the comment: Sorry about the delay. I opened pull request https://github.com/python/cpython/pull/12054 for this. Let me know if you need anything else. -- ___ Python tracker

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-26 Thread Aaryn Tonita
Aaryn Tonita added the comment: Although I am not personally interested in backporting a fix for this issue, anyone that experiences this issue in python 3.5 can execute the following monkey patch to solve the issue: def _fix_issue_36041_3_5(): from email._header_value_parser import Quot

[issue21879] str.format() gives poor diagnostic on placeholder mismatch

2019-02-26 Thread Carlos Damázio
Carlos Damázio added the comment: I've noticed this issue is quite not active, but I'm up on participating in it if anyone is doing it already. Since then, this issue still persists: >>> '{1}'.format() Traceback (most recent call last): File "", line 1, in IndexError: tuple index out of ran

[issue36124] Provide convenient C API for storing per-interpreter state

2019-02-26 Thread Nick Coghlan
New submission from Nick Coghlan : (New issue derived from https://bugs.python.org/issue35886#msg336501 ) cffi needs a generally available way to get access to a caching dict for the currently active subinterpreter. Currently, they do that by storing it as an attribute in the builtins namespa

[issue36124] Provide convenient C API for storing per-interpreter state

2019-02-26 Thread Nick Coghlan
Change by Nick Coghlan : -- stage: -> needs patch type: -> enhancement versions: +Python 3.8 ___ Python tracker ___ ___ Python-bug

[issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h

2019-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: Oh, cool (both the fact the issue here is only with building cffi itself, and that cffi creates extension modules that build with PY_LIMITED_API). I've filed https://bugs.python.org/issue36124 to follow up on the PyInterpreter_GetDict API idea. -- __

[issue21879] str.format() gives poor diagnostic on placeholder mismatch

2019-02-26 Thread Carlos Damázio
Carlos Damázio added the comment: Ops, someone already patched it! Sorry guys. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue36122] Second run of 2to3 continues to modify output

2019-02-26 Thread Paul Ganssle
Paul Ganssle added the comment: Because what's being printed is a tuple, I think it's not exactly the same as issue35417, because in fact this is the correct behavior for 2to3, note that in Python 2: Python 2.7.15 (default, Jul 21 2018, 11:13:03) >>> print 1, 2 1 2 >>> print(1, 2) (1, 2)

[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets

2019-02-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Proposed spec: > ''' > Modify the API statistics.mode to handle multimodal cases so that the > first mode encountered is the one returned. If the input is empty, > raise a StatisticsError. Are you happy guaranteeing that it will always be the first mode

[issue36122] Second run of 2to3 continues to modify output

2019-02-26 Thread bers
bers added the comment: Yes, understood! Thanks for the explanation. -- stage: -> resolved status: open -> closed ___ Python tracker ___ _

[issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h

2019-02-26 Thread Armin Rigo
Armin Rigo added the comment: Cool. Also, no bugfix release of cffi was planned, but I can make one if you think it might help for testing the current pre-release of CPython 3.8. -- ___ Python tracker

[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: > ...so it doesn't appear that my PR introduces a performance regression. IMHO there is no performance regression at all. Just noice in the result which doesn't come with std dev. -- ___ Python tracker

[issue36117] Allow rich comparisons for real-valued complex objects.

2019-02-26 Thread Brandt Bucher
Brandt Bucher added the comment: > The rules for when things are comparable or not should be kept simple. I think that the sort of user who uses complex numbers for their numerical calculations would still find this behavior "simple", but that may just be me. > We don't want to have objects

[issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h

2019-02-26 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @arigo Yep, I am interested because I would like to execute the tests of the major projects/libraries (django, flasks, pandas, requests, ...) and create issues for the maintainer. the sooner we get feedback, the sooner we can fix the bugs. -- ___

[issue31904] Python should support VxWorks RTOS

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: Kuhl, Brian started a new discussion: [Python-Dev] VxWorks and cpython? https://mail.python.org/pipermail/python-dev/2019-January/156024.html PR 11968 and PR 12051 are small and reasonable. IMHO we can take decisions on a case by case basic. But WindRiver pla

[issue36117] Allow rich comparisons for real-valued complex objects.

2019-02-26 Thread Brandt Bucher
Change by Brandt Bucher : -- type: enhancement -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue36117] Allow rich comparisons for real-valued complex objects.

2019-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: NaN and complex numbers are not orderable by definition. This is a feature, not a bug. -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h

2019-02-26 Thread Armin Rigo
Armin Rigo added the comment: Done. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue36030] add internal API function to create tuple without items array initialization

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: > This optimization also can be used for BUILD_TUPLE opcode and in pickle > module, if it's OK to add _PyTuple_StealFromArray() function :-) I would like to see a micro-benchmark showing that it's faster. -- ___ P

[issue36030] add internal API function to create tuple without items array initialization

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: Can you please convert msg336142 into a perf script? See the doc: https://perf.readthedocs.io/en/latest/developer_guide.html And then run again these benchmarks on PR 12052. If you have a script, you can do: ./python-ref script.py -o ref.json ./python-untrac

[issue36103] Increase shutil.COPY_BUFSIZE

2019-02-26 Thread Inada Naoki
Inada Naoki added the comment: Read this file too. http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/ioblksize.h coreutils choose 128KiB for *minimal* buffer size to reduce syscall overhead. In case of shutil, we have Python interpreter overhead adding to syscall overhead. Who has deepe

[issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem()

2019-02-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: #36110 was closed as a duplicate; the superseder is #36109 (which has been fixed). The change should still be documented, just in case anyone gets bitten by it. -- nosy: +josh.r ___ Python tracker

[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-02-26 Thread Eric Snow
Eric Snow added the comment: FYI, I have a couple of small follow-up changes to land before I close this issue. -- ___ Python tracker ___

[issue36125] Cannot cross-compile to more featureful but same tune

2019-02-26 Thread Ross Burton
New submission from Ross Burton : My build machine is a Haswell Intel x86-64. I'm cross-compiling to x86-64, with -mtune=Skylake -avx2. During make install PYTHON_FOR_BUILD loads modules from the *build* Lib/ which contain instructions my Haswell can't execute: | _PYTHON_PROJECT_BASE=/data/

[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: Please have a look at this pty.spawn() documentation change: https://github.com/python/cpython/pull/11980 -- ___ Python tracker ___ _

[issue36123] Race condition in test_socket

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: New changeset 53b9e1a1c1d86187ad6fbee492b697ef8be74205 by Victor Stinner (Joannah Nanjekye) in branch 'master': bpo-36123: Fix test_socket.testWithTimeoutTriggeredSend() race condition (GH-12053) https://github.com/python/cpython/commit/53b9e1a1c1d86187ad6fb

[issue36123] Race condition in test_socket

2019-02-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +12081 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35417] Double parenthesis in print function running 2to3 in already correct call

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: I suggest to close this issue as WONTFIX. 2to3 is designed as a tool to convert a Python 2 code base to Python 3 at once. I understand that once the code base is converted, you may want to revert some unwanted "useless" changes. Python 2 and Python 3 langua

[issue36106] resolve sinpi() name clash with libm

2019-02-26 Thread Mark Dickinson
Mark Dickinson added the comment: This one was my fault. Thanks for the fix! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36030] add internal API function to create tuple without items array initialization

2019-02-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: Victor/vstinner: Isn't PR 12032 reintroducing the issue fixed in #29234? _PyStack_AsTuple was explicitly marked as _Py_NO_INLINE because inlining was creating excessive stack consumption in the callers (which were the bytecode interpreter loop), but the new

[issue36123] Race condition in test_socket

2019-02-26 Thread miss-islington
miss-islington added the comment: New changeset 2632474957fa9c6311af21be6906d1234853f288 by Miss Islington (bot) in branch '3.7': bpo-36123: Fix test_socket.testWithTimeoutTriggeredSend() race condition (GH-12053) https://github.com/python/cpython/commit/2632474957fa9c6311af21be6906d1234853f

[issue36124] Provide convenient C API for storing per-interpreter state

2019-02-26 Thread Eric Snow
Eric Snow added the comment: +1 from me @Armin, thanks to Nick I understand your request better now. I'll put up a PR by the end of the week if no one beats me to it. -- nosy: +arigo, eric.snow ___ Python tracker

[issue24643] VS 2015 pyconfig.h #define timezone _timezone conflicts with timeb.h

2019-02-26 Thread Steve Dower
Steve Dower added the comment: Thanks, Zackery! -- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2019-02-26 Thread Enji Cooper
Change by Enji Cooper : -- versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-b

[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2019-02-26 Thread Enji Cooper
Enji Cooper added the comment: I'll try to rebase Martin's changes, as they don't apply to the master branch on GitHub today. -- ___ Python tracker ___ __

[issue36125] Cannot cross-compile to more featureful but same tune

2019-02-26 Thread Ross Burton
Ross Burton added the comment: >From what I can tell: configure.ac sets PYTHON_FOR_BUILD like this if cross-compiling: PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat

[issue36126] Reference count leakage in structseq_repr

2019-02-26 Thread zasdfgbnm
New submission from zasdfgbnm : In Python 2.7 structseq is not a tuple, and in `structseq_repr` a tuple is created to help extracting items. However when the check at https://github.com/python/cpython/blob/2.7/Objects/structseq.c#L268 fails, the reference count of this tuple is not decreased,

[issue36127] Argument Clinic: inline parsing code for functions with keyword parameters

2019-02-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : This is a follow up of issue23867 and issue35582. The proposed PR makes Argument Clinic inlining parsing code for functions with keyword parameters, i.e. functions that use _PyArg_ParseTupleAndKeywordsFast() and _PyArg_ParseStackAndKeywords() now. This s

[issue36127] Argument Clinic: inline parsing code for functions with keyword parameters

2019-02-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +12083 stage: -> patch review ___ Python tracker ___ ___ Python-bug

[issue36127] Argument Clinic: inline parsing code for functions with keyword parameters

2019-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Some examples: $ ./python -m perf timeit --compare-to=../cpython-release-baseline/python --duplicate=1000 -s "round_ = round" "round_(4.2)" Mean +- std dev: [...] 110 ns +- 3 ns -> [...] 81.4 ns +- 2.2 ns: 1.35x faster (-26%) $ ./python -m perf timeit --c

[issue36119] Can't add/append in set/list inside shared dict

2019-02-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: As Karthikeyan, this is an inevitable, and documented, consequence of the proxies not being aware of in-place modification of their contents. As your own example demonstrates, any approach that provides that information to the shared dict proxy will work; |=

[issue36127] Argument Clinic: inline parsing code for functions with keyword parameters

2019-02-26 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: That's a lot faster and will be great if they make it to next alpha :) Adding Ammar Askar since they did review for positional arguments. -- nosy: +ammar2, xtreak ___ Python tracker

[issue36123] Race condition in test_socket

2019-02-26 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: I am closing this as it has been fixed by this PR -- stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Feb 26, 2019, at 05:19, Nick Coghlan wrote: > > I just don't want to lose the "add this location to sys.path" behaviour that > exists for lines in pth files that *don't* start with "import ", since that > has plenty of legitimate use cases, and the only

[issue36127] Argument Clinic: inline parsing code for functions with keyword parameters

2019-02-26 Thread Josh Rosenberg
Change by Josh Rosenberg : -- nosy: +josh.r ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue36071] Add support for Windows ARM32 in ctypes/libffi

2019-02-26 Thread Paul Monson
Change by Paul Monson : -- keywords: +patch pull_requests: +12084 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-lis

[issue36127] Argument Clinic: inline parsing code for functions with keyword parameters

2019-02-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: How much bigger does the core interpreter + built-in extension modules get when you make this change? How much more memory is used by real world programs? I'm a little concerned when I see individual functions growing by 140 lines in the first file of the di

[issue36118] Cannot correctly concatenate nested list that contains more than ~45 entries with other nested lists.

2019-02-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: Agreed, I cannot reproduce this (online link showing behavior): https://tio.run/##K6gsycjPM/7/v0LBViE6WilRSUdBKQlI6OnpKQCZTlFKsbFclWDJWB2FaEMdIx1jHRMdU5gKS0uQfLRBLFBJBZDiKijKzCvRAIlocv3/DwA My guess is the code is subtly different, e.g. replacing: >>> y[0] =

[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x

2019-02-26 Thread Geoff Shannon
Geoff Shannon added the comment: I'm aware of it. I actually wrote that patch as well. :D -- ___ Python tracker ___ ___ Python-bugs

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Steve Dower
Steve Dower added the comment: > Extending sys.path is a useful use case, but doing so in pth files is > problematic. There are 100 other ways to end up in this situation though. Why is *this* one so much worse? Can you offer an issue you hit that was caused by a .pth file that *wasn't* de

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Feb 26, 2019, at 12:32, Steve Dower wrote: > > There are 100 other ways to end up in this situation though. Why is *this* > one so much worse? Because there’s no good place to stick a pdb/breakpoint to debug such issues other than site.py, and that usua

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: > Because there’s no good place to stick a pdb/breakpoint to debug such issues > other than site.py, and that usually requires sudo. Something bad was installed with sudo but suddenly sudo is not acceptable for debugging? This seems crazy. How exactly

  1   2   >