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

2019-09-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'd imagine an equivalent of the 3.6 PR would work for 3.5. Someone should look at how to do similar in 2.7 _if_ the project(s) that complained about the problem rely on such behavior in their last 2.7 compatible releases. --

[issue38306] High level API for loop.run_in_executor(None, ...)?

2019-09-28 Thread Paul Martin
Paul Martin added the comment: run_in_executor doesn't necessarily create a new thread each time so create_thread would be misleading. run_in_thread might be better. -- nosy: +primal ___ Python tracker

[issue38163] AsyncMock child mocks should detect their type

2019-09-28 Thread Lisa Roach
Change by Lisa Roach : -- keywords: +patch pull_requests: +16054 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16471 ___ Python tracker ___

[issue38313] Crash/No start

2019-09-28 Thread Gautam
New submission from Gautam : Hi Python in my Laptop used to work well but now a days i is not working in fact it wont even start. Even after pressing it for half an hour no screen would appear pls check -- components: Windows messages: 353482 nosy: Rick Grimes, paul.moore,

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

2019-09-28 Thread Larry Hastings
Larry Hastings added the comment: So, following this recent flurry of activity, all that remains are to sort out 2.7 and 3.5. 3.5.8 is still in a holding pattern; at this point I think I'm going to insert another RC, so I can add the new version of expat. Will a makes-everyone-happy PR

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-28 Thread Tim Peters
Tim Peters added the comment: > call_func and remove are part of a reference cycle. A forced garbage > collection breaks the cycle and removes the two objects, but they are > not removed in the expected order: > > * first: call_func > * then: remove > > The crash requires to destroy the

[issue38312] curses: add `set_tabsize` and `set_escdelay`

2019-09-28 Thread Ammar Askar
Ammar Askar added the comment: > I'd like to help with this, but I don't even know where to start with > argumentclinic -- any points would be greatly appreciated Are you asking about argumentclinic in general or something specific to this bug? If it's something specific feel free to ignore

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

2019-09-28 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: -Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___

[issue38108] Everything in Mock should inherit from Base

2019-09-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +16053 pull_request: https://github.com/python/cpython/pull/16470 ___ Python tracker ___

[issue38108] Everything in Mock should inherit from Base

2019-09-28 Thread Lisa Roach
Lisa Roach added the comment: New changeset 9a7d9519506ae807ca48ff02e2ea117ebac3450e by Lisa Roach in branch 'master': bpo-38108: Makes mock objects inherit from Base (GH-16060) https://github.com/python/cpython/commit/9a7d9519506ae807ca48ff02e2ea117ebac3450e --

[issue38312] curses: add `set_tabsize` and `set_escdelay`

2019-09-28 Thread Anthony Sottile
New submission from Anthony Sottile : https://linux.die.net/man/3/set_escdelay https://linux.die.net/man/3/set_tabsize I'd like to help with this, but I don't even know where to start with argumentclinic -- any points would be greatly appreciated presumably I should also add getters for

[issue38310] Opcode predictions for asserts, class definitions, and some calls.

2019-09-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the patch :-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38310] Opcode predictions for asserts, class definitions, and some calls.

2019-09-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset f185a73249189bc3b75b4dc26e9ec2990a587b17 by Raymond Hettinger (Brandt Bucher) in branch 'master': bpo-38310: Predict BUILD_MAP_UNPACK_WITH_CALL -> CALL_FUNCTION_EX. (GH-16467)

[issue38311] macOS sqlite 3 module build fix

2019-09-28 Thread David CARLIER
Change by David CARLIER : -- components: Build nosy: devnexen priority: normal pull_requests: 16052 severity: normal status: open title: macOS sqlite 3 module build fix type: compile error versions: Python 3.9 ___ Python tracker

[issue38296] unittest expectedFailure does not differentiate errors from failures

2019-09-28 Thread Kit Yan Choi
Kit Yan Choi added the comment: I think Python does differentiate "test error" and "test failure" such that a test outcome state can be one of these: success, failure, error, skipped. One could refine these to six: expected success, unexpected success, expected failure, unexpected failure,

