[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please don't use PyDict_GetItemString(), it will be deprecated. You can use _PyDict_GetItemStringWithError(). Also always check the raised exception type before overwriting the exception, so you will not swallow MemoryError or other unexpected error.

[issue42006] Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId

2020-11-23 Thread hongweipeng
Change by hongweipeng : -- nosy: +hongweipeng nosy_count: 2.0 -> 3.0 pull_requests: +22374 pull_request: https://github.com/python/cpython/pull/23487 ___ Python tracker ___

[issue42299] Add test_formatter (or remove deprecated formatter module?)

2020-11-23 Thread Christian Heimes
Christian Heimes added the comment: The formatter has been deprecated for a long time. It's been issuing a DeprecationWarning on import since 3.5. Let's remove it. -- nosy: +christian.heimes ___ Python tracker

Re: Python Error

2020-11-23 Thread Gisle Vanem
Barry Scott wrote: If you have python from python.org installed you should be able to list all the version you have installed with the command: py -0 When was that '-0' feature added? I have Python 3.6 from Python.org and here a 'py.exe -0' gives: Requested Python version (0) not

[issue41100] Support macOS 11 and Apple Silicon Macs

2020-11-23 Thread Ned Deily
Ned Deily added the comment: New changeset 96d906b144e6e6aa96c5ffebecbcc5d38034bbda by Miss Islington (bot) in branch '3.9': bpo-41100: in test_platform, ignore 10.16 (GH-23485) (GH-23486) https://github.com/python/cpython/commit/96d906b144e6e6aa96c5ffebecbcc5d38034bbda --

[issue41100] Support macOS 11 and Apple Silicon Macs

2020-11-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +22373 pull_request: https://github.com/python/cpython/pull/23486 ___ Python tracker ___

[issue41100] Support macOS 11 and Apple Silicon Macs

2020-11-23 Thread Ned Deily
Ned Deily added the comment: New changeset c0c23ea72b76b06b7db0d09415fa90bab8ded63a by Ned Deily in branch 'master': bpo-41100: in test_platform, ignore 10.16 (GH-23485) https://github.com/python/cpython/commit/c0c23ea72b76b06b7db0d09415fa90bab8ded63a --

[issue41100] Support macOS 11 and Apple Silicon Macs

2020-11-23 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +22372 pull_request: https://github.com/python/cpython/pull/23485 ___ Python tracker ___

[issue42410] Raise a pickleError when convert _functools module to use PyType_FromModuleAndSpec

2020-11-23 Thread hai shi
hai shi added the comment: > It looks like you imported the functools module twice and have two different > classes functools.partial. When you try to import one of them, you found the > other one. You are right. Serhiy:) The key point is `import_helper.import_fresh_module()`. ``` import

[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Eric. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-23 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-23 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think the readability of the examples would be improved by triple quotes. In fact, I think it would be reduced. -- nosy: +eric.smith ___ Python tracker

[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-23 Thread Peter Norvig
New submission from Peter Norvig : In the itertools recipes ( https://docs.python.org/3/library/itertools.html#itertools-recipes ) there are 21 functions that have single-quote docstrings. These should be changed to triple-quotes, as mandated in PEP 257. -- messages: 381704 nosy:

[issue34394] Descriptors HowTo doesn't mention __set_name__

2020-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: For the record, __set_name__ isn't specific to descriptors. It can be used with any class: >>> class A: def __set_name__(*args): print(args) >>> class B: x = A() y = A()

[issue41100] Support macOS 11 and Apple Silicon Macs

2020-11-23 Thread miss-islington
miss-islington added the comment: New changeset 3266991e721286e942125350ca41e1403d8384d6 by Miss Islington (bot) in branch '3.9': bpo-41100: minor build installer fixes (GH-23480) https://github.com/python/cpython/commit/3266991e721286e942125350ca41e1403d8384d6 --

[issue41100] Support macOS 11 and Apple Silicon Macs

2020-11-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +22371 pull_request: https://github.com/python/cpython/pull/23484 ___ Python tracker ___

[issue41100] Support macOS 11 and Apple Silicon Macs

2020-11-23 Thread Ned Deily
Ned Deily added the comment: New changeset 936533ca0415c40dc64ccb5f8857720f32b3fcb4 by Ned Deily in branch 'master': bpo-41100: minor build installer fixes (GH-23480) https://github.com/python/cpython/commit/936533ca0415c40dc64ccb5f8857720f32b3fcb4 --

[issue42448] re.findall have different match result against re.search or re.sub

2020-11-23 Thread 赵豪杰
赵豪杰 <1292756...@qq.com> added the comment: AhAh, got it, I misunderstood the usage, the findall returns tuple of groups the expression set. Thanks @serhiy.storchaka @rhettinger -- resolution: -> not a bug stage: -> resolved status: open -> closed

[issue41100] Support macOS 11 and Apple Silicon Macs

2020-11-23 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +22370 pull_request: https://github.com/python/cpython/pull/23480 ___ Python tracker ___

[issue42449] Adding number to a declared 2 dimension list

2020-11-23 Thread Eric V. Smith
Eric V. Smith added the comment: This isn't a bug. All of your nested lists are the same. See for example: https://stackoverflow.com/questions/44195396/initializing-an-m-x-n-array-of-0s-in-python -- components: -Regular Expressions nosy: +eric.smith resolution: -> not a bug stage:

Re: Python Error

2020-11-23 Thread Mayukh Chakraborty via Python-list
Hi, I have solved the issue by updating the Environment variables, now I am able to launch 'py' from the command prompt. However, I can't launch 'python' from command prompt. I am also encountering an issue when I try to execute the 'python' command from command prompt. I had reinstalled the

[issue42449] Adding number to a declared 2 dimension list

2020-11-23 Thread void abuser
New submission from void abuser : So basically the bug that I found was about adding a number to a sub-list. If you declare li1 as li1=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]] in the code below then the code is working as it should do. Although if you create the list called li1 with the same

[issue42422] Py_Decref on value crash the interpreter in Python/ceval.c:1104

2020-11-23 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > do you think this is too similar to bogus_code_obj.py? That's the only > crasher I can see it being similar to. As far as I assume, yes, that is the generic VM crasher via custom code object execution. I feel its existence is good enough to answer to

Re: Python Error

2020-11-23 Thread Mayukh Chakraborty via Python-list
Hi Terry, 1. The command py doesn't work. It gives me the error below : C:\Users\mchak>pyFatal Python error: init_sys_streams: can't initialize sys standard streamsPython runtime state: core initializedAttributeError: module 'io' has no attribute 'open' Current thread 0x8290 (most recent

[issue42445] Assertion in run_coroutine_threadsafe

2020-11-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: Transferring the loop instance between threads is not safe. You should create a loop and after that call run_forever() in the same thread. Or, even better, call asynxio.run() in a thread. -- ___ Python tracker

Re: Python Error

2020-11-23 Thread Mayukh Chakraborty via Python-list
1. The command 'py' doesn't work. It gives me the error below : C:\Users\mchak>pyFatal Python error: init_sys_streams: can't initialize sys standard streamsPython runtime state: core initializedAttributeError: module 'io' has no attribute 'open' Current thread 0x8290 (most recent call

[issue35498] Parents objects in pathlib.Path don't support slices as __getitem__ arguments

2020-11-23 Thread Paul Ganssle
Paul Ganssle added the comment: New changeset 79d2e62c008446fbbc6f264bb8a30e2d38b6ff58 by Yaroslav Pankovych in branch 'master': Added support for negative indexes to PurePath.parents (GH-21799) https://github.com/python/cpython/commit/79d2e62c008446fbbc6f264bb8a30e2d38b6ff58 --

[issue21041] pathlib.PurePath.parents rejects negative indexes

2020-11-23 Thread Paul Ganssle
Paul Ganssle added the comment: New changeset 79d2e62c008446fbbc6f264bb8a30e2d38b6ff58 by Yaroslav Pankovych in branch 'master': Added support for negative indexes to PurePath.parents (GH-21799) https://github.com/python/cpython/commit/79d2e62c008446fbbc6f264bb8a30e2d38b6ff58 --

[issue42410] Raise a pickleError when convert _functools module to use PyType_FromModuleAndSpec

2020-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks like you imported the functools module twice and have two different classes functools.partial. When you try to import one of them, you found the other one. -- nosy: +serhiy.storchaka ___ Python tracker

[issue18212] No way to check whether Future is finished?

2020-11-23 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42448] re.findall have different match result against re.search or re.sub

2020-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: When groups are present in the regex, findall() returns the subgroups rather than the entire match: >>> mo = re.search('(12)+', '121212 and 121212') >>> mo[0] # Entire match '121212' >>> mo[1] # Group

[issue42446] Assertion error os.path.exists(pyc_path) while building Python 3.8.6 with-ensurepip

2020-11-23 Thread Thoradia Quack
Thoradia Quack added the comment: I build Python with the LibreELEC toolchain. I removed the --disable-pyc-build and a patch to generate legacy bytecode. That fixed the issue. Thank you for the fast answer and for pointing me to the solution. Closing. -- stage: -> resolved status:

[issue42436] Google use wrong "hightlight" argument

2020-11-23 Thread Eric V. Smith
Change by Eric V. Smith : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42448] re.findall have different match result against re.search or re.sub

2020-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks correct to me. Of course, the result is different, because they are different functions. re.match() and re.search() return a match object (or None), and re.findall returns a list. What result did you expect? -- nosy: +serhiy.storchaka

[issue42448] re.findall have different match result against re.search or re.sub

2020-11-23 Thread 赵豪杰
New submission from 赵豪杰 <1292756...@qq.com>: ``` >>> import re >>> text = '121212 and 121212' >>> pattern = '(12)+' >>> print(re.findall(pattern, text)) ['12', '12'] >>> >>> >>> print(re.search(pattern, text)) >>> >>> >>> print(re.sub(pattern, '', text)) and # The re.findall have

