[issue34881] unnecessary encoded-words usage breaks DKIM signatures

2018-10-03 Thread Bryce Drennan
New submission from Bryce Drennan : Since Python 3.6.4 folding of unstructured headers uses the encoded words syntax even if there are no special characters. This makes DKIM-Signature headers that are unreadable to google's gmail servers. It may be that encoded-words are not valid in this h

[issue34880] About the "assert" bytecode

2018-10-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: If I have understood you correctly, you are asking whether it is expected behaviour for assert to use the global AssertionError instead of the built-in AssertionError. I don't see why it shouldn't. In any case, that behaviour goes back to Python 1.5 and pe

[issue34882] f(a=1, *args) should be a SyntaxError

2018-10-03 Thread metaxm
New submission from metaxm : >>> def f(a, b, c): ... pass >>> f(a=1, 2, 3) SyntaxError: positional argument follows keyword argument >>> f(a=1, *(2, 3)) TypeError: f() got multiple values for argument 'a' f(a=1, 2, 3) will cause a SyntaxError, but f(a=1, *(2, 3)) will cause a TypeError. T

[issue34784] Heap-allocated StructSequences

2018-10-03 Thread Josh Rosenberg
Josh Rosenberg added the comment: This looks like a duplicate of #28709, though admittedly, that bug hasn't seen any PRs. -- nosy: +josh.r ___ Python tracker ___

[issue34751] Hash collisions for tuples

2018-10-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > I know of no such hash functions short of crypto-strength ones. Being crypto-strength and having few collisions statistically are different properties. For non-crypto hash functions it's typically very easy to generate collisions once you know the paramet

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-03 Thread tzickel
Change by tzickel : -- pull_requests: +9072 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-03 Thread tzickel
tzickel added the comment: Its ok, you only did it twice :) I've submitted a manual 2.7 fix on GH. -- ___ Python tracker ___ ___ Py

[issue34751] Hash collisions for tuples

2018-10-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I'm having a look at xxHash, the second-fastest hash mentioned on https://docs.rs/seahash/3.0.5/seahash/ -- ___ Python tracker ___ _

[issue34014] loop.run_in_executor should propagate current contextvars

2018-10-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: I vote on not changing `run_in_executor` behavior if we cannot make it work with `ProcessPoolExecutor`. If a new API will solve the problem -- that's fine. Until it landed the explicit context propagation is the satisfactory solution. -- ___

[issue34882] f(a=1, *args) should be a SyntaxError

2018-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See the thread "Order of positional and keyword arguments" on the Python-Dev mailing lists at 2018-04-26: https://mail.python.org/pipermail/python-dev/2018-April/153157.html -- nosy: +gvanrossum, serhiy.storchaka __

[issue34876] Python3.8 changes how decorators are traced

2018-10-03 Thread Ned Batchelder
Ned Batchelder added the comment: Are we sure this is the behavior we want? Now when I step through your code in the debugger, it will show me line 2, then 3, then 4, then 2 again. I can see the appeal for a multiline assignment statement, but for stacked decorators it just seems wrong. ---

[issue34711] Lib/http/server.py: Return HTTPStatus.NOT_FOUND if path.endswith(/) and not a directory

2018-10-03 Thread Michael Felt
Michael Felt added the comment: Closed "test" version. made new PR that makes server.py conform to Issue17234 demands -- components: +Library (Lib) -Tests title: Fix test_httpservers on AIX (trailingSlashOK) -> Lib/http/server.py: Return HTTPStatus.NOT_FOUND if path.endswith(/) and n

[issue34711] Lib/http/server.py: Return HTTPStatus.NOT_FOUND if path.endswith(/) and not a directory

2018-10-03 Thread Michael Felt
Change by Michael Felt : -- pull_requests: +9073 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue34880] About the "assert" bytecode

2018-10-03 Thread thautwarm
thautwarm added the comment: Steven, this problem is quite interesting because it just allows users to cause fatal errors without any invalid operations. ``` AssertionError = 1 assert 1 == 2, 2 --- TypeError: 'int' object

[issue34876] Python3.8 changes how decorators are traced

2018-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think this is a correct behavior. $ cat -n multiline_assignment.py 1 x = 1 2 y = 2 3 z = [ 4 x, 5 y, 6 ] $ ./python -m trace --trace multiline_assignment.py In 3.7 the line with the assignment is missed: ---

[issue34880] About the "assert" bytecode

2018-10-03 Thread thautwarm
thautwarm added the comment: If we could generate `LOAD_CONST` instructions for `assert` statements, any prospective dangers could be avoided. ``` from dis import dis @dis def f(): assert x 3 0 LOAD_GLOBAL 0 (x) 2 POP_JUMP_IF_TRUE 8

