[issue41670] ceval traces code differently based with USE_COMPUTED_GOTOS

2020-08-30 Thread Ammar Askar
Ammar Askar added the comment: So I think this is a weird edge case with a set of opcode predictions (GET_ITER -> FOR_ITER -> POP_BLOCK) going outside of a line boundary. The disassembly of the reproducer above is: 4 0 SETUP_FINALLY 16 (to 18) 5 2

[issue41670] ceval traces code differently with USE_COMPUTED_GOTOS

2020-08-30 Thread Ammar Askar
Change by Ammar Askar : -- title: ceval traces code differently based with USE_COMPUTED_GOTOS -> ceval traces code differently with USE_COMPUTED_GOTOS ___ Python tracker ___

[issue41670] Windows and Linux execute the same code differently

2020-08-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +Mark.Shannon, pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39349] Add "cancel_futures" parameter to concurrent.futures.Executor.shutdown()

2020-08-30 Thread Kyle Stanley
Kyle Stanley added the comment: Good catch, Shantanu. It was not intentional on my part, and it would make sense to include *cancel_futures* in the base Executor class as documented. If you'd like to submit a PR to add it (attaching it to this issue), I should be able to review it within a

[issue41615] sys.argv may be None or an empty list

2020-08-30 Thread Guido van Rossum
Guido van Rossum added the comment: Got it. On Sun, Aug 30, 2020 at 15:28 Terry J. Reedy wrote: > > > Terry J. Reedy added the comment: > > > > sys.argv cannot be set until sys exists. As I mentioned above, subsequent > calls before finalization must continue to be no-ops. > > > > Code

[issue41670] Windows and Linux execute the same code differently

2020-08-30 Thread Ammar Askar
Ammar Askar added the comment: minimal reproducer without coverage: import sys def f(): try: for i in []: pass return 1 except: return 2 def tracer(frame, event, _): if event == 'line': print("executing line {}".format(frame.f_lineno)) return

[issue41671] inspect.getdoc/.cleandoc doesn't always remove trailing blank lines

2020-08-30 Thread RalfM
New submission from RalfM : Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import inspect >>> def func1(): ... """This is func1. ... """ ... pass ... >>>

[issue41670] Windows and Linux execute the same code differently

2020-08-30 Thread Ned Batchelder
New submission from Ned Batchelder : Coverage.py bug reports https://github.com/nedbat/coveragepy/issues/1022 and https://github.com/nedbat/coveragepy/issues/959 demonstrate the same Python code, with the same disassembly, executing differently. In

[issue41615] sys.argv may be None or an empty list

2020-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: sys.argv cannot be set until sys exists. As I mentioned above, subsequent calls before finalization must continue to be no-ops. Code that depends on a bug, in this case of sys.argv not existing, is always vulnerable. In this case, I would expect that

[issue39349] Add "cancel_futures" parameter to concurrent.futures.Executor.shutdown()

2020-08-30 Thread Shantanu
Shantanu added the comment: I was working on updating typeshed stubs to reflect this change. It looks like the parameter wasn't actually added to the base class (https://github.com/python/cpython/blob/c3a651ad2544d7d1be389b63e9a4a58a92a31623/Lib/concurrent/futures/_base.py#L608), even

[issue28724] Add method send_io, recv_io to the socket module.

2020-08-30 Thread Shantanu
Shantanu added the comment: I was looking at adding stubs for these to typeshed. Is it intentional that we ignore the flags and address arguments in the implementation? -- nosy: +hauntsaninja ___ Python tracker

[issue41669] Case mismatch between "include" and "Include"

2020-08-30 Thread Gregory Szorc
New submission from Gregory Szorc : On Windows, `sysconfig.get_path('include')` returns `Include` (capital I). However, the actual installation path is `include` (lowercase i). I believe the reason for the case mismatch is in this code in PC/layout/main.py: ``` if ns.include_dev:

[issue41668] Expose eventfd for high-performance event notifier in Linux

2020-08-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +21122 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22022 ___ Python tracker

[issue41668] Expose eventfd for high-performance event notifier in Linux

2020-08-30 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : The eventfd system calls can allow us to implement some Linux-specific high performance version of some event notifier abstractions in the standard library. eventfd() creates an "eventfd object" that can be used as an event wait/notify mechanism

[issue41667] The python PEG generator incorrectly handles empty sequences in gather rules

2020-08-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +21121 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22021 ___ Python tracker

[issue41667] The python PEG generator incorrectly handles empty sequences in gather rules

2020-08-30 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : Currently, empty sequences in gather rules make the conditional for gather rules fail as empty sequences evaluate as "False". We need to explicitly check for "None" (the failure condition) to avoid false negatives. -- messages: 376129 nosy:

[issue41654] Segfault when raising MemoryError

2020-08-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The problem is that the deallocator of MemoryError class is not taking into account subclasses for the freelist management, but the allocator (tp_new) is. -- ___ Python tracker

[issue39994] pprint handling of dict subclasses that override __repr__

2020-08-30 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41344] SharedMemory crash when size is 0

2020-08-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 38e32872eb3cf0dc9dd8cef9b05e47ba03638d34 by Miss Islington (bot) in branch '3.8': bpo-41344: Raise ValueError when creating shared memory of size 0 (GH-21556) (GH-22019)

[issue41344] SharedMemory crash when size is 0

2020-08-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41344] SharedMemory crash when size is 0

2020-08-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks for the report and the PR, vinay0410! -- ___ Python tracker ___ ___

[issue41344] SharedMemory crash when size is 0

2020-08-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset ca55ecbf9aab305fa301ec69410ca3d3d18ec848 by Miss Islington (bot) in branch '3.9': bpo-41344: Raise ValueError when creating shared memory of size 0 (GH-21556) (GH-22018)

[issue41654] Segfault when raising MemoryError

2020-08-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch nosy: +pablogsal nosy_count: 4.0 -> 5.0 pull_requests: +21120 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22020 ___ Python tracker

[issue37168] small_ints[] modified (third party C-extension?)

2020-08-30 Thread Tim Peters
Tim Peters added the comment: Closing, since it remains a unique report and there hasn't been another word about it in over a year. -- resolution: -> works for me stage: -> resolved status: pending -> closed ___ Python tracker

[issue37168] small_ints[] modified (third party C-extension?)

2020-08-30 Thread Stefan Krah
Stefan Krah added the comment: If nothing has been diagnosed, I suggest closing this. -- status: open -> pending ___ Python tracker ___

[issue37168] small_ints[] modified (third party C-extension?)

2020-08-30 Thread Stefan Krah
Change by Stefan Krah : -- title: Decimal divisions sometimes 10x or 100x too large -> small_ints[] modified (third party C-extension?) ___ Python tracker ___

[issue41344] SharedMemory crash when size is 0

2020-08-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +21119 pull_request: https://github.com/python/cpython/pull/22019 ___ Python tracker ___

[issue41344] SharedMemory crash when size is 0

2020-08-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 475a5fbb5644ea200c990d85d8c264e78ab6c7ea by Vinay Sharma in branch 'master': bpo-41344: Raise ValueError when creating shared memory of size 0 (GH-21556) https://github.com/python/cpython/commit/475a5fbb5644ea200c990d85d8c264e78ab6c7ea

[issue41344] SharedMemory crash when size is 0

2020-08-30 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +21118 pull_request: https://github.com/python/cpython/pull/22018 ___ Python tracker

[issue41615] sys.argv may be None or an empty list

2020-08-30 Thread Guido van Rossum
Guido van Rossum added the comment: Something just occurred to me. What if the caller has already set says.argv? We shouldn’t overwrite it. Or what if they only set it (later) if not already set. Would we break their code? -- --Guido (mobile) --

[issue39994] pprint handling of dict subclasses that override __repr__

2020-08-30 Thread Irit Katriel
Irit Katriel added the comment: Thank you Serhiy. This ticket can be closed now. -- ___ Python tracker ___ ___ Python-bugs-list

[issue18417] urlopen() has a hidden default for its timeout argument

2020-08-30 Thread Facundo Batista
Change by Facundo Batista : -- nosy: -facundobatista ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37168] Decimal divisions sometimes 10x or 100x too large

2020-08-30 Thread Facundo Batista
Change by Facundo Batista : -- nosy: -facundobatista ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41654] Segfault when raising MemoryError

2020-08-30 Thread hai shi
hai shi added the comment: Hm, Looks like we need check the double free risk of `Py_DECREF()`. -- ___ Python tracker ___ ___

[issue41615] sys.argv may be None or an empty list

2020-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I had the same idea late last night, though after 20 years, I have forgotten how to spell "['']" in C. (Is some sort of allocation or declaration required?). In the doc, change "It does not set sys.argv; use PySys_SetArgvEx() for that." to "It initializes

[issue39994] pprint handling of dict subclasses that override __repr__

2020-08-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 582f13786bb75c73d609790967fea03a5b50148a by Irit Katriel in branch 'master': bpo-39994: Fix pprint handling of dict subclasses that override __repr__ (GH-21892)

[issue40153] json dump with repeated key

2020-08-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: This module has been heavily used in the real world and we have no evidence that there is an actual problem to be solved. Marking this as closed. If a real world issue does arise, feel free to reopen and we can consider extending the API to have a

[issue41637] Calling with an infinite number of parameters is not detected

2020-08-30 Thread Camion
Camion added the comment: I understand all that. But the problem is that it should crash the program and not the interpreter. -- ___ Python tracker ___

[issue40486] pathlib's iterdir doesn't specify what happens if directory content change

2020-08-30 Thread Facundo Batista
Facundo Batista added the comment: However, Serhiy, `os.listdir()` builds a list quickly and gives you that, so the chance of the directory being modified is quite low (however, for big directories, that may happen, and it's probably good to notice that in the docs). For `Path.iterdir()`

[issue15947] Assigning new values to instance of pointer types does not check validity

2020-08-30 Thread Facundo Batista
Facundo Batista added the comment: I'm closing this, it looks to me that behaviour changed and this is safe now. -- stage: -> resolved status: open -> closed ___ Python tracker

[issue35228] Index search in CHM help crashes viewer

2020-08-30 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: Had the same problem for years and wondered why nobody else complained. Still reproducable with Win 10 Pro 2004, Python 3.8, cp1252 locale. Deleting hh.dat did not solve the problem for me. -- nosy: +cito

[issue40153] json dump with repeated key

2020-08-30 Thread Facundo Batista
Facundo Batista added the comment: The balance here is allow an invalid JSON to be created (but documenting that on some situations that will happen), or sticking to always produce valid JSONs, but with a hit in performance (which we don't know so far if it's big or small). --

[issue39102] Increase Enum performance

2020-08-30 Thread jack1142
Change by jack1142 : -- nosy: +jack1142 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41615] sys.argv may be None or an empty list

2020-08-30 Thread Guido van Rossum
Guido van Rossum added the comment: I think it’s reasonable to expect sys.argv to have at least one item, possibly empty. The proposed fix of setting it to [“”] seems right to me. -- --Guido (mobile) -- ___ Python tracker

[issue41402] email: ContentManager.set_content calls nonexistent method encode() on bytes

2020-08-30 Thread Johannes Reiff
Johannes Reiff added the comment: It has been almost a month since the last update, so pinging as suggested in the Developer's Guide. Do I need to do something before the PR can be merged? -- ___ Python tracker

[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2020-08-30 Thread Ben Darnell
Ben Darnell added the comment: I've posted a pull request with a test and fix: https://github.com/python/cpython/pull/22017. It's a more targeted fix than cmeyer's PR (which I didn't even notice until now due to unfamiliarity with the BPO UI) --

[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2020-08-30 Thread Ben Darnell
Change by Ben Darnell : -- pull_requests: +21117 pull_request: https://github.com/python/cpython/pull/22017 ___ Python tracker ___

[issue41666] fix

2020-08-30 Thread Steven D'Aprano
Steven D'Aprano added the comment: I agree with xtreak. I guess you probably misspelled the initial word: >>> 'Python'[2:5] # same as the tutorial 'tho' >>> 'Pyhton'[2:5] # misspelling 'hto' -- nosy: +steven.daprano ___ Python tracker

[issue41615] sys.argv may be None or an empty list

2020-08-30 Thread Jason R. Coombs
Jason R. Coombs added the comment: One possible option to guarantee initialization could be for PyInitialize to always call PySys_SetArgvEx(1, [""], 0), providing a default value for embedded interpreters that fail to call it. -- ___ Python

[issue41666] fix

2020-08-30 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Closing this as not a bug since the example seems to be correct. Feel free to reopen with more details if needed. -- nosy: +xtreak resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue41666] fix

2020-08-30 Thread M-o-T
Change by M-o-T : -- title: Problem in tutorial/introduction.html#strings -> fix ___ Python tracker ___ ___ Python-bugs-list

[issue41666] Problem in tutorial/introduction.html#strings

2020-08-30 Thread M-o-T
Change by M-o-T : -- nosy: -mohammadtavakoli1378 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41666] Problem in tutorial/introduction.html#strings

2020-08-30 Thread M-o-T
New submission from M-o-T : Hi, I found a problem with this address https://docs.python.org/3/tutorial/introduction.html#strings In here >>> word[0:2] # characters from position 0 (included) to 2 (excluded) 'Py' >>> word[2:5] # characters from position 2 (included) to 5 (excluded) 'tho' In

[issue41524] PyOS_mystricmp advances pointers too far

2020-08-30 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 85ca9c049c5a490d143d28933bbb02ab80394ed8 by Miss Islington (bot) in branch '3.8': bpo-41524: fix pointer bug in PyOS_mystr{n}icmp (GH-21845) (GH-22016) https://github.com/python/cpython/commit/85ca9c049c5a490d143d28933bbb02ab80394ed8 --

[issue41524] PyOS_mystricmp advances pointers too far

2020-08-30 Thread Dong-hee Na
Dong-hee Na added the comment: Thanks William -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41524] PyOS_mystricmp advances pointers too far

2020-08-30 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 901c2eae6e27ee7793e5a3c638664e01a3bf8de8 by Miss Islington (bot) in branch '3.9': bpo-41524: fix pointer bug in PyOS_mystr{n}icmp (GH-21845) (GH-21978) https://github.com/python/cpython/commit/901c2eae6e27ee7793e5a3c638664e01a3bf8de8 --

[issue41524] PyOS_mystricmp advances pointers too far

2020-08-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +21116 pull_request: https://github.com/python/cpython/pull/22016 ___ Python tracker ___

[issue41665] Empty

2020-08-30 Thread Damien Ruiz
New submission from Damien Ruiz : Didn't mean to create this and can't delete. -- stage: -> resolved status: open -> closed title: Function called -> Empty ___ Python tracker

[issue41665] Function called

2020-08-30 Thread Damien Ruiz
Change by Damien Ruiz : -- nosy: x_0euf priority: normal severity: normal status: open title: Function called ___ Python tracker ___