[issue42443] Provide Thread creation hook support

2020-11-23 Thread Gregory P. Smith
Change by Gregory P. Smith : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42443] Provide Thread creation hook support

2020-11-23 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42422] Py_Decref on value crash the interpreter in Python/ceval.c:1104

2020-11-23 Thread Eric V. Smith
Eric V. Smith added the comment: @BTaskaya: do you think this is too similar to bogus_code_obj.py? That's the only crasher I can see it being similar to. -- versions: +Python 3.10 -Python 3.6, Python 3.7 ___ Python tracker

Re: Python Error

2020-11-23 Thread Terry Reedy
On 11/23/2020 9:10 AM, Mayukh Chakraborty via Python-list wrote: Hi, I had uninstalled and installed Python in Windows 10 but I am getting the error below. Can you please help ? C:\Users\mchak>python Fatal Python error: init_sys_streams: can't initialize sys standard streams Python runtime

[issue42446] Assertion error os.path.exists(pyc_path) while building Python 3.8.6 with-ensurepip

2020-11-23 Thread Thoradia Quack
Thoradia Quack added the comment: I get the same error when I build without -disable-pyc-build. I could create the missing directory if only I knew what directory ensurepip is expecting. -- ___ Python tracker

[issue42429] Behavior of general (%g, :g) formatting inconsistent for decimal.Decimal