[issue34880] About the "assert" bytecode

2018-10-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Wed, Oct 03, 2018 at 09:49:06AM +, thautwarm wrote: > Steven, this problem is quite interesting because it just allows users > to cause fatal errors without any invalid operations. How is that different from every other case of shadowing a builtin? l

[issue34876] Python3.8 changes how decorators are traced

2018-10-03 Thread Ned Batchelder
Ned Batchelder added the comment: Yes, I agree that the assignment statement behavior is fine. The stacked decorator behavior is not. I understand that under the hood the two cases are very similar, but the syntax is different. Jumping back to the first decorator makes it look like the de

[issue34880] About the "assert" bytecode

2018-10-03 Thread thautwarm
thautwarm added the comment: Reply to this: > How is that different from every other case of shadowing a builtin? > > len = 45 > print(len("hello world")) ``` AssertionError = 42 assert 1 != 2 ``` `assert` implicitly invokes `AssertionError`, while `len` does that explicitly. That is to sa

[issue34883] test_lzma: Multiple test failures when liblzma is built without complete codec set

2018-10-03 Thread Michał Górny
New submission from Michał Górny : xz-utils has four options to configure codecs supported by liblzma: --enable-encoders --enable-decoders --enable-match-finders --enable-checks In Gentoo, we're using those options to optionally provide smaller footprint liblzma builds that include onl

[issue34751] Hash collisions for tuples

2018-10-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: A (simplified and slightly modified version of) xxHash seems to work very well, much better than SeaHash. Just like SeaHash, xxHash also works in parallel. But I'm not doing that and just using this for the loop: for y in t: y ^= y * (PRIME32_2 -

[issue34884] Python loads incorrect libraries

2018-10-03 Thread Tim Hutt
New submission from Tim Hutt : See this issue: https://bugs.llvm.org/show_bug.cgi?id=38974 Basically if you have a copy of Python 2 installed on OSX from brew (as well as the system Python 2), then when you run lldb (which links to the system Python 2), at some point Python gets confused and

[issue34876] Python3.8 changes how decorators are traced

2018-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: First the decorator itself is loaded. Then the function is created, decorators are called and the result is bound to the name. There is similar situation in the case of multiline call. $ cat -n multiline_call.py 1 def f(a, b): 2 return [

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 4a7dd30f5810e8861a3834159a222ab32d5c97d0 by Antoine Pitrou (tzickel) in branch '2.7': [2.7] bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-9686) https://github.com/python/cpython/commit/4a7dd30f5810e8861a3834159a222ab32

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-10-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue34498] Python 3.7 breaks on singledispatch_function.register(pseudo_type), which Python 3.6 accepted

2018-10-03 Thread Sam Bishop
Sam Bishop added the comment: Would the enhancements to resolve this, by making singledispatch accept more things, also resolve the AssertionError from functools.singledispatch when passing it custom types, or should I raise this as a separate issue?

[issue34885] asycnio documention has lost its paragraph about cancellation

2018-10-03 Thread Amirouche Boubekki
New submission from Amirouche Boubekki : The paragraph was still there in 3.6 https://docs.python.org/3.6/library/asyncio-dev.html#cancellation -- assignee: docs@python components: Documentation, asyncio messages: 326966 nosy: abki, asvetlov, docs@python, yselivanov priority: normal se

[issue34885] asyncio documention has lost its paragraph about cancellation

2018-10-03 Thread Amirouche Boubekki
Change by Amirouche Boubekki : -- title: asycnio documention has lost its paragraph about cancellation -> asyncio documention has lost its paragraph about cancellation ___ Python tracker

[issue34885] asyncio documention has lost its paragraph about cancellation

2018-10-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: Yuri, can you take a look? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2018-10-03 Thread Matthias Urlichs
Matthias Urlichs added the comment: Owch, yeah, this fell off the radar. Anyway, I've signed the CLA, so if somebody could finish and apply this I'd be grateful. Myself, I unfortunately don't have the time. -- ___ Python tracker

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2018-10-03 Thread Matthias Urlichs
Change by Matthias Urlichs : -- versions: +Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue34880] About the "assert" bytecode