[issue38298] Base class of generic type has wrong `cls` argument in classmethods

2019-09-28 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Yes, it is unfortunately hard to support with the new design. Also note that this was previously discussed at https://github.com/python/typing/issues/629. I think we can close this, since the other issue has more context. -- resolution: ->

[issue38310] Opcode predictions for asserts, class definitions, and some calls.

2019-09-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing

[issue38310] Opcode predictions for asserts, class definitions, and some calls.

2019-09-28 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +16051 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16467 ___ Python tracker ___

[issue38310] Opcode predictions for asserts, class definitions, and some calls.

2019-09-28 Thread Brandt Bucher
New submission from Brandt Bucher : This patch adds four new opcode predictions: BUILD_MAP_UNPACK_WITH_CALL -> CALL_FUNCTION_EX: - Emitted whenever more than one map of **kwargs is unpacked into a call. - Pair *always* occurs together. LOAD_BUILD_CLASS -> LOAD_CONST: - Emitted whenever a

[issue38309] Avoid creating duplicate PATH entries with the macOS installer

2019-09-28 Thread Raymond Hettinger
New submission from Raymond Hettinger : The macOS installer updates .bash_profile to add the current python version to the PATH. The problem is that it doesn't check to see if that work has already been done in a previous installation. So, as a person install successive beta releases,

[issue38296] unittest expectedFailure does not differentiate errors from failures

2019-09-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: A test either passes or fails. Like a not operator, the expectedFailure decorator inverts the result. https://docs.python.org/3/library/unittest.html#unittest.expectedFailure @unittest.expectedFailure Mark the test as an expected failure. If the test

[issue38308] Add optional weighting to statistics.harmonic_mean()

2019-09-28 Thread Raymond Hettinger
New submission from Raymond Hettinger : Currently, harmonic_mean() is difficult to use in real applications because it assumes equal weighting. While that is sometimes true, the API precludes a broad class of applications where the weights are uneven. That is easily remedied with an optional

[issue38307] Provide Class' end line in readmodule module

2019-09-28 Thread Steven D'Aprano
Steven D'Aprano added the comment: What `readmodule` are you referring to? 3.6 is in feature-freeze. The earliest that any enhancement could be added is version 3.9. Can you explain how having an ending line number as well as the starting line number can be used to check which imports are

[issue38307] Provide Class' end line in readmodule module

2019-09-28 Thread Aviral
New submission from Aviral : Currently, the `readmodule` returns the starting line of the classes but not the end line. This should be provided as well in order to get the scope of the class, mainly to help check what all imports were used in a class. -- components: Library (Lib)

[issue38296] unittest expectedFailure does not differentiate errors from failures

2019-09-28 Thread Kit Yan Choi
Kit Yan Choi added the comment: Pining Chris based on previous discussion in issue16997 ... Hope that's okay. I notice that the language in my initial message also conflates error and failure. My apologies on the carelessness. Just to clarify: @unittest.expectedFailure def

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

2019-09-28 Thread Ned Deily
Ned Deily added the comment: New changeset 5b18ce60b432d1dfa6f6988be07dd55646201a9b by Ned Deily (Jason R. Coombs) in branch '3.6': [3.6] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448) (GH-16462)

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

2019-09-28 Thread Ned Deily
Ned Deily added the comment: New changeset 5b18ce60b432d1dfa6f6988be07dd55646201a9b by Ned Deily (Jason R. Coombs) in branch '3.6': [3.6] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448) (GH-16462)

[issue38305] https://2.python-requests.org/ missing TLS certicate

2019-09-28 Thread Ned Deily
Ned Deily added the comment: Thanks for the report but this is not something relevant to this issue tracker. A quick whois lookup for the domain did not reveal an owner. Suggest you pursue by asking the PSF infrastructure team via an email to infrastructure-staff at python.org.

[issue38035] shared_semaphores cannot be shared across unrelated processes

2019-09-28 Thread Ned Deily
Change by Ned Deily : -- nosy: +davin, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38115] Invalid bytecode offsets in co_lnotab

2019-09-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks Thomas! -- resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker ___

[issue38115] Invalid bytecode offsets in co_lnotab