2020-11-23 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a first draft of proposed re-wording for the 'e', 'f' and 'g' sections of the table in the general format-specification mini-language docs. (I started making a PR, but got too annoyed with the mechanics of editing reStructuredText tables.) 'e':

Re: Python Error

2020-11-23 Thread Barry Scott
> On 23 Nov 2020, at 14:10, Mayukh Chakraborty via Python-list > wrote: > > Hi, > I had uninstalled and installed Python in Windows 10 but I am getting the > error below. Can you please help ? > C:\Users\mchak>pythonFatal Python error: init_sys_streams: can't initialize > sys standard

[issue42447] robotsparser deny all with some rules

2020-11-23 Thread Net Offensive
Net Offensive added the comment: Sorry if my message is not clear enough. I will ask my developer to come and complete the information if needed. -- ___ Python tracker ___

[issue42429] Behavior of general (%g, :g) formatting inconsistent for decimal.Decimal

2020-11-23 Thread Mark Dickinson
Mark Dickinson added the comment: There's also #39096. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42447] robotsparser deny all with some rules

2020-11-23 Thread Net Offensive
New submission from Net Offensive : Bonjour, Notre développeur a un soucis avec l'utilisation de cette librairie. Dans le cadre d'un projet SEO, nous souhaiterions scrapper les pages de notre réseau de site. Nous avons essayé de tester avec l'un de nos site dont les pages se présentent