2018-10-03 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is a bug that should be fixed. This is similar to how f-strings used to work: the generated byte code would call format(something-or-other), and if you'd defined a name "format" in your code it would fail. Now admittedly "format" is more common t

[issue34725] Py_GetProgramFullPath() odd behaviour in Windows

2018-10-03 Thread Mario
Mario added the comment: Is there any agreement on what is wrong with the current code. The key in my opinion is the double purpose of sys.executable and that in Linux and Windows people have taken the two different points of view, so they are both right and wrong at the same time.

[issue34014] loop.run_in_executor should propagate current contextvars

2018-10-03 Thread Viktor Kovtun
Change by Viktor Kovtun : -- pull_requests: +9074 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue34014] loop.run_in_executor should propagate current contextvars

2018-10-03 Thread Viktor Kovtun
Viktor Kovtun added the comment: I've created new pull request https://github.com/python/cpython/pull/9688 with the implementation of proposed changes -- ___ Python tracker _

[issue34885] asyncio documention has lost its paragraph about cancellation

2018-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: The cancellation is now discussed in this section:https://docs.python.org/3/library/asyncio-task.html (search for "cancel") and in particular in the Task subsection. Is there any important detail that was covered in the old documentation and is missing in t

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 0c797a6aca1c293e530e18c5e9fa02c670a9a4ed by Yury Selivanov (Elvis Pranskevichus) in branch 'master': bpo-34872: Fix self-cancellation in C implementation of asyncio.Task (GH-9679) https://github.com/python/cpython/commit/0c797a6aca1c293e530e18c5

[issue34014] loop.run_in_executor should propagate current contextvars

2018-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: [Andrew] > I vote on not changing `run_in_executor` behavior if we cannot make it work > with `ProcessPoolExecutor`. > If a new API will solve the problem -- that's fine. Until it landed the explicit context propagation is the satisfactory solution. I'm not

[issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear

2018-10-03 Thread Tal Einat
Tal Einat added the comment: Confirmed on macOS High Sierra 10.13.6, with "Prefer tabs when opening documents" set to "Always". See attached screenshot with the macOS tabs; indeed the bottom bar is missing. -- Added file: https://bugs.python.org/file47846/with tabs.png _

[issue34831] Asyncio Tutorial

2018-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: > I too have bashed my head for many hours over the years trying to get Tkinter > to work on Mac, but a lot of work has gone into this recently and the newer > (release) Python's have bundled Tk 8.6: > https://www.python.org/download/mac/tcltk/ (this is what

[issue23867] Argument Clinic: inline parsing code for 1-argument functions

2018-10-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +9076 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue34014] loop.run_in_executor should propagate current contextvars

2018-10-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: I prefer (4) but can live with (3) It is a new feature for Python 3.8 anyway, no need to rush -- ___ Python tracker ___

[issue34882] f(a=1, *args) should be a SyntaxError

2018-10-03 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue23867] Argument Clinic: inline parsing code for 1-argument functions

2018-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you all for your comments. Addressed all comments, fixed few other bugs, added support for more convertors. I think this patch is completed. This is just a first step. Next steps are adding support of multiple positional-only parameters, optional gro

[issue34838] Improve arg clinic code generation for cases with type checking

2018-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your PR Ammar. But I work on more general changes. The first step is issue23867. With implementing the second step this issue can be closed. -- ___ Python tracker

[issue34014] loop.run_in_executor should propagate current contextvars

2018-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: > It is a new feature for Python 3.8 anyway, no need to rush Yep, I agree. Let's see if we end up having a new nice high-level API in 3.8; if not we go for (3). -- resolution: -> postponed status: open -> pending type: -> enhancement _

[issue34014] loop.run_in_executor should propagate current contextvars

2018-10-03 Thread Yury Selivanov
Change by Yury Selivanov : -- status: pending -> open versions: -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-03 Thread Elvis Pranskevichus
Change by Elvis Pranskevichus : -- pull_requests: +9077 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-03 Thread Elvis Pranskevichus
Change by Elvis Pranskevichus : -- pull_requests: +9078 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue34498] Python 3.7 breaks on singledispatch_function.register(pseudo_type), which Python 3.6 accepted

2018-10-03 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-03 Thread miss-islington
miss-islington added the comment: New changeset 166773df0ce6c852130f524029fa2e62b37b89cb by Miss Islington (bot) (Elvis Pranskevichus) in branch '3.6': [3.6] bpo-34872: Fix self-cancellation in C implementation of asyncio.Task (GH-9679) (GH-9690) https://github.com/python/cpython/commit/1667