2019-09-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 36c6fa968016a46a39c3cdbd0a17ea5490dfa343 by Gregory P. Smith in branch '3.8': bpo-38115: Deal with invalid bytecode offsets in lnotab (GH-16079) (GH-16464) https://github.com/python/cpython/commit/36c6fa968016a46a39c3cdbd0a17ea5490dfa343

[issue38306] High level API for loop.run_in_executor(None, ...)?

2019-09-28 Thread Antoine Pietri
Antoine Pietri added the comment: Actually I don't think it's possible with the current implementation to cancel the concurrent.Future after a timeout, so maybe we should remove that argument. So, this signature instead: async def create_thread(callable, *args, *, kwargs=None, loop=None)

[issue37408] [DOC] Precise that Tarfile "format" argument only concerns writing.

2019-09-28 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python stage: patch review -> backport needed ___ Python tracker

[issue37408] [DOC] Precise that Tarfile "format" argument only concerns writing.

2019-09-28 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37408] [DOC] Precise that Tarfile "format" argument only concerns writing.

2019-09-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +16050 pull_request: https://github.com/python/cpython/pull/16465 ___ Python tracker ___

[issue37408] [DOC] Precise that Tarfile "format" argument only concerns writing.

2019-09-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset c5a7e0ce194c0eafe82eb3e431881012398e7d46 by Gregory P. Smith (Pascal Chambon) in branch 'master': bpo-37408: Precise that Tarfile "format" argument only concerns writing. (GH-14389)

[issue38115] Invalid bytecode offsets in co_lnotab

2019-09-28 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +16049 pull_request: https://github.com/python/cpython/pull/16464 ___ Python tracker ___

[issue38115] Invalid bytecode offsets in co_lnotab

2019-09-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset c8165036f374cd2ee64d4314eeb2514f7acb5026 by Gregory P. Smith (T. Wouters) in branch 'master': bpo-38115: Deal with invalid bytecode offsets in lnotab (GH-16079) https://github.com/python/cpython/commit/c8165036f374cd2ee64d4314eeb2514f7acb5026

[issue38306] High level API for loop.run_in_executor(None, ...)?

2019-09-28 Thread Antoine Pietri
New submission from Antoine Pietri : In 3.7 a lot of high level functions have been added to the asyncio API, but nothing to start blocking functions as non-blocking threads. You still have to call get_event_loop() then await loop.run_in_executor(None, callable). I think this pattern is

[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-09-28 Thread Ido Michael
Ido Michael added the comment: I've fixed the documentation according to the thread. Here's the PR: GH-16463 Ido -- nosy: +Ido Michael ___ Python tracker ___

[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-09-28 Thread Ido Michael
Change by Ido Michael : -- keywords: +patch pull_requests: +16048 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16463 ___ Python tracker ___

[issue38035] shared_semaphores cannot be shared across unrelated processes

2019-09-28 Thread Ido Michael
Ido Michael added the comment: @ned.deily any thoughts? I can start working on it. Ido -- nosy: +Ido Michael ___ Python tracker ___

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

2019-09-28 Thread miss-islington
miss-islington added the comment: New changeset 8f478b489ae11633d2609dff0ef21d0e1a857417 by Miss Islington (bot) in branch '3.8': bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448)

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

2019-09-28 Thread miss-islington
miss-islington added the comment: New changeset 8f478b489ae11633d2609dff0ef21d0e1a857417 by Miss Islington (bot) in branch '3.8': bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448)

[issue38305] https://2.python-requests.org/ missing TLS certicate

2019-09-28 Thread Tim Laurence
New submission from Tim Laurence : I am unsure how to route this given the recent transition of Requests to PSF so my apologies if this is the wrong spot. The page where I think most people look for Requests documentation appears to be broken https://2.python-requests.org/ When I look

[issue38303] Make audioop PEP-384 compatible

2019-09-28 Thread Tyler Kieft
New submission from Tyler Kieft : Working on a patch for this, will have it up in a couple days -- ___ Python tracker ___ ___

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

