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

2019-02-26 Thread Sergey Fedoseev
Sergey Fedoseev added the comment: > Can you please convert msg336142 into a perf script? > And then run again these benchmarks on PR 12052. ++-+--+ | Benchmark | ref | untracked|

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

2019-02-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Are you happy guaranteeing that it will always be the first > mode encountered? Yes. All of the other implementations I looked at make some guarantee about which mode is returned. Maple, Matlab, and Excel all return the first encountered.¹ That is

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2019-02-26 Thread Safihre
Safihre added the comment: In the CherryPy project it is also observed on Windows with Python 3,7.2. In CherryPy it's triggered by Checker plugin, which connects to the app listening to the socket port in TLS mode via plain HTTP during startup (from the same process). It has been around for

[issue36131] test.test_urllib2net.TimeoutTest ftp related tests fail due to ftp://www.pythontest.net/ being unavailable

2019-02-26 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: These tests were skipped in Travis with issue35411 -- ___ Python tracker ___ ___

[issue36130] Pdb(skip=[...]) + module without __name__ => TypeError

2019-02-26 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +12088 stage: -> patch review ___ Python tracker ___ ___

[issue36131] test.test_urllib2net.TimeoutTest ftp related tests fail due to ftp://www.pythontest.net/ being unavailable

2019-02-26 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: normal -> high versions: +Python 2.7, Python 3.6, Python 3.7 ___ Python tracker ___

[issue36131] test.test_urllib2net.TimeoutTest ftp related tests fail due to ftp://www.pythontest.net/ being unavailable

2019-02-26 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Several buildbots are failing due to this problem. Some examples: https://buildbot.python.org/all/#builders/33/builds/520 https://buildbot.python.org/all/#builders/72/builds/503 https://buildbot.python.org/all/#builders/78/builds/419 --

[issue36131] test.test_urllib2net.TimeoutTest ftp related tests fail due to ftp://www.pythontest.net/ being unavailable

2019-02-26 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : I am seeing this error on Windows and Mac CI builds where FTP related tests in test.test_urllib2net.TimeoutTest are failing. It's reproducible locally too where the tests are skipped on Mac and Ubuntu. Not sure if it's random since several PRs

[issue36130] Pdb(skip=[...]) + module without __name__ => TypeError

2019-02-26 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xdegaye, xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36130] Pdb(skip=[...]) + module without __name__ => TypeError

2019-02-26 Thread Anthony Sottile
New submission from Anthony Sottile : Here's the simplest example I could come up with -- hit this while debugging pytest (which uses attrs which uses similar code to this to make classes) import pdb; pdb.Pdb(skip=['django.*']).set_trace() eval(compile("1", "", "exec"), {}) print('ok!')

[issue28441] Change sys.executable to include executable suffix

2019-02-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +12087 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-02-26 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. Unfortunately, as far as I know, we don't claim anywhere to support cross-compiling in general. As you've probably noticed, the Python Makefile-based build system (for non-Windows platforms) is by no means a conventional GNU autotools

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

2019-02-26 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +12086 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25872] multithreading traceback KeyError when modifying file

2019-02-26 Thread Christopher Unkel
Change by Christopher Unkel : -- keywords: +patch pull_requests: +12085 stage: -> patch review ___ Python tracker ___ ___

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: On Wed, Feb 27, 2019 at 1:41 AM Barry A. Warsaw wrote: > Basically yes, I’ve done this. But think of the poor user who doesn’t have that expertise or ability to hack on an installed Python’s site.py file. When their application breaks because some

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: On Wed, Feb 27, 2019 at 1:31 AM Barry A. Warsaw wrote: > Your sudo may not be my sudo. :) Let’s say I update my Ubuntu desktop and a new version of package with a pth breaks. > Maybe I didn’t even know I was doing that, via automated updates, or

[issue36129] io documentation unclear about flush() and close() semantics for wrapped streams