[issue42429] Behavior of general (%g, :g) formatting inconsistent for decimal.Decimal

2020-11-23 Thread Mark Dickinson
Mark Dickinson added the comment: Some references after a bit of tracker digging: - #7098 is the original issue where the behaviour was considered. - #23460 is related, and _did_ result in a documentation change, but that documentation change didn't say anything about preserving trailing

[issue42446] Assertion error os.path.exists(pyc_path) while building Python 3.8.6 with-ensurepip

2020-11-23 Thread Christian Heimes
Christian Heimes added the comment: Your problem could be related to --disable-pyc-build. It sounds like it disables pyc compilation, which may explain the exception. --disable-pyc-build is not supported by official releases of Python. Are you building Python with additional

[issue42446] Assertion error os.path.exists(pyc_path) while building Python 3.8.6 with-ensurepip

2020-11-23 Thread Thoradia Quack
New submission from Thoradia Quack : I try building Python 3.8.6 with-ensurepip (see configuration below) but this fails with an assertion error (see error below). I do not understand the error and I do not know how to fix it. For what it is worth, I used to successfully build Python 3.8.5

[issue42373] PEP 626 does not specify behavior of tracing for keywords.

2020-11-23 Thread Mark Shannon
Mark Shannon added the comment: https://github.com/python/peps/pull/1722/ -- ___ Python tracker ___ ___ Python-bugs-list mailing

Python Error

2020-11-23 Thread Mayukh Chakraborty via Python-list
Hi, I had uninstalled and installed Python in Windows 10 but I am getting the error below. Can you please help ? C:\Users\mchak>pythonFatal Python error: init_sys_streams: can't initialize sys standard streamsPython runtime state: core initializedAttributeError: module 'io' has no attribute

[issue42349] Compiler front-end produces a broken CFG

2020-11-23 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue21041] pathlib.PurePath.parents rejects negative indexes

2020-11-23 Thread Yaroslav Pankovych
Yaroslav Pankovych added the comment: Agree with that, it currently supports this behavior. -- ___ Python tracker ___ ___

[issue15450] Allow dircmp.subdirs to behave well under subclassing

2020-11-23 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.4 ___ Python tracker ___

[issue15450] Allow dircmp.subdirs to behave well under subclassing

2020-11-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 2f2f9d0b5c96e68ed91cddd6673860ee752eb49c by Nick Crews in branch 'master': bpo-15450: Allow subclassing of dircmp (GH-23424) (#23424) https://github.com/python/cpython/commit/2f2f9d0b5c96e68ed91cddd6673860ee752eb49c -- nosy: +asvetlov

[issue42443] Provide Thread creation hook support

2020-11-23 Thread Thomas Wouters
Change by Thomas Wouters : -- nosy: +gregory.p.smith, twouters ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue31842] pathlib: "Incorrect function" during resolve()

2020-11-23 Thread christopher.pickering
christopher.pickering added the comment: Hi, is there a status update on this issue? Thanks! -- nosy: +christopherpickering ___ Python tracker ___

[issue42410] Raise a pickleError when convert _functools module to use PyType_FromModuleAndSpec

2020-11-23 Thread hai shi
hai shi added the comment: > You should analyze why "cls != obj" conditon is true: why cls is not obj? You are right. I am in the wrong way definitely. It's weird to me.I try to figure it out in this week~ -- ___ Python tracker

[issue42445] Assertion in run_coroutine_threadsafe