2019-09-28 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 80dd66ac278ecbabbf843526e3a56f5031da9562 by Jason R. Coombs in branch '3.7': [3.7] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448) (GH-16461)

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

2019-09-28 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 80dd66ac278ecbabbf843526e3a56f5031da9562 by Jason R. Coombs in branch '3.7': [3.7] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448) (GH-16461)

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

2019-09-28 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +16047 pull_request: https://github.com/python/cpython/pull/16462 ___ Python tracker ___

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

2019-09-28 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +16046 pull_request: https://github.com/python/cpython/pull/16462 ___ Python tracker ___

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

2019-09-28 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +16045 pull_request: https://github.com/python/cpython/pull/16461 ___ Python tracker ___

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

2019-09-28 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +16044 pull_request: https://github.com/python/cpython/pull/16461 ___ Python tracker ___

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

2019-09-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +16043 pull_request: https://github.com/python/cpython/pull/16460 ___ Python tracker ___

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

2019-09-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +16042 pull_request: https://github.com/python/cpython/pull/16460 ___ Python tracker ___

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

2019-09-28 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 7774d7831e8809795c64ce27f7df52674581d298 by Jason R. Coombs in branch 'master': bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448)

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

2019-09-28 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 7774d7831e8809795c64ce27f7df52674581d298 by Jason R. Coombs in branch 'master': bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448)

[issue38302] __rpow__ not reached when __ipow__ returns NotImplemented

2019-09-28 Thread Alex Shkop
Change by Alex Shkop : -- keywords: +patch pull_requests: +16041 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16459 ___ Python tracker ___

[issue37970] urllib.parse docstrings incomplete

2019-09-28 Thread Ido Michael
Ido Michael added the comment: Committed a PR: GH-16458 I've read all of the thread and changed the docstring to the latest suggestion by @zach.ware Ido -- nosy: +Ido Michael ___ Python tracker

[issue37970] urllib.parse docstrings incomplete

2019-09-28 Thread Ido Michael
Change by Ido Michael : -- keywords: +patch pull_requests: +16039 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16458 ___ Python tracker

[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-09-28 Thread Ido Michael
Ido Michael added the comment: Fixed this issue since the CLA of the past user wasn't signed. Added a check for the socket type in each of the methods: sock_recv, sock_recv_into, sock_sendall, sock_connect, sock_accept. PR: GH-16457 -- nosy: +Ido Michael

[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-09-28 Thread Ido Michael
Change by Ido Michael : -- pull_requests: +16037 pull_request: https://github.com/python/cpython/pull/16457 ___ Python tracker ___

[issue38297] Imports at top of module is often not used

2019-09-28 Thread Dominic Littlewood
Dominic Littlewood <11dlittlew...@gmail.com> added the comment: I've slightly adjusted the script to check for module-level imports not at the top of the file. If we permit things like this: if condition: import module else: do_something_sensible() as long as they are at the top of

[issue35360] Update SQLite to 3.28 in Windows and macOS installer builds

2019-09-28 Thread Big Stone
Big Stone added the comment: there will be a security fix in sqlite-3.30 around October 10th. https://nvd.nist.gov/vuln/detail/CVE-2019-16168#VulnChangeHistorySection https://www.sqlite.org/draft/releaselog/3_30_0.html -- ___ Python tracker

[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-09-28 Thread Lorenz Mende
Change by Lorenz Mende : -- pull_requests: +16036 pull_request: https://github.com/python/cpython/pull/16456 ___ Python tracker ___

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

2019-09-28 Thread Ned Deily
Ned Deily added the comment: New changeset 1698cacfb924d1df452e78d11a4bf81ae389 by Ned Deily (Victor Stinner) in branch '3.6': bpo-38243, xmlrpc.server: Escape the server_title (GH-16373) (GH-16441) https://github.com/python/cpython/commit/1698cacfb924d1df452e78d11a4bf81ae389

[issue38302] __rpow__ not reached when __ipow__ returns NotImplemented

2019-09-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38301] If "_REENTRANT" is defined in the header file, we should use "-D_REENTRANT" when compiling

2019-09-28 Thread Ned Deily
Change by Ned Deily : -- versions: -Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: