[issue27973] urllib.urlretrieve() fails on second ftp transfer

2020-01-02 Thread David Bolen
David Bolen added the comment: I'd be happy to test an updated PR 17774 on a Windows builder, but I don't actually see any change yet. It still appears to hold the earlier NamedTemporaryFile with mode='w' change from a few days ago. -- ___

[issue27973] urllib.urlretrieve() fails on second ftp transfer

2020-01-02 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the suggestion, David. I have updated the PR 17774 to use temp_support instead of NamedTemporaryFile. Please review this. -- ___ Python tracker

[issue39158] ast.literal_eval() doesn't support empty sets

2020-01-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 4fcf5c12a37a8d3d8d6303c44c223dbc8d568cfd by Raymond Hettinger in branch 'master': bpo-39158: ast.literal_eval() doesn't support empty sets (GH-17742) https://github.com/python/cpython/commit/4fcf5c12a37a8d3d8d6303c44c223dbc8d568cfd

[issue39158] ast.literal_eval() doesn't support empty sets

2020-01-02 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36051] Drop the GIL during large bytes.join operations?

2020-01-02 Thread Inada Naoki
Inada Naoki added the comment: > (slowdowns because releasing/acquiring the GIL is not free, particularly when > contended) Yes, it's relatively high. We shouldn't release the GIL only for ~0.5ms. That's why 1MB~ seems nice threshold. > If the threshold is too low then users can always

[issue33944] Deprecate and remove pth files

2020-01-02 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23434] support encoded filename in Content-Disposition for HTTP in cgi.FieldStorage

2020-01-02 Thread And Clover
And Clover added the comment: HTTP generally isn't an RFC 822-family standard. Its headers look a lot like it, but they have their own defined syntax that differs in niggling little details. Using mail parsing code for HTTP isn't usually the right thing. HTTP has always used its own syntax

[issue39166] Python 3.9.0a2 changed how "async for" traces its final iteration

2020-01-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +17237 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17800 ___ Python tracker

[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2020-01-02 Thread Brett Cannon
Brett Cannon added the comment: Yep, it looks like this is fixed, Batuhan. Thanks for letting us know! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue34444] Module's __file__ should be absolute always ("." in sys.path)

2020-01-02 Thread Brett Cannon
Brett Cannon added the comment: RE: "This could be done when inserting something into `sys.path` maybe then only?" That would require a custom object instead of a standard list for sys.path which could detect insertion and then do the automatic absolute path resolution which as you pointed

[issue39166] Python 3.9.0a2 changed how "async for" traces its final iteration

2020-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > I'm a little confused: there's a program in this issue to demonstrate the > problem. Can I do something to make it easier for you to use? Sorry for the confusion, I was asking because at the time of asking I didn't have access to a computer to

[issue39198] Lock may not be released in Logger.isEnabledFor

2020-01-02 Thread Derek Brown
Derek Brown added the comment: PR is here: https://github.com/python/cpython/pull/17689 -- ___ Python tracker ___ ___

[issue39198] Lock may not be released in Logger.isEnabledFor

2020-01-02 Thread Derek Brown
New submission from Derek Brown : If an exception were to be thrown in a particular block of code (say, by asyncio timeouts or stopit) within the `isEnabledFor` function of `logging`, the `logging` global lock may not be released appropriately, resulting in deadlock. -- components:

[issue39195] re._compile should check if the argument is a compiled pattern before checking cache and flags

2020-01-02 Thread Recursing
Recursing added the comment: Rereading the documentation it's actually well documented, and I fully agree. Thanks for your time -- stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue39198] Lock may not be released in Logger.isEnabledFor

2020-01-02 Thread Derek Brown
Change by Derek Brown : -- keywords: +patch pull_requests: +17236 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17689 ___ Python tracker ___

[issue39197] Support the title and description arguments for mutually exclusive argument groups

2020-01-02 Thread signing_agreement
New submission from signing_agreement : add_mutually_exclusive_group has one flag, required=False. Yet, regardless of specifying required=True, the help message calls the group "optional arguments". It would be nice to be able to add title and description for mutually exclusive groups.

[issue39196] json fails to encode dictionary view types

