[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-21 Thread Kyle Stanley
Kyle Stanley added the comment: > Is there an "aesthetic code cleanup" patch that's ever turned out well? ;-) >From what I can tell, any remotely extensive aesthetic code patch I've seen >has been highly controversial. I think they can have value in some cases, but >the value relative to the

[issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser

2019-09-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Closing this as the docs are merged with the initial patch to escape header reverted. Thanks all for the reviews. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python

[issue38245] Why am I getting inconsistent results in this simple List assignment?

2019-09-21 Thread Srinivasan Samuel
Srinivasan Samuel added the comment: Thanks Ammar for your time, service and reply. It was really helpful. I learned some thing more.God Bless you.Srinivasan Samuel On Saturday, September 21, 2019, 10:50:32 PM GMT+5:30, Ammar Askar wrote: Ammar Askar added the comment: Check out this

[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2019-09-21 Thread Michael Tippie
Michael Tippie added the comment: I am getting this error now, too. I'm not sure what's causing it - when I use multiprocessing with a Manager.Queue, if I am passing around an object on the queue stack, I get this error. Would really like it to "just work". -- nosy: +Locane __

[issue36876] Global C variables are a problem.

2019-09-21 Thread Vinay Sajip
Change by Vinay Sajip : -- pull_requests: +15904 pull_request: https://github.com/python/cpython/pull/16328 ___ Python tracker ___ _

[issue37857] Setting logger.level directly has no effect due to caching in 3.7+

2019-09-21 Thread Vinay Sajip
Vinay Sajip added the comment: > Obviously the fix could be just to stop doing that in the standard library Well, that's the right fix, and thanks for spotting it. I've applied those changes (42b6c5d and 19c42fb) to the master, 3.8 and 3.7 branches. -- __

[issue38241] Pickle with protocol=0 in python 3 does not produce a 'human-readable' format

2019-09-21 Thread Nicholas Neumann
Nicholas Neumann added the comment: Wow, that's a great catch with bytearray on py2. Protocols 0-2 are all actually supposed to work with python 2, and I was using 0 from Py3 as it's the default for Py2, and what I want to use during a short transition where both Py3 and Py2 are operating on

[issue38246] pathlib.resolve and .absolute leave trailing tilde in home expansion

2019-09-21 Thread Eryk Sun
Eryk Sun added the comment: Only Path.expanduser() special cases tilde as a POSIX shell would. Otherwise "~" is not a reserved filename character in POSIX. Path('~') is a file named "~" that's relative to the current working directory. By coincidence the working directory is the user's home

[issue38247] list(str.split(ch)) Does not print blank elements upon repeating character(ch)

2019-09-21 Thread Ammar Askar
Ammar Askar added the comment: For whitespace, the correct way to achieve this using split() with no argument: >>> print(list("Hello World How Are You?".split())) ['Hello', 'World', 'How', 'Are', 'You?'] >>> print(list("Hello World How Are You?".split())) ['Hello', 'World', 'How', '

[issue38247] list(str.split(ch)) Does not print blank elements upon repeating character(ch)

2019-09-21 Thread Aman Priyanshu
Change by Aman Priyanshu : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue15902] imp.load_module won't accept None for the file argument for a C extension

2019-09-21 Thread Aman Priyanshu
Change by Aman Priyanshu : -- pull_requests: +15903 pull_request: https://github.com/python/cpython/pull/16324 ___ Python tracker ___ __

[issue38247] list(str.split(ch)) Does not print blank elements upon repeating character(ch)

2019-09-21 Thread Aman Priyanshu
New submission from Aman Priyanshu : I have been annoyed by the fact that at multiple where we print list(str.split(ch)) we get empty elements in place of repeated characters (ch). Example: >>> print(list("Hello World How Are You?".split(" "))) ['Hello', 'World', 'How', 'Are', 'You?'] >>

[issue38246] pathlib.resolve and .absolute leave trailing tilde in home expansion

2019-09-21 Thread Infrasonics
New submission from Infrasonics : `Path('~').resolve()` gives `PosixPath('/home/youruser/~')`. Same problem for `.absolute`, yet `.expanduser` works correctly. -- components: Library (Lib) messages: 352954 nosy: Infrasonics priority: normal severity: normal status: open title: pathlib.r

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2019-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > 1. It seems that the 'list' call should be irrelevant. It is relevant. Counter({1: 2}) != Counter(list({1: 2})). -- ___ Python tracker _

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for the explanation Raymond and sorry for the disturb. My mistake, I had not noticed the release manager's assent. -- ___ Python tracker ___

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +15901 pull_request: https://github.com/python/cpython/pull/16323 ___ Python tracker ___ __

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 24231ca75c721c8167a7394deb300727ccdcba51 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-38237: Shorter docstring (GH-16322) (GH-16323) https://github.com/python/cpython/commit/24231ca75c721c8167a7394deb300727ccdcba51 -

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2019-09-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: I like using 'multiset', but I think 'assertMultisetEqual', proposed by Martin Panter in msg266207, is better than assertMultiSetEqual, as it does not imply the existence of a class 'MultiSet'. Raymond's comment "distinct but equal values may appear on both

[issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py

2019-09-21 Thread Ned Deily
Change by Ned Deily : -- keywords: +security_issue priority: normal -> high versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.8, Python 3.9 ___ Python tracker ___ ___

[issue38239] test_gdb fails on AMD64 Fedora Stable LTO 3.8 and AMD64 RHEL8 LTO 3.x: Unexpected gdb output

2019-09-21 Thread Steve Dower
Steve Dower added the comment: Shouldn't this test be suppressed on LTO builds? #0 builtin_id (self=, v=) at Objects/longobject.c:1113 builtid_id isn't in longobject.c, so this is incorrect debug information. The test expects to find it in bltinmodule.c: re.match(r'.*#0\s+builtin_id\s+\(s

[issue38242] Revert the new asyncio Streams API

2019-09-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: Awesome! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue38242] Revert the new asyncio Streams API

2019-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: > Task group is another very required thing. If I choose between groups and > steams I probably invest my time into the former. We should get them in 3.9. I'm going to be working on the ExceptionGroup PEP today. --

[issue38245] Why am I getting inconsistent results in this simple List assignment?

2019-09-21 Thread Ammar Askar
Ammar Askar added the comment: Check out this part of the FAQ: https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list Essentially, when you did `C = 2*[[]]`, what happens is that the SAME empty list is placed into C[0] and C[1]. Whereas when you do `M = [[],[]

[issue38245] Why am I getting inconsistent results in this simple List assignment?

2019-09-21 Thread Srinivasan Samuel
New submission from Srinivasan Samuel : Here is the my direct cut & paste from my Python 3.7.3 Shell >>> C = 2*[[]] >>> C [[], []] >>> >>> M = [[],[]] >>> M [[], []] >>> >>> C == M True >>> >>> M[0].append(5) >>> M [[5], []] >>> >>> C[0].append(5) >>> C [[5], [5]] >>> >>> C == M False >>>

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: As noted in the checkin, this was backported with the release manager's assent. FWIW, pow() itself is an old feature, recently enhanced to support negative powers in a given modulus. When the enhancement went in, we should have done this as well. --

[issue38242] Revert the new asyncio Streams API

2019-09-21 Thread Andrew Svetlov
Change by Andrew Svetlov : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue38242] Revert the new asyncio Streams API

2019-09-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: I would say that we can reimplement the Stream class on top of new composable streams in the future. I'd love to do it right now but these streams don't exist yet. I totally support the idea of new streams design, it looks very attractive. The implementation

[issue38242] Revert the new asyncio Streams API

2019-09-21 Thread Guido van Rossum
Guido van Rossum added the comment: I am going to recommend sticking to the status quo, i.e. Andrew's improvements to asyncio.Stream should stay. The rest of this message is an elaboration. The new perfect composable Streams design is just that -- a design. Many things could go wrong in the

[issue38166] ast identifies incorrect column for compound attribute lookups

2019-09-21 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: As Serhiy explained, there is no bug here, _potentially_ we could change AST so that attribute name (i.e. "b" in "a.b") is wrapped in a special node holding the position info (similar to ``ast.arg``), but it is a breaking change and is not worth it. You can

[issue38045] enum.Flag instance creation is slow

2019-09-21 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async?

2019-09-21 Thread Stefan Behnel
Stefan Behnel added the comment: > along with the appropriate CO_COROUTINE flag set No, it never did that, for safety reasons. It's difficult to say if enabling these flags is the right thing to do, because it's unclear what assumptions code that tests for them would make. In CPython itself,

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Isn't it a new feature? Isn't it too later to add it to 3.8? -- nosy: +lukasz.langa status: closed -> open ___ Python tracker ___ _

[issue35696] remove unnecessary operation in long_compare()

2019-09-21 Thread hongweipeng
Change by hongweipeng : -- nosy: +hongweipeng ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2019-09-21 Thread Thomas Grainger
Thomas Grainger added the comment: While it may not appear to be a permutation, python already considers it one: graingert@onomastic:~$ cat test_assert_permutation.py import itertools import unittest from decimal import Decimal from fractions import Fraction class Te

[issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests

2019-09-21 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've added PR 16321 illustrating my proposed solution. This solution, while more invasive than Tim's more surgical solution, addresses the concerns brought about by this issue as well as those articulated originally in issue36274. I'm slightly inclined to s

[issue38242] Revert the new asyncio Streams API

2019-09-21 Thread Nathaniel Smith
Nathaniel Smith added the comment: > I think we need something *like* asyncio.Stream in the mix, for compatibility > and bridging between the two worlds, but right now it's not quite clear how > that should look, and pushing it off to 3.9 would give us time to figure out > the details for ho

[issue38242] Revert the new asyncio Streams API

2019-09-21 Thread Andrew Svetlov
Change by Andrew Svetlov : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue38242] Revert the new asyncio Streams API

2019-09-21 Thread Nathaniel Smith
Nathaniel Smith added the comment: That seems a bit extreme, and I don't think conflicts with Trio are the most important motivation here. (And they shouldn't be.) But, we should probably write down what the motivations actually are. Yury might have a different perspective, but to me the cha

[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-09-21 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +15900 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16321 ___ Python tracker ___ __

[issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests

2019-09-21 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +15898 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16321 ___ Python tracker ___ _

[issue36274] http.client cannot send non-ASCII request lines

2019-09-21 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +15899 pull_request: https://github.com/python/cpython/pull/16321 ___ Python tracker ___ _

[issue38242] Revert the new asyncio Streams API

2019-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Reversion is cheap. Published APIs are hard to take back. If the plan is to deprecate, then anything added for 3.8 should be reverted. There's no point in publishing a new API only to take it away. -- nosy: +rhettinger _

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 37bc93552375cb1bc616927b5c1905bae3c0e99d by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-38237: Let pow() support keyword arguments (GH-16302) (GH-16320) https://github.com/python/cpython/commit/37bc93552375cb1bc616927b5c1905

[issue37921] Improve zipfile: add support for symlinks

2019-09-21 Thread Pierre-Jean Grenier
Pierre-Jean Grenier added the comment: The PR went through review and has been awaiting core review for almost a month, anyone to have a look at it? :) -- ___ Python tracker

[issue38242] Revert the new asyncio Streams API

2019-09-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: There is an alternative proposal: let's deprecate and eventually remove streams API entirely (for sockets, pipes, and subprocesses). By this, we will never have a chance to conflict with trio. Another option is removing asyncio at all (again to never conflict

[issue38237] Expose meaningful keyword arguments for pow()

2019-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +15897 pull_request: https://github.com/python/cpython/pull/16320 ___ Python tracker ___ __

[issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests

2019-09-21 Thread Jason R. Coombs
Jason R. Coombs added the comment: > I'm not against that concept, but it is only appropriate for >= 3.9 as that'd > be adding a feature. This issue is marked a release blocker to decide what > to do for 3.5-3.7 (and maybe 3.8 if deemed a serious breaking change). The key part of the regres