2019-02-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: The general rule of thumb is to have the API behave as if no wrapping is occurring. The outermost layer should still adhere to the documented API requirements, so both flush and close should cascade (flush says it flushes the "buffers" plural; all user mode

[issue36128] ResourceReader for FileLoader inconsistently handles path separators

2019-02-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Feb 26, 2019, at 13:05, Gregory Szorc wrote: > > I would think the two would agree about whether a path with separators is a > resource or not. The documentation at > https://docs.python.org/3.7/library/importlib.html#importlib.abc.ResourceReader >

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Feb 26, 2019, at 13:23, Ivan Pozdeev wrote: > > Easy. Insert a chunk into site.py that would call pdb.set_trace() if an > envvar (e.g. `PYSITEDEBUG') or a command line switch is set. > > Actually, why can't whoever has this problem add such a chunk

[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:52, Ionel Cristian Mărieș wrote: > > Something bad was installed with sudo but suddenly sudo is not acceptable for > debugging? This seems crazy. Your sudo may not be my sudo. :) Let’s say I update my Ubuntu desktop and a new

[issue36046] support dropping privileges when running subprocesses

2019-02-26 Thread Patrick McLean
Patrick McLean added the comment: > Thanks for your explanation. In case of a privileged process, the behavior of > setreuid/setregid/setgroups does seem well-defined. But setuid/setgid change > all ids (real, effective, saved) too in this case. Do you prefer > setreuid/setregid because

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

2019-02-26 Thread STINNER Victor
STINNER Victor 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? Well, any optimization is a matter of trade-off between memory and CPU. Last years, CPU are not

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

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: > if LTO is enabled, the same stack bloat issues are possible Please test, I'm not interested to spend too much time on that topic. To be clear, _Py_NO_INLINE was a hack and a micro-optimization. It doesn't solve a real bug. Python has very weak promises on

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

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: > Victor/vstinner: Isn't PR 12032 reintroducing the issue fixed in #29234? No according to manual tests: https://github.com/python/cpython/pull/12032#issuecomment-467110233 Usage of the stack memory doesn't change with PR 12032. FYI I also tested manually

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Steve Dower
Steve Dower added the comment: Barry is a steering council member now, so by definition he's 1/5th of the loudest possible minority ;) I am totally okay with adding more diagnostics here. Frankly, if "-v" doesn't currently log info about .pth files (or other things that the site module does

[issue36129] io documentation unclear about flush() and close() semantics for wrapped streams

2019-02-26 Thread Gregory Szorc
New submission from Gregory Szorc : As part of implementing io.RawIOBase/io.BufferedIOBase compatible stream types for python-zstandard, I became confused about the expected behavior of flush() and close() when a stream is wrapping another stream. The documentation doesn't lay out explicitly

[issue36046] support dropping privileges when running subprocesses

2019-02-26 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > 1) This is intentional, this is for dropping privileges before running some > (possibly untrusted) command, we do not want to leave a path for the > subprocess to gain root back. If there is a subprocess that needs root for > some operations, it would

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: On 26.02.2019 23:37, Barry A. Warsaw wrote: > My opposition would lessen if there were clear ways to debug, and preferably > also prevent, pth interpretation. Easy. Insert a chunk into site.py that would call pdb.set_trace() if an envvar (e.g. `PYSITEDEBUG')

[issue36128] ResourceReader for FileLoader inconsistently handles path separators

2019-02-26 Thread Gregory Szorc
New submission from Gregory Szorc : The implementation of the ResourceReader API for the FileLoader class in importlib/_bootstrap_external.py is inconsistent with regards to handling of path separators. Specifically, "is_resource()" returns False if "resource" has a path separator. But

[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-26 Thread Michael Sullivan
Change by Michael Sullivan : -- nosy: +msullivan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[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

[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

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

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

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

[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

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

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

[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

[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

[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

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

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

[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

[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

[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

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

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

[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

[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

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

[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

[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

[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

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

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

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

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

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

[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

[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

[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

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

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

[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

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

[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

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

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

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

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

[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

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

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

[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

[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

[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

[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

[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

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

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

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

[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

[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

[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

[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 Nick Coghlan
Nick Coghlan added the comment: Next incompatibility: https://github.com/python-hyper/brotlipy/issues/147 (which indirectly broke httpbin) -- ___ Python tracker ___

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

[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

[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

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

[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

[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

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

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

  1   2   >