2020-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: To handle non-standard types you can implement the default() method in the subclass of json.JSONEncoder (https://docs.python.org/3/library/json.html#json.JSONEncoder.default) or pass the corresponding argument to json.JSONEncoder() or json.dumps().

[issue39195] re._compile should check if the argument is a compiled pattern before checking cache and flags

2020-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 17799 improves the performance of an uncommon case at the cost of reducing the performance of a common case. I doubt this is a good change. If you have a compiled pattern, it is better to use its methods. -- nosy: +serhiy.storchaka

[issue39166] Python 3.9.0a2 changed how "async for" traces its final iteration

2020-01-02 Thread Ned Batchelder
Ned Batchelder added the comment: Pablo, thanks, but that PR does not fix this problem. I'm a little confused: there's a program in this issue to demonstrate the problem. Can I do something to make it easier for you to use? -- ___ Python tracker

[issue39195] re._compile should check if the argument is a compiled pattern before checking cache and flags

2020-01-02 Thread Recursing
Recursing added the comment: I now know that the correct and fastest way to do this is to use pattern.search, but I still think this change would be an improvement -- ___ Python tracker

[issue39196] json fails to encode dictionary view types

2020-01-02 Thread Joe Gordon
New submission from Joe Gordon : Python 3 fails to encode dictionary view objects. Assuming this is an expected behavior, what is the thinking behind it? I was unable to find any documentation around this. > import json; json.dumps({}.values()) "TypeError: Object of type dict_values is not

[issue39195] re._compile should check if the argument is a compiled pattern before checking cache and flags

2020-01-02 Thread Recursing
Change by Recursing : -- keywords: +patch pull_requests: +17234 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17799 ___ Python tracker ___

[issue39192] relationlist module

2020-01-02 Thread Mark Dickinson
Mark Dickinson added the comment: I'm going to close this here. The issue can be re-opened if there's consensus on python-ideas or elsewhere that it's useful. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python

[issue39195] re._compile should check if the argument is a compiled pattern before checking cache and flags

2020-01-02 Thread Recursing
New submission from Recursing : In the re module, re._compile gets called when using most re methods. In my use case (which I think is not rare) I have a small number of compiled patterns that I have to match against a large number of short strings profiling showed that half of the total

[issue39192] relationlist module

2020-01-02 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the suggestion. If you want to get this added to core Python, there's a bit more you'll need to do here: first, you'd need to persuade the core developers that this functionality is needed. Some real-world motivating examples would help a lot

[issue15273] Remove unnecessarily random behavior from test_unparse.py

2020-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > I guess this resolved with PR 17738 Yup. Closing as per PR 17738. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue38870] Expose ast.unparse in the ast module

2020-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 7b35bef9787cd80ed1e12124f759b4be03c849db by Pablo Galindo (Batuhan Taşkaya) in branch 'master': bpo-38870: Throw ValueError on invalid yield from usage (GH-17798)

[issue38870] Expose ast.unparse in the ast module

2020-01-02 Thread Batuhan
Change by Batuhan : -- pull_requests: +17233 pull_request: https://github.com/python/cpython/pull/17798 ___ Python tracker ___ ___

[issue39186] Windows installer instructions refer to mercurial

2020-01-02 Thread Zachary Ware
Zachary Ware added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 ___ Python tracker ___

[issue15273] Remove unnecessarily random behavior from test_unparse.py

2020-01-02 Thread Batuhan
Batuhan added the comment: I guess this resolved with PR 17738 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38870] Expose ast.unparse in the ast module

2020-01-02 Thread Batuhan
Change by Batuhan : -- pull_requests: +17232 pull_request: https://github.com/python/cpython/pull/17797 ___ Python tracker ___ ___

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2020-01-02 Thread Guido van Rossum
Guido van Rossum added the comment: No doubt because your getter returns None. -- ___ Python tracker ___ ___ Python-bugs-list

[issue39173] _AttributeHolder of argparse should support the sort function or not?

2020-01-02 Thread SilentGhost
SilentGhost added the comment: The answer to the SO question seems rather complete to me and the only thing to be done on our side would be to document Formatter class and perhaps provide example implementation for sorting formatter. Assuming Raymond goes ahead with #39058 I'm still not

[issue35457] robotparser reads empty robots.txt file as "all denied"

2020-01-02 Thread Andre Burgaud
Andre Burgaud added the comment: Thanks @xtreak for providing some clarification on this behavior! I can write some tests to cover this behavior, assuming that we agree that an empty file means "unlimited access". This was worded as such in the old internet draft from 1996 (section 3.2.1 in

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-02 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +17231 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17796 ___ Python tracker ___

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: Agree, this is a bug. -- versions: +Python 3.8, Python 3.9 ___ Python tracker ___ ___

[issue39194] asyncio.open_connection returns a closed client when server fails to authenticate client certificate

2020-01-02 Thread Jonathan Martin
New submission from Jonathan Martin : I'm trying to use SSL to validate clients connecting a an asyncio socket server by specifying CERT_REQUIRED and giving a `cafile` containing the client certificate to allow. client and server code attached. Certificates are generated with: openssl req

[issue39193] Out-of-bound write in ceval.c:_PyEval_EvalFrameDefault

2020-01-02 Thread ggbang
Change by ggbang : Added file: https://bugs.python.org/file48823/crashc1.md ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39193] Out-of-bound write in ceval.c:_PyEval_EvalFrameDefault

2020-01-02 Thread ggbang
New submission from ggbang : python version: Python 3.9.0a2 (default, Dec 25 2019, 20:42:47) [GCC 7.5.0] on linux crash log: ``` bash code:x86:64 0x555afb88

[issue39192] relationlist module

2020-01-02 Thread wyz23x2
wyz23x2 added the comment: I've written a handy tool--RelationList. This type can easily create relations between elements in lists. -- Added file: https://bugs.python.org/file48821/relationlist.py ___ Python tracker

[issue39192] relationlist module

2020-01-02 Thread wyz23x2
Change by wyz23x2 : -- components: -Demos and Tools versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue39192] relationlist module

2020-01-02 Thread wyz23x2
New submission from wyz23x2 : I've written a handy tool--RelationList. This type can easily create relations between elements in lists. -- components: Demos and Tools files: relationlist.py messages: 359197 nosy: asvetlov, dkaveshnikov, wyz23x2, yselivanov priority: normal severity:

[issue39191] Coroutine is awaited despite an exception in run_until_complete()

2020-01-02 Thread Kaveshnikov Denis
New submission from Kaveshnikov Denis : Hi, I found that if to call run_until_complete() in the task while the event loop will be running, a coroutine sent to run_until_complete() will be performed despite the exception raised from run_until_complete(). It seems to me, it would be better to

[issue39152] Faulty override of tkinter.Misc.configure in tkinter.ttk.Scale.configure

2020-01-02 Thread Giovanni Lombardo
Giovanni Lombardo added the comment: I've modified the `Scale.configure` implementation as follows: ``` def configure(self, cnf=None, **kw): """Modify or query scale options. Setting a value for any of the "from", "from_" or "to" options generates a <> event."""

[issue39190] _result_handler dies on raised exceptions [multiprocessing]

2020-01-02 Thread Sindri Guðmundsson
Change by Sindri Guðmundsson : -- keywords: +patch pull_requests: +17230 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17795 ___ Python tracker

[issue39190] _result_handler dies on raised exceptions [multiprocessing]

2020-01-02 Thread Sindri Guðmundsson
New submission from Sindri Guðmundsson : Raising an Exception in a callback handler of apply_async and/or map_async will kill the _result_handler thread. This causes unexpected behavior as all subsequent callbacks won't be called and worse, pool.join will deadlock. The documentation states

[issue36051] Drop the GIL during large bytes.join operations?

2020-01-02 Thread Bruce Merry
Bruce Merry added the comment: I'm realising that the benchmark makes it difficult to see what's going on because it doesn't separate overhead costs (slowdowns because releasing/acquiring the GIL is not free, particularly when contended) from cache effects (slowdowns due to parallel threads

[issue39125] Type signature of @property not shown in help()

2020-01-02 Thread Nguyễn Gia Phong
Change by Nguyễn Gia Phong : -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2020-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 04ec7a1f7a5b92187a73cd02670958444c6f2220 by Pablo Galindo in branch 'master': bpo-39114: Fix tracing of except handlers with name binding (GH-17769) https://github.com/python/cpython/commit/04ec7a1f7a5b92187a73cd02670958444c6f2220

[issue39166] Python 3.9.0a2 changed how "async for" traces its final iteration

2020-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Can you check if this is fixed with the changes in: https://github.com/python/cpython/pull/17769 -- nosy: +pablogsal ___ Python tracker

[issue16399] argparse: append action with default list adds to list instead of overriding

2020-01-02 Thread hai shi
hai shi added the comment: I update the doc of argparse and think this bpo could be closed when PR merged. -- nosy: +rhettinger ___ Python tracker ___

[issue39173] _AttributeHolder of argparse should support the sort function or not?

2020-01-02 Thread hai shi
hai shi added the comment: 1)>You'd need to elaborate on that. I've been using argparse for years and never once had presentational aspects affected by work. So, again, what is the actual use case for this? _AttributeHolder_ has sorted the args in `_get_kwargs()` and the offspring class

[issue16399] argparse: append action with default list adds to list instead of overriding

2020-01-02 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39189] Use io.DEFAULT_BUFFER_SIZE for filecmp BUFSIZE variable

2020-01-02 Thread Bahram Aghaei
New submission from Bahram Aghaei : Hello there, I was reading the `filecmp` module and I noticed that it defined the BUFSIZE manually, I think it's better to stick to the io.DEFAULT_BUFFER_SIZE variable for both consistency and easy to maintain in the future. Cheers, --

[issue39188] recent change when passing a Union to a function

2020-01-02 Thread Kevin Schlossser
New submission from Kevin Schlossser : OK so There was a change made to fix issue 26628. Something was forgotten about.. On Windows there is the VARIANT Union which gets used all over the Windows API. This change is going to really break a lot of peoples code and there are no code examples

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2020-01-02 Thread Alexander Hirner
Alexander Hirner added the comment: This results in E(x=None). I'd need to look into that to understand why. -- Added file: https://bugs.python.org/file48817/dc2_repro.py ___ Python tracker

[issue39168] Generic type subscription is a huge toll on Python performance

2020-01-02 Thread Naveen Durai
Change by Naveen Durai : -- nosy: +Naveen Durai ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35457] robotparser reads empty robots.txt file as "all denied"

2020-01-02 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: There is a behavior change. parse() sets the modified time and unless the modified time is set the can_fetch method returns false. In Python 2 the parse method was called only when the file is non-empty [0] but in Python 3 it's always called