[issue38827] [security] requests (lib) connects to a wrong host

2019-11-16 Thread Zachary Ware
Zachary Ware added the comment: As mentioned, requests is a third-party project, please report bugs in requests following the instructions in the link provided by Karthikeyan. -- nosy: +zach.ware resolution: -> third party stage: -> resolved status: open -> closed

[issue33046] IDLE option to strip trailing whitespace automatically on save

2019-11-16 Thread Zackery Spytz
Zackery Spytz added the comment: I have created a pull request to implement this feature. There was also some relevant discussion in bpo-23667. -- nosy: +ZackerySpytz ___ Python tracker

[issue33046] IDLE option to strip trailing whitespace automatically on save

2019-11-16 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +16705 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17201 ___ Python tracker ___

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-16 Thread Kyle Stanley
Kyle Stanley added the comment: So, I just had an interesting idea... what if ThreadPool.run() returned a Task instead of a coroutine object? With the current version of asyncio.ThreadPool, if a user wants to create a Task, they would have to do something like this: async with

[issue38827] [security] requests (lib) connects to a wrong host

2019-11-16 Thread Arslan Mahmood
Arslan Mahmood added the comment: I'm new that's why multiple issues get created by mistake. On Sun, 17 Nov 2019 at 11:16, Karthikeyan Singaravelan < rep...@bugs.python.org> wrote: > > New submission from Karthikeyan Singaravelan : > > Please stop creating multiple issues with no

[issue38812] Comparing datetime.time objects incorrect for TZ aware and unaware

2019-11-16 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38827] [security] requests (lib) connects to a wrong host

2019-11-16 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : Please stop creating multiple issues with no description. The previous issue also had no description : https://bugs.python.org/issue38824 . requests module has it's own security process :

[issue38824] sasddsdsd

2019-11-16 Thread Arslan Mahmood
Arslan Mahmood added the comment: Hi Christian Heimes! I have found a bug in requests lib. I want to report it with POC but don't find message feature on https://bugs.python.org On Sun, 17 Nov 2019 at 01:58, Christian Heimes wrote: > > New submission from Christian Heimes : > > Empty /

[issue38827] [security] requests (lib) connects to a wrong host

2019-11-16 Thread Arslan Mahmood
Change by Arslan Mahmood : -- components: Library (Lib) nosy: Arslan Mahmood priority: normal severity: normal status: open title: [security] requests (lib) connects to a wrong host type: security versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8

[issue38825] shutil.disk_usage - Lacking documentation

2019-11-16 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I modified psutil to shutil since I feel it's a typo. Please revert back if it's incorrect. -- nosy: +giampaolo.rodola, tarek, xtreak title: psutil.disk_usage - Lacking documentation -> shutil.disk_usage - Lacking documentation

[issue38826] Regular Expression Denial of Service in urllib.request.AbstractBasicAuthHandler

2019-11-16 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the report. Please report security issues to secur...@python.org so that the security team can analyze and triage it to be made public. More information at https://www.python.org/news/security/ -- nosy: +xtreak

[issue3530] ast.NodeTransformer doc bug

2019-11-16 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___

[issue3530] ast.NodeTransformer doc bug

2019-11-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I re-verified the problem, its presence in the doc, and the fix with 3.9. -- ___ Python tracker ___

[issue38826] Regular Expression Denial of Service in urllib.request.AbstractBasicAuthHandler