2020-11-23 Thread Jochen Kienzle
New submission from Jochen Kienzle : Hello, in my implementation I want to call mqtt_client.publish_json from a sync method: - def __on_event(self, ev): ... asyncio.run_coroutine_threadsafe(self.mqtt_client.publish_json(INGESTION_TOPIC, msg),

[issue42444] pathlib.PurePath properties annotated with .. data directive

2020-11-23 Thread Paul Ganssle
New submission from Paul Ganssle : Currently, it seems that the pathlib module uses `.. data::` to annotate the properties of the PurePath type (e.g. .parts, .drive, .root, etc). See: https://github.com/python/cpython/blob/ff420f0e08a2443339da0df7ace95e14177bac53/Doc/library/pathlib.rst

[issue42443] Provide Thread creation hook support

2020-11-23 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +22369 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23477 ___ Python tracker

[issue42443] Provide Thread creation hook support

2020-11-23 Thread Piotr Stanczyk
New submission from Piotr Stanczyk : For monitoring purposes we would like to have a way of registering newly created Python threads with a runtime. For that reason we ask to add a thread creation hook inside threading.py. There are 2 similar hooks already (_profile_hook and _trace_hook).

[issue42102] Make builtins.callable "generic"

2020-11-23 Thread Guido van Rossum
Guido van Rossum added the comment: No, they both have a different meaning. Object has (almost) no attributes. Any has all attributes. -- ___ Python tracker ___

[issue21041] pathlib.PurePath.parents rejects negative indexes

2020-11-23 Thread Paul Ganssle
Paul Ganssle added the comment: I think you may have confused my thoughts as to why this might be considered ambiguous with an actual suggestion for what the semantics should be. I think that we should stick with `p.parents[x] == tuple(p.parents)[x]` for any valid value of `x`, which means

[issue42299] Add test_formatter (or remove deprecated formatter module?)

2020-11-23 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +22368 pull_request: https://github.com/python/cpython/pull/23476 ___ Python tracker ___

[issue42299] Add test_formatter (or remove deprecated formatter module?)

2020-11-23 Thread Dong-hee Na
Dong-hee Na added the comment: > If so, the patch, aDo we still want to remove formatted IMHO, 3.10 is a good time to remove formatter -- nosy: +corona10 ___ Python tracker

[issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore

2020-11-23 Thread Tal Einat
Tal Einat added the comment: Thanks for the report, Michael! Thanks for the fix, Irit! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.8, Python 3.9 ___ Python tracker

[issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore

2020-11-23 Thread Tal Einat
Tal Einat added the comment: New changeset ff420f0e08a2443339da0df7ace95e14177bac53 by Irit Katriel in branch 'master': bpo-28850: Fix PrettyPrinter.format overrides ignored for contents of small containers (GH-22120)

[issue42429] Behavior of general (%g, :g) formatting inconsistent for decimal.Decimal

2020-11-23 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. I'm not sure that it ever got documented properly. There may still be an open documentation issue somewhere. There's not really much wiggle-room for changing the implementation: the behaviour of the "g" formatting for Decimal objects is following the

[issue42442] Tarfile to stdout documentation example

2020-11-23 Thread Ian Laughlin
New submission from Ian Laughlin : Recommend adding example to tarfile documentation to provide example of writing a tarfile to stdout. example: files = [(file_1, filename_1), (file_2, filename_2)] with tarfile.open(fileobj=sys.stdout.buffer, mode = 'w|gz') as tar: for file, filename

[issue42376] Add helpers to populate modules in C

2020-11-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42142] test_ttk timeout: FAIL tkinter ttk LabeledScale test_resize, and more

2020-11-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22367 pull_request: https://github.com/python/cpython/pull/23474 ___ Python tracker ___

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2020-11-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka nosy_count: 10.0 -> 11.0 pull_requests: +22364 pull_request: https://github.com/python/cpython/pull/23443 ___ Python tracker

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka, serhiy.storchaka nosy_count: 20.0 -> 21.0 pull_requests: +22365, 22366 pull_request: https://github.com/python/cpython/pull/23443 ___ Python tracker

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka nosy_count: 20.0 -> 21.0 pull_requests: +22365 pull_request: https://github.com/python/cpython/pull/23443 ___ Python tracker

[issue42413] Replace custom exception socket.timeout with TimeoutError

2020-11-23 Thread STINNER Victor
STINNER Victor added the comment: I see this issue as a follow-up of PEP 3151 which started to uniformize IOError, OSError and many variants that we had in Python 2. socket.timeout was introduced as a subclass of TimeoutError according to:

[issue42413] Replace custom exception socket.timeout with TimeoutError

2020-11-23 Thread STINNER Victor
STINNER Victor added the comment: IMHO it's ok that exc.errno is None. It doesn't prevent to write code like: except OSError as exc: if exc.errno == ...: ... else: ... In the early days (first 5 years? :-D) of the asyncio documentation, TimeoutError was documented

[issue42440] MACBOOK Python launcher

2020-11-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: Your message has not enough information to determine what's going on. - How was Python installed? - What version of macOS? - Are you using an M1 system? - Is the problem reproducible with a script that you can share? - ... --

[issue42431] Fix outdated bytes comments

2020-11-23 Thread STINNER Victor
STINNER Victor added the comment: (Sorry, I need more coffee. New attempt.) A C extension must define Py_BUILD_CORE macro or variant to include such header file. There is no intent to technically prevent to include a header file, only an intent to warn users that they should not do that

[issue42431] Fix outdated bytes comments

2020-11-23 Thread STINNER Victor
STINNER Victor added the comment: > Is it true that headers in Include/internal are more private than headers in > Include/cpython? It is not clear from names. You cannot include an header file from Include/internal by default. All internal header files are guarded with: #ifndef

[issue42432] Http client, Bad Status Line triggered for no reason

2020-11-23 Thread sicarius noidea
sicarius noidea added the comment: Alright, that was a bad idea. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue42432] Http client, Bad Status Line triggered for no reason

2020-11-23 Thread Christian Heimes
Christian Heimes added the comment: urllib is a high level API on top of http.client. It wraps and uses http.client internally. urllib does not accept invalid protocol identifiers either: >>> urllib.request.urlopen('http://localhost:8080') Traceback (most recent call last): File "", line

[issue42102] Make builtins.callable "generic"

2020-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could not object replace Any? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42441] UnicodeEncodeError

2020-11-23 Thread Steven D'Aprano
Steven D'Aprano added the comment: You can learn more about unicode and encodings: https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/

[issue42441] UnicodeEncodeError

2020-11-23 Thread Eryk Sun
Eryk Sun added the comment: The default encoding for files in Windows is the process active code page, which defaults to the system code page, e.g. code page 1252 if the system locale is "en-IN". You need to explicitly use a Unicode encoding such as UTF-8 when opening the file, e.g.

[issue21041] pathlib.PurePath.parents rejects negative indexes

2020-11-23 Thread Yaroslav Pankovych
Yaroslav Pankovych added the comment: And it looks like a special case, so "Special cases aren't special enough to break the rules." -- ___ Python tracker ___

[issue42328] ttk style.map function incorrectly handles the default state for element options.

2020-11-23 Thread miss-islington
miss-islington added the comment: New changeset 3e5330130810e485f1abbf192590b7109880a4da by Miss Islington (bot) in branch '3.9': bpo-42328: Fix tkinter.ttk.Style.map(). (GH-23300) https://github.com/python/cpython/commit/3e5330130810e485f1abbf192590b7109880a4da --

[issue42328] ttk style.map function incorrectly handles the default state for element options.

2020-11-23 Thread miss-islington
miss-islington added the comment: New changeset ad49526c80fedf7469bd65b44d8021bab5fb998b by Miss Islington (bot) in branch '3.8': bpo-42328: Fix tkinter.ttk.Style.map(). (GH-23300) https://github.com/python/cpython/commit/ad49526c80fedf7469bd65b44d8021bab5fb998b --

[issue42432] Http client, Bad Status Line triggered for no reason

2020-11-23 Thread sicarius noidea
sicarius noidea added the comment: Hi @christian.heimes, Thank you for your research too. We've also discovered that this check is correct, but this check is very strict and blocking (error raised, stopping the connection), we should maybe be more "laxist" and allow the lowercase version ?

[issue42441] UnicodeEncodeError

2020-11-23 Thread Md Tausif Iqbal
New submission from Md Tausif Iqbal : my application crashes File "c:\users\tausif\appdata\local\programs\python\python38-32\lib\csv.py", line 154, in writerow return self.writer.writerow(self._dict_to_list(rowdict)) File