[issue34880] About the "assert" bytecode

2018-10-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Wed, Oct 03, 2018 at 01:56:00PM +, Eric V. Smith wrote: > I think this is a bug that should be fixed. Supporting this position, shadowing other exceptions doesn't change the exception generated by the interpreter: py> TypeError = None py> 1 + "a" Tra

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-03 Thread miss-islington
miss-islington added the comment: New changeset a67bd53d3f80ac9c518b5426aa35459bd373b2b3 by Miss Islington (bot) (Elvis Pranskevichus) in branch '3.7': [3.7] bpo-34872: Fix self-cancellation in C implementation of asyncio.Task (GH-9679) (GH-9691) https://github.com/python/cpython/commit/a67b

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: Ned, elevating this to "release blocker", see https://bugs.python.org/msg326928 Feel free to close this issue. -- priority: normal -> release blocker ___ Python tracker ___

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-03 Thread Ned Deily
Ned Deily added the comment: Prior to this, there were no plans to have a 3.7.1rc2. We have three options: 1. do a 3.7.1rc2 with this and possibly a few other cherry-picked changes 2. just cherry-pick this fix into 3.7.1 final 3. wait for 3.7.2 (in one to three months) What's your assessment

[issue34880] About the "assert" bytecode

2018-10-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: > And, I think a broader discussion on python-dev might be useful, too, in > order to get more opinions. Done: https://mail.python.org/pipermail/python-dev/2018-October/155410.html Changing the status to Pending until we have more clarity on whether this i

[issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6

2018-10-03 Thread Ned Deily
Ned Deily added the comment: If I understand correctly, this is not a release blocker issue. The most up-to-date documentation for which Tcl/Tk to use on macOS has been and remains: https://www.python.org/download/mac/tcltk/ The entire https://docs.python.org/3/using/mac.html section remain

[issue34880] About the "assert" bytecode

2018-10-03 Thread Neil Schemenauer
Neil Schemenauer added the comment: Assuming it is not crazy complicated to fix, I would like to to be changed. It should work like the TypeError example. That fact that it has worked the current way since Python 1.5 isn't a strong argument. I think no one should be surprised if it change

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: > What's your assessment of the risk of option 2? Let's not rush it in without testing, for sure. Having 3.7.1rc2 would be great, but really up to you. -- ___ Python tracker _

[issue34822] Simplify AST for slices

2018-10-03 Thread Neil Schemenauer
Neil Schemenauer added the comment: Hello Serhiy, I've not reviewed the patch but I trust that if you say it simplifies things, that's so. Perhaps the important question is if it is okay to change the AST in backwards incompatible ways within 3.x releases. As a library author who could be

[issue34682] Typo reports on docs@

2018-10-03 Thread ZooDSS
ZooDSS added the comment: Found new one. https://docs.python.org/3/reference/lexical_analysis.html#comments "Comments are ignored by the syntax; they are not tokens." - I honestly think, that this is misleading, by the fact that we have next words. https://docs.python.org/3/library/token.htm

[issue34822] Simplify AST for slices

2018-10-03 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: -yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue34822] Simplify AST for slices

2018-10-03 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear

2018-10-03 Thread Ned Deily
Ned Deily added the comment: Interesting! I was not familiar with that system preference nor that it would just (sort of) work in IDLE; I'm presuming that there is nothing in IDLE that knows about this. I'm not sure whether Tk gets that behavior for free (because of the use of an underlyin

[issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear

2018-10-03 Thread Ned Deily
Ned Deily added the comment: "Further, when opening yet edit window" should be "Further, when opening yet edit tab (in the same IDLE window)" -- ___ Python tracker ___ __

[issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear

2018-10-03 Thread Ned Deily
Change by Ned Deily : -- Removed message: https://bugs.python.org/msg326994 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear

2018-10-03 Thread Ned Deily
Ned Deily added the comment: One more time: "Further, when opening yet edit window" should be "Further, when opening yet another edit tab (in the same IDLE window)" -- ___ Python tracker __

[issue34881] unnecessary encoded-words usage breaks DKIM signatures

2018-10-03 Thread R. David Murray
R. David Murray added the comment: See also issue 34277 for a previous discussion. I thought I had included a header-level toggle for encoded words, but that doesn't actually make sense, since by default a header value is treated as unstructured (which means encoded words are allowed). To i

[issue34864] In Idle, Mac tabs make editor status line disappear.

2018-10-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Optionally converting windows to tabs is an over-arching goal for IDLE. To do it with IDLE code, IDLE must create a frame (and keep a reference) but not a toplevel. I presume that the Mac window manager extracts the window title and frame from the window,

[issue34881] unnecessary encoded-words usage breaks DKIM signatures

2018-10-03 Thread R. David Murray
R. David Murray added the comment: You could also play with just making a parser that is a simplified version of get_unstructured, producing amaybe call it ASCIIOnlyUnstructuredTokenList...that would have as_ew_allowed set to False. That might not produce optimal results, but it would b

[issue31310] semaphore tracker isn't protected against crashes

2018-10-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue34872] investigate task/future cancellation in asynciomodule.c

2018-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems this change introduced a compiler warning. /home/serhiy/py/cpython3.7/Modules/_asynciomodule.c: In function ‘task_step_impl’: /home/serhiy/py/cpython3.7/Modules/_asynciomodule.c:2666:44: warning: passing argument 1 of ‘_PyObject_CallMethodId’ from inc

[issue34725] Py_GetProgramFullPath() odd behaviour in Windows

2018-10-03 Thread Steve Dower
Steve Dower added the comment: I don't think anything has been agreed upon. Currently, the launched program name is used for some things other than setting sys.executable, and I believe it should continue to be used for those. But there are also needs for overriding sys.executable to be some

[issue31203] socket.IP_PKTINFO is missing from python

2018-10-03 Thread Michael Felt
Michael Felt added the comment: FYI: define exists on Linux 3.16.0-4-powerpc64 #1 SMP Debian 3.16.7-ckt9-3 (2015-04-23) ppc64 GNU/Linux SunOS 5.11 11.3 Not on AIX -- nosy: +Michael.Felt ___ Python tracker ___

[issue34886] subprocess.run throws exception when input and stdin are passed as kwargs

2018-10-03 Thread Alessandro
New submission from Alessandro : If input and stdin parameters are passed as keyword arguments to subprocess.run, an exception is thrown even if input and stdin are both None. The exception is ValueError: stdin and input arguments may not both be used. I attach a minimal working example of th

[issue34886] subprocess.run throws exception when input and stdin are passed as kwargs

2018-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is wrong with this? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list

[issue34886] subprocess.run throws exception when input and stdin are passed as kwargs

2018-10-03 Thread Alessandro
Alessandro added the comment: subprocess.run('ls', input=b'', stdin=None) # this is ok kwargs = {'input': b'', 'stdin': None} subprocess.run('ls', **kwargs) # this throws exception The two calls should have the same behaviour, but one throws exception and the other doesn't. I think the excep

[issue34875] Change .js mime to "text/javascript"

2018-10-03 Thread Andrew Svetlov
Change by Andrew Svetlov : -- title: Change .js mime to "test/javascript" -> Change .js mime to "text/javascript" ___ Python tracker ___ __

[issue34751] Hash collisions for tuples

2018-10-03 Thread Tim Peters
Tim Peters added the comment: Thanks for looking at xxHash! An advantage is that it already comes in 32- and 64-bit versions. > A (simplified and slightly modified version of) xxHash > seems to work very well, much better than SeaHash. ? I've posted several SeaHash cores that suffer no col

[issue34875] Change .js mime to "text/javascript"

2018-10-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: By RCF 4329 https://tools.ietf.org/html/rfc4329#page-9 text/javascript is obsoleted, application/javascript is a part of the standard. WhatWg is a controversial group. Their specs don't always follow official standards but Python does. Sorry, I should decli

[issue34875] Change .js mime to "text/javascript"

2018-10-03 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34875] Change .js mime to "text/javascript"

2018-10-03 Thread Myles Borins
Myles Borins added the comment: There is a IETF proposal that would make "text/javascript" no longer obsolete. Will revisit at the point this lands https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/ -- ___ Python tracker

[issue34886] subprocess.run throws exception when input and stdin are passed as kwargs

2018-10-03 Thread Josh Rosenberg
Josh Rosenberg added the comment: I just tried: subprocess.run('ls', input=b'', stdin=None) and I got the same ValueError as for passing using kwargs. Where did you get the idea subprocess.run('ls', input=b'', stdin=None) worked? -- nosy: +josh.r ___

[issue34886] subprocess.run throws exception when input and stdin are passed as kwargs

2018-10-03 Thread Josh Rosenberg
Josh Rosenberg added the comment: The actual code receives input by name, but stdin is received in **kwargs. The test is just: if input is not None: if 'stdin' in kwargs: raise ValueError(...) kwargs['stdin'] = PIPE Perhaps just change `if 'stdin' in kwargs:`

[issue34875] Change .js mime to "text/javascript"

2018-10-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: We can return to the question when (and if) the draft will be accepted. -- ___ Python tracker ___ ___

[issue34886] subprocess.run throws exception when input and stdin are passed as kwargs

2018-10-03 Thread Alessandro
Alessandro added the comment: > and I got the same ValueError as for passing using kwargs. Where did you get > the idea subprocess.run('ls', input=b'', stdin=None) worked? Sorry, the example was wrong. Both calls have the same behaviour. > so it obeys the documented API (that says stdin defa

[issue34838] Improve arg clinic code generation for cases with type checking

2018-10-03 Thread Ammar Askar
Ammar Askar added the comment: Aah, I didn't know that ticket existed. Thanks for the link Serhiy, I'll review your PR instead. Leaving it up to Raymond if he wants to close the issue and use the other one to track this. -- ___ Python tracker

[issue34874] Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined

2018-10-03 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: @Tim Is it possible that 'python3' in your command refers to some wrapper which forwards its arguments to real Python in a wrong way? -- nosy: +izbyshev ___ Python tracker ___

[issue34751] Hash collisions for tuples

2018-10-03 Thread Tim Peters
Tim Peters added the comment: Here's a complete xxHash-based implementation via throwing away C++-isms from https://github.com/RedSpah/xxhash_cpp/blob/master/xxhash/xxhash.hpp In the 64-bit build there are no collisions across my tests except for 11 in the new tuple test. The 32-bit build f

[issue34887] bytes subclass __repr__ raise SystemError when set to bytes.decode

2018-10-03 Thread Dan Snider
New submission from Dan Snider : I've tested it on at least one of each minor version since 3.4 but it looks like it may be specific to 3.6.0. The developer's guide isn't clear enough for me to understand what's eligible for bug fixes but since I'm not sure if it actually is 3.6.0 exclusive I

[issue27165] Skip callables when displaying exception fields in cgitb

2018-10-03 Thread Cheryl Sabella
Cheryl Sabella added the comment: Hi Adam, Are you interested in converting your patch to a GitHub pull request? Thanks! -- nosy: +cheryl.sabella versions: +Python 3.8 -Python 3.5, Python 3.6 ___ Python tracker

[issue11233] clarifying Availability: Unix

2018-10-03 Thread Cheryl Sabella
Cheryl Sabella added the comment: Hello, It doesn't appear that this patch was ever merged. If there's still interest, would it be OK for me to convert it to a PR? Thanks! -- nosy: +cheryl.sabella ___ Python tracker

[issue31660] sys.executable different in os.execv'd python3.6 virtualenv session in python2 vs python3

2018-10-03 Thread Cheryl Sabella
Cheryl Sabella added the comment: The original OP said this wasn't an issue with venv, so closing as not a bug. -- nosy: +cheryl.sabella resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue11233] clarifying Availability: Unix

2018-10-03 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: A PR for this would be good, and would certainly accelerate getting this accomplished. Thanks, Cheryl! -- nosy: +fdrake ___ Python tracker

[issue34888] Python3.8 optimizes away a "while" line

2018-10-03 Thread Ned Batchelder
New submission from Ned Batchelder : Looks like the optimizer is getting more aggressive. Line 2 (the constant while) no longer even appears in the bytecode: $ cat -n whiletrue.py 1 a = 1 2 while 1: 3 print(a) 4 b = 4 $ python3.7 -m dis < whiletrue.py 1

[issue34888] Python3.8 optimizes away a "while" line

2018-10-03 Thread Ned Batchelder
Change by Ned Batchelder : -- nosy: +benjamin.peterson, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue2506] Add mechanism to disable optimizations

2018-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: Having properly working coverage tooling is simply invaluable to pretty much every serious Python user. I support Ned's idea of adding an option to disable peephole optimizer (and similar other optimization passes). Why is this even debated? -- no

[issue2506] Add mechanism to disable optimizations

2018-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: > I would suggest -X noopt and use "noopt" in .pyc filenames. That's what I > proposed in my PEP 511. Sounds good to me. -- ___ Python tracker _

  1   2   >