2019-11-16 Thread Ben Caller
New submission from Ben Caller : The regular expression urllib.request.AbstractBasicAuthHandler.rx is vulnerable to malicious inputs which cause denial of service (REDoS). The regex is: rx = re.compile('(?:.*,)*[ \t]*([^ \t]+)[ \t]+' 'realm=(["\']?)([^"\']*)\\2',

[issue38814] Python3.7.5 crashes on OSX with my django project

2019-11-16 Thread Ned Deily
Ned Deily added the comment: Sorry, we have strayed from dealing with a Python issue here so, if you need nore assistance, you really should seek help elsewhere. But a quick web search found this which seems to describe your problem: https://github.com/wbond/asn1crypto/issues/113

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread miss-islington
miss-islington added the comment: New changeset 1fe79a43400d092a074c6f9ae5eb290ea3e4f281 by Miss Islington (bot) in branch '3.8': bpo-38823: Clean up refleaks in _contextvars initialization. (GH-17198) https://github.com/python/cpython/commit/1fe79a43400d092a074c6f9ae5eb290ea3e4f281

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread miss-islington
miss-islington added the comment: New changeset 8a334af13368573cc645488481b1173d65eeeb9a by Miss Islington (bot) in branch '3.7': bpo-38823: Clean up refleaks in _contextvars initialization. (GH-17198) https://github.com/python/cpython/commit/8a334af13368573cc645488481b1173d65eeeb9a

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +16704 pull_request: https://github.com/python/cpython/pull/17200 ___ Python tracker ___

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread miss-islington
miss-islington added the comment: New changeset 143a97f64128070386b12a0ee589bdaad5e51f40 by Miss Islington (bot) (Brandt Bucher) in branch 'master': bpo-38823: Clean up refleaks in _contextvars initialization. (GH-17198)

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +16703 pull_request: https://github.com/python/cpython/pull/17199 ___ Python tracker ___

[issue38814] Python3.7.5 crashes on OSX with my django project

2019-11-16 Thread László Károlyi
László Károlyi added the comment: Upon reinstalling openssl with homebrew, I get the following info: -- openssl is keg-only, which means it was not symlinked into /usr/local, because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries. If you need to

[issue38814] Python3.7.5 crashes on OSX with my django project

2019-11-16 Thread Ned Deily
Ned Deily added the comment: Almost any kind of crash is possible when using ctypes. But you almost certainly don't want to be loading /usr/lib/libcrypto.dylib. That's the macOS legacy version which is there only for legacy Apple-supplied third-party components, like the Apple-supplie

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16702 pull_request: https://github.com/python/cpython/pull/17198 ___ Python tracker ___

[issue38814] Python3.7.5 crashes on OSX with my django project

2019-11-16 Thread László Károlyi
László Károlyi added the comment: Here's an md5sum of /usr/lib/libcrypto.dylib: MD5 (/usr/lib/libcrypto.dylib) = d19ca8b227c32d30f92ed0665dfe73d0 -- ___ Python tracker ___

[issue38814] Python3.7.5 crashes on OSX with my django project

2019-11-16 Thread László Károlyi
László Károlyi added the comment: As I'm triangulating the problem down, I can now reproduce the problem without running django: python -X faulthandler -c 'from asn1crypto._perf import _big_num_ctypes' gives the output: Fatal Python error: Aborted Current thread 0x000117155dc0 (most

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-16 Thread Kyle Stanley
Kyle Stanley added the comment: > (a) design the API correctly; > (b) ship something that definitely works with a proven ThreadPoolExecutor; Yury and Andrew, here's my latest API design for asyncio.ThreadPool: https://github.com/python/cpython/compare/master...aeros:asyncio-threadpool.

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread miss-islington
miss-islington added the comment: New changeset 825e91be0407d6fc7fa034286b4e90634f181fab by Miss Islington (bot) in branch '3.7': bpo-38823: Clean up refleaks in _asyncio initialization. (GH-17195) https://github.com/python/cpython/commit/825e91be0407d6fc7fa034286b4e90634f181fab --

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread miss-islington
miss-islington added the comment: New changeset 48f4f75baeee8ade1fbfab1b0aa6a21a3b13a2f2 by Miss Islington (bot) in branch '3.8': bpo-38823: Clean up refleaks in _asyncio initialization. (GH-17195) https://github.com/python/cpython/commit/48f4f75baeee8ade1fbfab1b0aa6a21a3b13a2f2 --

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +16701 pull_request: https://github.com/python/cpython/pull/17197 ___ Python tracker ___

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +16700 pull_request: https://github.com/python/cpython/pull/17196 ___ Python tracker ___

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread miss-islington
miss-islington added the comment: New changeset c3f6bdc332d23588102eba749a5929dd5bb67c9d by Miss Islington (bot) (Brandt Bucher) in branch 'master': bpo-38823: Clean up refleaks in _asyncio initialization. (GH-17195)

[issue38814] Python3.7.5 crashes on OSX with my django project

2019-11-16 Thread László Károlyi
László Károlyi added the comment: So after making the changes, recompiling everything and using `python -X faulthandler backend/manage.py runserver --nothreading --noasgi --noreload` to start django without the autoreloader that hides the crashed process' output, here's what I get: File

[issue38825] psutil.disk_usage - Lacking documentation

2019-11-16 Thread Lord Anton Hvornum
New submission from Lord Anton Hvornum : https://docs.python.org/3.8/library/shutil.html#shutil.disk_usage There's no mention that this helper function simply calls `os.statvfs()` in the background. Something that is quite troubling when you're trying to get disk_usage (or disk-information)

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +16699 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17195 ___ Python tracker ___

[issue38782] Convert importlib.abc to use typing.Protocol

2019-11-16 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- nosy: +nanjekyejoannah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38814] Python3.7.5 crashes on OSX with my django project

2019-11-16 Thread Ned Deily
Ned Deily added the comment: The stack track is pretty suspicious. I really don't know why it would be crashing where it shows which seems to be pretty early in the interpreter. If you haven't already, you might just want to try reinstalling from Homebrew first and try again. If you do

[issue38814] Python3.7.5 crashes on OSX with my django project

2019-11-16 Thread Ned Deily
Change by Ned Deily : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38824] sasddsdsd

2019-11-16 Thread Christian Heimes
New submission from Christian Heimes : Empty / invalid bug report -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue22640] Add silent mode for py_compile

2019-11-16 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: Am in favor of opening a separate ticket for this. Thanks -- ___ Python tracker ___ ___

[issue38814] Python3.7.5 crashes on OSX with my django project

2019-11-16 Thread László Károlyi
László Károlyi added the comment: Hello, the only C extension I use is xapian and mysql (with mariadb), xapian comes from their own git repo, and mariadb comes from mysqlclient, both (and everything else I don't know about) compile with the python 3.7.5 I installed within a venv. I'll try

[issue22640] Add silent mode for py_compile

2019-11-16 Thread Éric Araujo
Éric Araujo added the comment: Internal functions got the parameter added, but not the command-line interface. Should this be reopened, or a different ticket? (I think only remove the NameError in 3.8, but complete the feature in 3.9) -- nosy: +eric.araujo

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread Brandt Bucher
Brandt Bucher added the comment: How do others feel about the creation of a new private API? It would keep these diffs smaller and ease refactoring... and it would probably be good to have around anyways: /* Like PyModule_AddObject, but steals o on success AND failure. */ int

[issue38824] sasddsdsd

2019-11-16 Thread Arslan Mahmood
Change by Arslan Mahmood : -- assignee: -> christian.heimes components: +SSL -Regular Expressions nosy: +christian.heimes title: [security] requests connects to a wrong host -> sasddsdsd versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.8

[issue38824] [security] requests connects to a wrong host

2019-11-16 Thread Arslan Mahmood
Change by Arslan Mahmood : -- components: Regular Expressions nosy: Arslan Mahmood, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: [security] requests connects to a wrong host type: security versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7,

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread Brandt Bucher
New submission from Brandt Bucher : Many of the C stdlib modules can benefit from improved error handling during initialization. I've now had two PRs where the authors had reference leaks on error conditions, but defended their decisions by pointing to examples of similar idioms all over the

[issue38822] Inconsistent os.stat behavior for directory with Access Denied

2019-11-16 Thread CrouZ
New submission from CrouZ : After upgrading some scripts from Python 2.7 to 3.7 in Windows 10, I got different behavior that seems to be caused by inconsistent behavior for os.stat in Python 3.7. Python 2.7: >>> os.stat("D:\\System Volume Information") nt.stat_result ... >>>

[issue38821] argparse calls ngettext with deprecated non-integer value

2019-11-16 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +16698 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17192 ___ Python tracker ___

[issue37083] Document TYPE_COMMENT in documentation reference for compound statements

2019-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Honestly I don't think that the exact places where TYPE_COMMENT goes in the grammar should be documented as part of the language reference. For almost all of them we should be using type annotation syntax, and IMO for the remaining ones we should either

[issue38821] argparse calls ngettext with deprecated non-integer value

2019-11-16 Thread Federico Bond
New submission from Federico Bond : The call to 'ngettext' in 'ArgumentParser._match_argument' (Lib/argparse.py) uses a non-integer value, which causes it to fail with a nonsensical exception. Non-integer values were deprecated in bpo-28692. This happens because the 'default' error message

[issue34979] Python throws “SyntaxError: Non-UTF-8 code start with \xe8...” when parse source file

2019-11-16 Thread susaki
susaki added the comment: duplicated with #14811 -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38650] Add constantness to PyStructSequence_UnnamedField

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

[issue38639] Optimize floor(), ceil() and trunc() for floats

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

[issue38820] Make Python compatible with OpenSSL 3.0.0

2019-11-16 Thread Christian Heimes
Christian Heimes added the comment: PR GH-17190 fixes test_openssl_version and removes the trailing newline from IPv6 addresses on all OpenSSL versions. I prefer to have the output consistent on all OpenSSL versions. The newline was silly any way. --

[issue28286] gzip guessing of mode is ambiguous

2019-11-16 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.7 ___ Python tracker ___

[issue32856] Optimize the `for y in [x]` idiom in comprehensions

2019-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > However, that's still going to be clearer to most readers than writing It is subjective. To me, j+1/j looks clearer than (j:=i*i)+1/j. In addition, the for-as-assignment idiom is more powerful in context of comprehensions, it allows to set an initial

[issue38650] Add constantness to PyStructSequence_UnnamedField

2019-11-16 Thread Dong-hee Na
Dong-hee Na added the comment: Looks like https://github.com/python/cpython/blob/088b63ea7a8331a3e34bc93c3b873c60354b4fad/Tools/c-analyzer/known.tsv#L1549 should be updated also. What do you think? -- nosy: +corona10 ___ Python tracker

[issue28286] gzip guessing of mode is ambiguous

2019-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a0652328a26757a90d63697b5c01f5427b1132b5 by Serhiy Storchaka in branch 'master': bpo-28286: Deprecate opening GzipFile for writing implicitly. (GH-16417) https://github.com/python/cpython/commit/a0652328a26757a90d63697b5c01f5427b1132b5

[issue38650] Add constantness to PyStructSequence_UnnamedField

2019-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bd44a7ead9f7336d7bb45f186b2b6ca0300154f7 by Serhiy Storchaka in branch 'master': bpo-38650: Constify PyStructSequence_UnnamedField. (GH-17005) https://github.com/python/cpython/commit/bd44a7ead9f7336d7bb45f186b2b6ca0300154f7 --

[issue38790] test_fcntl failing on macOS CI

2019-11-16 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: +Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38790] test_fcntl failing on macOS CI

2019-11-16 Thread Dong-hee Na
Dong-hee Na added the comment: This issue was reported from victor See https://bugs.python.org/msg356607 And I attached the patch for this on GH 17154. Please take a look at the patch also. I apologize for the trouble as the original test code author. -- keywords: +patch

[issue37083] Document TYPE_COMMENT in documentation reference for compound statements

2019-11-16 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +16696 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17191 ___ Python tracker

[issue38639] Optimize floor(), ceil() and trunc() for floats

2019-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5fd5cb8d85fab3393dd76c7f3de1cdeb8ecf7203 by Serhiy Storchaka in branch 'master': bpo-38639: Optimize floor(), ceil() and trunc() for floats. (GH-16991) https://github.com/python/cpython/commit/5fd5cb8d85fab3393dd76c7f3de1cdeb8ecf7203

[issue38813] math.modf() change integer returned part as integer instead of float

2019-11-16 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the suggestion. I'm closing this as rejected, for the reasons Tim gave. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue38813] math.modf() change integer returned part as integer instead of float

2019-11-16 Thread Mark Dickinson
Mark Dickinson added the comment: [Serhiy] > What about math.trunc() and round()? Should they return int or float? math.trunc was deliberately introduced to be an explicitly-value-modifying conversion to int (as opposed to "int" itself, which is used for both lossy and lossless conversions

[issue38820] Make Python compatible with OpenSSL 3.0.0

2019-11-16 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +16695 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17190 ___ Python tracker

[issue38820] Make Python compatible with OpenSSL 3.0.0

2019-11-16 Thread Christian Heimes
New submission from Christian Heimes : OpenSSL 3.0.0 is currently development [1]. I'm expecting a first beta release in December. Final release is scheduled for Q2 2020. OpenSSL 3.0.0 is API and feature compatible to OpenSSL 1.1.0 and 1.1.1. Only minor changes are required: * OpenSSL

[issue38813] math.modf() change integer returned part as integer instead of float

2019-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > math.floor(), which does return an int, [...] and I believe it was a mistake > to change it to return an int. What about math.trunc() and round()? Should they return int or float? And what about the result of the floor division of floats? Should it be

[issue38813] math.modf() change integer returned part as integer instead of float

2019-11-16 Thread Mark Dickinson
Mark Dickinson added the comment: [Tim] > I don't think it would be doing anyone a real favor by returning [...] Agreed. > math.floor(), which does return an int, [...] and I believe it was a mistake > to change it to return an int. Also agreed. --

[issue36589] Incorrect error handling in curses.update_lines_cols()

2019-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Historically the update_lines_cols() helper returned 0 on error, and I think that it is better to keep it so. The bug is in the Python function update_lines_cols() added in 3.5 (see issue4254). Its implementation should return NULL if the helper returns

[issue38721] modulefinder should use import hooks properly

2019-11-16 Thread Dominic Littlewood
Dominic Littlewood <11dlittlew...@gmail.com> added the comment: Okay, I've encountered a snag. To use meta path finders, if the path is None, it's sometimes okay to substitute self.path, and sometimes not. The only way to make absolutely sure the finder works correctly is to change sys.path.