[issue41926] Unpredictable behavior when parsing xml. (xml.etree.ElementTree.iterparse)

2020-10-04 Thread Джон Смит
New submission from Джон Смит : Data is lost when parsing large files. I have prepared 5 test files for different cases. With their help, I learned that losses are not accidental. In example.xml, when going to iteration 717 (i = 717), the data is lost. In the rest of the files, I learned that

[issue41929] Detect OEM code page for zip archives in ZipFile based on system locale

2020-10-04 Thread Ivan Sorokin
New submission from Ivan Sorokin : ZipFile has problems with filename charset in .zip archives having filenames charset encoded in OEM code page. ZipFile assumes that OEM code page always means "cp437". Actually many popular .zip packers (for example, Windows internal "zip folders" tool) use

[issue41927] Why is there no documentation in Russian?

2020-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Closed as an obvious trolling. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue29394] Cannot tunnel TLS connection through TLS connection

2020-10-04 Thread Carl Bordum Hansen
Change by Carl Bordum Hansen : -- keywords: +patch nosy: +carlbordum nosy_count: 4.0 -> 5.0 pull_requests: +21542 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22539 ___ Python tracker

[issue25292] ssl socket gets into broken state when client exits during handshake

2020-10-04 Thread Carl Bordum Hansen
Change by Carl Bordum Hansen : -- keywords: +patch nosy: +carlbordum nosy_count: 5.0 -> 6.0 pull_requests: +21544 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22541 ___ Python tracker

[issue41875] __builtin_unreachable error in gcc 4.4.5

2020-10-04 Thread Łukasz Langa
Łukasz Langa added the comment: Done. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38302] [3.10] __pow__ and __rpow__ are not reached when __ipow__ returns NotImplemented for **=

2020-10-04 Thread Łukasz Langa
Change by Łukasz Langa : -- title: __pow__ and __rpow__ are not reached when __ipow__ returns NotImplemented for **= -> [3.10] __pow__ and __rpow__ are not reached when __ipow__ returns NotImplemented for **= ___ Python tracker

[issue41926] Unpredictable behavior when parsing xml. (xml.etree.ElementTree.iterparse)

2020-10-04 Thread Джон Смит
Джон Смит added the comment: The file example5.xml could not be loaded, so to generate it, run the generator.py. -- ___ Python tracker ___

[issue41926] Unpredictable behavior when parsing xml. (xml.etree.ElementTree.iterparse)

2020-10-04 Thread Джон Смит
Change by Джон Смит : Added file: https://bugs.python.org/file49490/app.rar ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41929] Detect OEM code page for zip archives in ZipFile based on system locale

2020-10-04 Thread Eryk Sun
Eryk Sun added the comment: This is already addressed in bpo-28080, which adds an `encoding` parameter -- e.g. `encoding="oem"` ("oem" is only available in Windows). Unfortunately bpo-28080 has languished without resolution for four years. -- nosy: +eryksun

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Antoine give me a hint. The problem seems related to using PyDict_GetItem() when look up an attribute in the instance dict. It silences all exceptions (including RecursionError) and this results in silent "no such key in a dict". But since 3.8 it was

[issue41930] Wrap sqlite3_serialize API in sqlite3 module

2020-10-04 Thread Kerrick Staley
New submission from Kerrick Staley : It would be useful to provide a wrapper (in the Python sqlite3 stdlib module) for the sqlite3_serialize API. This API allows you to get a database's content as a byte string, as if you had called open('foo.sqlite3', 'rb').read(). sqlite3_serialize can

[issue41183] [3.5] Workaround or fix for SSL ".._KEY_TOO_SMALL" test failures

2020-10-04 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41931] Make dict(object) return its attribute __dict__

2020-10-04 Thread மனோஜ்குமார் பழனிச்சாமி
மனோஜ்குமார் பழனிச்சாமி added the comment: Will return only if it is not an iterator -- ___ Python tracker ___ ___ Python-bugs-list

[issue41898] Any logging causes assertLogs to pass

2020-10-04 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 ___ Python tracker ___

[issue41898] Any logging causes assertLogs to pass

2020-10-04 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset faa8c6a8f1fe9c3bac31061e8a59a686b983ebb8 by Miss Skeleton (bot) in branch '3.9': bpo-41898: add caveat on root logger seeing all messages in assertLogs doc (GH-22526) (GH-22540)

[issue41933] Wording of s * n in Common Sequence Operations is not optimal

2020-10-04 Thread Julien Palard
New submission from Julien Palard : As reported by Graham Ewart on docs@, in https://docs.python.org/3/library/stdtypes.html#common-sequence-operations: s * n or n * s | equivalent to adding s to itself n times is badly worded. In fact it's more like n-1 times, but yet it's not adding s to

[issue41905] add update_abstractmethods function to update an ABC's abstract methods

2020-10-04 Thread Ben Avrahami
Ben Avrahami added the comment: Implementing this behavior automatically would be more complicated since you would also have to take subclasses into account. Current implementation enforces that the class is unused (as much as can be reasonably done) when its abstraction status is

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2020-10-04 Thread Mark Dickinson
Mark Dickinson added the comment: I interpreted "in the numeric tower" as meaning declared as an abstract method that all those registering with the class would have to implement. As you point out in msg350173, that would be problematic - adding new methods to published interfaces is pretty

[issue41898] Any logging causes assertLogs to pass

2020-10-04 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 1ed54435268b285964141fb74d47ceaa33ea79ab by Irit Katriel in branch 'master': bpo-41898: add caveat on root logger seeing all messages in assertLogs doc (GH-22526) https://github.com/python/cpython/commit/1ed54435268b285964141fb74d47ceaa33ea79ab

[issue41898] Any logging causes assertLogs to pass

2020-10-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +21540 pull_request: https://github.com/python/cpython/pull/22537 ___ Python tracker

[issue41898] Any logging causes assertLogs to pass

2020-10-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +21541 pull_request: https://github.com/python/cpython/pull/22538 ___ Python tracker ___

[issue41898] Any logging causes assertLogs to pass

2020-10-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +21543 pull_request: https://github.com/python/cpython/pull/22540 ___ Python tracker ___

[issue41898] Any logging causes assertLogs to pass

2020-10-04 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset b2611fac05ed391d68f09781903aae7394fab832 by Miss Skeleton (bot) in branch '3.8': bpo-41898: add caveat on root logger seeing all messages in assertLogs doc (GH-22526) (GH-22537)

[issue32222] pygettext doesn't extract docstrings for functions with type annotated params

2020-10-04 Thread Irit Katriel
Irit Katriel added the comment: I think this is resolved and can be closed. -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue21756] IDLE - ParenMatch fails to find closing paren of multi-line statements

2020-10-04 Thread Tal Einat
Tal Einat added the comment: As noted on the PR GH-20753, an incremental change to the current logic doesn't seem like a promising approach. It seems to me that this will require refactoring the code parsing logic to allow it to incrementally parse lines backwards and forwards in order to

[issue41932] Incorrect struct definition with bitfields

2020-10-04 Thread berthin
New submission from berthin : Hi all, I found one issue related to bitfields and ctypes, and although there is a similar issue already opened (https://bugs.python.org/issue29753), that only covers the case with pragmas. Please, consider the following scenario: >>> from ctypes import * >>>

[issue41483] Do not acquire lock in MemoryHandler.flush() if no target defined

2020-10-04 Thread Kostis Anagnostopoulos
Kostis Anagnostopoulos added the comment: Have nothing else to say on top of what iritkatriel discovered, a double-check would be needed, but may be a pointless speed up, if MemoryHandler is impossible to work without a `target`. Fixing the no-target error is more important. Actually

[issue41898] Any logging causes assertLogs to pass

2020-10-04 Thread Irit Katriel
Irit Katriel added the comment: Troy, I'm also confused about how you would have liked assertLogs to behave you say: 1. I don't want to specify the logger because I don't care which logger the message comes from. 2. I don't want it to catch messages from other loggers (whatever other

[issue41905] add update_abstractmethods function to update an ABC's abstract methods

2020-10-04 Thread Bar Harel
Bar Harel added the comment: > When instantiation fails, recheck to see the missing abstract methods had > been defined? I've written about it in the python-ideas discussion as well, and completely agree. There is no other approach that would guarantee correctness across all APIs, both

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +21539 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22536 ___ Python tracker

[issue33533] Provide an async iterator version of as_completed

2020-10-04 Thread Hrvoje Nikšić
Hrvoje Nikšić added the comment: Justin, thanks for updating the PR! I'll take another look at the code. -- ___ Python tracker ___

[issue30578] Misleading example in sys.set_coroutine_wrapper docs

2020-10-04 Thread Carl Bordum Hansen
Carl Bordum Hansen added the comment: I think this can be closed as `sys.set_coroutine_wrapper` was removed in https://bugs.python.org/issue36933 -- nosy: +carlbordum ___ Python tracker

[issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding

2020-10-04 Thread Irit Katriel
Irit Katriel added the comment: This seems resolved, can it be closed? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue41483] Do not acquire lock in MemoryHandler.flush() if no target defined

2020-10-04 Thread Irit Katriel
Irit Katriel added the comment: I think this issue should be closed - Kostis doesn't seem keen to discuss the merits of this change, and as I've said I don't think it's worth pursuing. -- ___ Python tracker

[issue41898] Any logging causes assertLogs to pass

2020-10-04 Thread Irit Katriel
Irit Katriel added the comment: I'm not sure my patch completely resolved this issue. I'm adding Antoine re the OP's question about the assertLogs API. > Doing so would make the test over-specific and fragile. The requirement is > > that a warning be logged, not that a specific logger

[issue25292] ssl socket gets into broken state when client exits during handshake

2020-10-04 Thread Carl Bordum Hansen
Carl Bordum Hansen added the comment: I have submitted a proposed solution Just found this similar issue https://bugs.python.org/issue35840 -- ___ Python tracker ___

[issue41483] Do not acquire lock in MemoryHandler.flush() if no target defined

2020-10-04 Thread Irit Katriel
Irit Katriel added the comment: The missing target error was fixed under issue41503 -- ___ Python tracker ___ ___ Python-bugs-list

[issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding

2020-10-04 Thread Josh Friend
Josh Friend added the comment: yes it should be closed, can i do that? (ill try...) -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2020-10-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > it was added as a concrete method, That still amounts to making it a requirement for all numeric classes, even ones that predate this patch. So existing classes that are registered will no longer comply with the ABC. In general, it's hard to add

[issue41927] Why is there no documentation in Russian?

2020-10-04 Thread Steven D'Aprano
Steven D'Aprano added the comment: Oh no, you have discovered our dirty secret! Python is racist against Russia! /sarcasm Python is created by volunteers, including the documentation. If you want a Russian translation, feel free to start working on one. You could start here:

[issue41931] Make dict(object) return its attribute __dict__

2020-10-04 Thread மனோஜ்குமார் பழனிச்சாமி
Change by மனோஜ்குமார் பழனிச்சாமி : -- nosy: SmartManoj priority: normal severity: normal status: open title: Make dict(object) return its attribute __dict__ type: enhancement versions: Python 3.10 ___ Python tracker

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2020-10-04 Thread Mark Dickinson
Mark Dickinson added the comment: > That still amounts to making it a requirement for all numeric classes How so? I don't follow the reasoning here. -- ___ Python tracker

[issue41927] Why is there no documentation in Russian?

2020-10-04 Thread Борис Лакеев
New submission from Борис Лакеев : Is this a racist policy of the site management? For so much time, not even for 2.7. I'm sure there were a lot of suggestions to add. Aren't you ashamed? -- assignee: docs@python components: Documentation messages: 377930 nosy: docs@python, lakeevboris

[issue41928] ZipFile does not supports Unicode Path Extra Field (0x7075) zip header field

2020-10-04 Thread Ivan Sorokin
New submission from Ivan Sorokin : See attached sample. Well-known unzip command line tool lists its contents correctly: $ unzip -l 23.zip Archive: 23.zip Length DateTimeName - -- - 81408 2012-10-23 19:03 Β' ΦΑΣΗ ΠΕ06 ΣΧΟΛΕΙΑ ΕΑΕΠ (ΙΝΤ).xls

[issue41927] Why is there no documentation in Russian?

2020-10-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: Python is a volunteer-driven project. The documentation translation is provided by champions who does this hard work for free. You can join the team and maintain the Python Russian Translation :) Sorry, to keep the discussion productive I should remind our

[issue41931] Make dict(object) return its attribute __dict__

2020-10-04 Thread Irit Katriel
New submission from Irit Katriel : dict is not a function, it's a class and the purpose of a dict() call is to create a new instance of that class. The change you are proposing is also breaking for iterators: >>> class Pairs(list): pass ... >>> pairs = Pairs([('a', 1), ('b', 2)]) >>>

[issue41928] ZipFile does not supports Unicode Path Extra Field (0x7075) zip header field

2020-10-04 Thread Ivan Sorokin
Ivan Sorokin added the comment: Grand unified algorithm to read filenames from zip files correctly: 1. Do zip entry have «Unicode Path Extra Field» (0x7075)? Use it for file name. 2. Is Unicode flag (0x800) set in «Flags» Field of zip entry? Assume «Filename» Field is in UTF-8. 3. Do «HostOS»

[issue32112] Should uuid.UUID() accept another UUID() instance?

2020-10-04 Thread Irit Katriel
Irit Katriel added the comment: I agree with Serhiy that there needs to be a reason for adding this to a class constructor. In the case of int, this is to implement conversion - it's not accepting int, it's accepting any number (it would be weird of int(3.4) worked and int(3) didn't).

[issue41483] Do not acquire lock in MemoryHandler.flush() if no target defined

2020-10-04 Thread Vinay Sajip
Vinay Sajip added the comment: OK, I'll mark as pending and close in a few days if nothing more is heard from Kostis. -- status: open -> pending ___ Python tracker ___

[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2020-10-04 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 2cc6dc9896771ef3615abbb5ba80939a2f644a08 by Pablo Galindo in branch 'master': bpo-41490: Bump vendored pip to version 20.2.3 (#22527) https://github.com/python/cpython/commit/2cc6dc9896771ef3615abbb5ba80939a2f644a08 --

[issue41428] PEP 604 -- Allow writing union types as X | Y

2020-10-04 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 8e1dd55e63d18d40e78d941fc9233d2c77bcd3de by Fidget-Spinner in branch 'master': bpo-41428: Documentation for PEP 604 (gh-22517) https://github.com/python/cpython/commit/8e1dd55e63d18d40e78d941fc9233d2c77bcd3de -- nosy: +gvanrossum

[issue41428] PEP 604 -- Allow writing union types as X | Y

2020-10-04 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41931] Make dict(object) return its attribute __dict__

2020-10-04 Thread Irit Katriel
Irit Katriel added the comment: You ignored the other point I made: dict is not a function, it is a class. dict() calls the function dict.__init__() which should create a new instance of dict (not return some field of its parameter). You also didn't justify your suggestion in any way. Why

[issue41931] Make dict(object) return its attribute __dict__

2020-10-04 Thread மனோஜ்குமார் பழனிச்சாமி
மனோஜ்குமார் பழனிச்சாமி added the comment: Changing '__dict__' to __vars__ will be much better. Like len() calling __len__() Can we change the title? Why Github Issue Tracker is not issued? -- ___ Python tracker

[issue40640] Tutorial for Continue missing ... line

2020-10-04 Thread Irit Katriel
Irit Katriel added the comment: ping -- nosy: +iritkatriel versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-04 Thread Ned Deily
Ned Deily added the comment: New changeset d5719247ba32b3ac700454bad9a9e2cc7edeac6a by Miss Skeleton (bot) in branch '3.9': bpo-41892: Clarify that an example in the ElementTree docs explicitly avoids modifying an XML tree while iterating over it. (GH-22464) (GH-22554)

[issue41938] concurrent.futures.wait calls len() on an possible iterable

2020-10-04 Thread Kaushal Rohit
Change by Kaushal Rohit : -- keywords: +patch pull_requests: +21553 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22555 ___ Python tracker ___

[issue41931] Make dict(object) return its attribute __dict__

2020-10-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, but I think there is a near zero chance that the language will be revised as you suggest. Marking this as closed. If you want to have more discussion, please take it to the python-ideas maillist. -- resolution: -> rejected stage: ->

[issue41938] concurrent.futures.wait calls len() on an possible iterable

2020-10-04 Thread Kaushal Rohit
New submission from Kaushal Rohit : `fs` argument could be an iterable, and calling len on it would raise an Exception. We are converting `fs` into a set anyways for set difference, and that too twice. we can just put an `fs = set(fs)`. Let me know if we choose to go with that and I will

[issue41912] Long generator chain causes segmentation fault

2020-10-04 Thread Tim Peters
Tim Peters added the comment: "Stackless" is a large topic with a convoluted history. Do the web search. In short, no, it will never go in the core - too disruptive to too many things. Parts have lived on in other ways, watered down versions. The PyPy project captured most of what remains,

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-04 Thread Stefan Behnel
Stefan Behnel added the comment: Closing since this works as designed. Users are responsible for avoiding concurrent tree modifications during iteration. -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___

[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-10-04 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2020-10-04 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +21545 pull_request: https://github.com/python/cpython/pull/22544 ___ Python tracker ___

[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2020-10-04 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 4b4d60f9287e0e52c2569876456f40efc11529b4 by Pablo Galindo in branch '3.9': [3.9] bpo-41490: Bump vendored pip to version 20.2.3 (GH-22527). (GH-22544) https://github.com/python/cpython/commit/4b4d60f9287e0e52c2569876456f40efc11529b4 --

[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2020-10-04 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 28cd96f2e5cfb16566a75dca8473b71889746f10 by Pablo Galindo in branch '3.8': [3.8] bpo-41490: Bump vendored pip to version 20.2.3 (GH-22527). (GH-22545) https://github.com/python/cpython/commit/28cd96f2e5cfb16566a75dca8473b71889746f10 --

[issue41934] Add `has` method to `pathlib.Path` class.

2020-10-04 Thread Hadi Alqattan
Change by Hadi Alqattan : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41934] Add `has` method to `pathlib.Path` class.

2020-10-04 Thread Hadi Alqattan
Hadi Alqattan added the comment: You're right, I'm sorry. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +21548 pull_request: https://github.com/python/cpython/pull/22550 ___ Python tracker ___

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9ece9cd65cdeb0a1f6e60475bbd0219161c348ac by Serhiy Storchaka in branch 'master': bpo-41909: Enable previously disabled recursion checks. (GH-22536) https://github.com/python/cpython/commit/9ece9cd65cdeb0a1f6e60475bbd0219161c348ac --

[issue41936] Remove macros Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION

2020-10-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Macros Py_ALLOW_RECURSION and Py_END_ALLOW_RECURSION together with field recursion_critical of the PyInterpreterState structure were added in 5b222135f8d2492713994f2cb003980e87ce6a72 but were never documented. It seems that the reason of adding them was

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +21551 pull_request: https://github.com/python/cpython/pull/22553 ___ Python tracker

[issue41937] how to use cpython O

2020-10-04 Thread twoone3
New submission from twoone3 <3197653...@qq.com>: When I use'O&' to parse the parameters, I have never succeeded, I hope I can give a demo -- files: Screenshot_2020_1005_070639.png messages: 377983 nosy: twoone3 priority: normal severity: normal status: open title: how to use cpython

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-04 Thread Ned Deily
Ned Deily added the comment: New changeset 40db798692ca783fc2163656f196ac77e8b9e792 by scoder in branch 'master': bpo-41892: Clarify that an example in the ElementTree docs explicitly avoids modifying an XML tree while iterating over it. (GH-22464)

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-04 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +21547 pull_request: https://github.com/python/cpython/pull/22546 ___ Python tracker ___

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2020-10-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > How so? When a concrete class registers with an ABC, it is making a promise that it implements everything in the ABC so that client code can count on all the methods being present. That is the raison d'etre for abstract base classes. In general, we

[issue41934] Add `has` method to `pathlib.Path` class.

2020-10-04 Thread Hadi Alqattan
New submission from Hadi Alqattan : Adding a new method to `pathlib.Path` class, `has` method is a method that can determine if the `Path` object has a specific file/dir or not. Assume that we have a `Path` object for this `project/` directory: ``` project/ main.py __init__.py utils/

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +21549 pull_request: https://github.com/python/cpython/pull/22551 ___ Python tracker ___

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7aa22ba923509af1dbf115c090964f503c84ca8d by Serhiy Storchaka in branch '3.9': [3.9] bpo-41909: Enable previously disabled recursion checks. (GH-22536) (GH-22550)

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 09a7b3b618cd02694a0bc8abfa24c75f0e659407 by Serhiy Storchaka in branch '3.8': [3.8] bpo-41909: Enable previously disabled recursion checks. (GH-22536) (GH-22551)

[issue40640] Tutorial for Continue missing ... line

2020-10-04 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41937] how to use cpython O

2020-10-04 Thread Steven D'Aprano
Steven D'Aprano added the comment: Please don't post screen shots of text when you can post a direct link to the page. Are you talking about this? https://docs.python.org/3/c-api/arg.html?highlight=py_cleanup#other-objects This is a bug tracker, for reporting bugs in the Python interpreter

[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2020-10-04 Thread Łukasz Langa
Łukasz Langa added the comment: This change goes into 3.9.0 with Pablo's fix. -- ___ Python tracker ___ ___ Python-bugs-list

[issue41931] Make dict(object) return its attribute __dict__

2020-10-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: The vars() function already does this. -- nosy: +rhettinger ___ Python tracker ___ ___

[issue41934] Add `has` method to `pathlib.Path` class.

2020-10-04 Thread Eric V. Smith
Eric V. Smith added the comment: Isn't this just: (project_path / "main.py").exists() ? I don't think .has would be any more efficient. -- nosy: +eric.smith ___ Python tracker

[issue41935] Add binary operator!

2020-10-04 Thread Hadi Alqattan
New submission from Hadi Alqattan : What are your opinions about adding a binary operator to Python in order to make this code possible? ``` my_counter = 0 for i in rage(1000): my_counter += 1 if (i % 2) == 0 ``` -- components: Interpreter Core messages: 377976 nosy: hadialqattan

[issue41935] Add binary operator!

2020-10-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: You can already do: my_counter = 0 for i in rage(1000): my_counter += (1 if (i % 2) == 0 else 0) -- nosy: +pablogsal ___ Python tracker

[issue41935] Add binary operator!

2020-10-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: In any case, for modifications about the Python syntax, please, open first some debate in the python-ideas mailing list. -- resolution: -> postponed stage: -> resolved status: open -> closed ___ Python

[issue41925] Lowercase path to python.exe in pip.exe from venv is throwing error

2020-10-04 Thread Eryk Sun
Eryk Sun added the comment: > I wouldn't think that changing locales would have an effect on Windows > paths being case sensitive or not, otherwise folks from other countries > would be experiencing this error. Perhaps the mixing of locale and system > language? I had locale set to Japan but

[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2020-10-04 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +21546 pull_request: https://github.com/python/cpython/pull/22545 ___ Python tracker ___

[issue41931] Make dict(object) return its attribute __dict__

2020-10-04 Thread மனோஜ்குமார் பழனிச்சாமி
மனோஜ்குமார் பழனிச்சாமி added the comment: Your point makes sense as it takes space to allocate for the new instance to just return another dict object. Then the attribute name at least should be meaningful. Instead of __dict__ , __attr__ is more appropriate. --

[issue41905] add update_abstractmethods function to update an ABC's abstract methods

2020-10-04 Thread Ben Avrahami
Ben Avrahami added the comment: > Adding a function to recalculate will require everyone to use it I'd argue that this is akin to `functools.update_wrapper`. It too is a function that must be called in virtually every function decorator (the only function decorators that don't/needn't call

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2020-10-04 Thread Guido van Rossum
Guido van Rossum added the comment: Possibly at some point in the future we can switch to using typing.Protocol, which requires neither registration nor explicit subclassing (it's like Hashable). This makes it easy for user code to define custom protocols as needed. So if you need something

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41925] Lowercase path to python.exe in pip.exe from venv is throwing error

2020-10-04 Thread Chris Tse
Chris Tse added the comment: Another update: After a full shutdown from yesterday and trying again today, everything seems to be working now, including activating the venv via: 1. python -m venv myenv 2. .\myenv\Scripts\activate (not Activate.ps1, though that work too, is this

[issue41936] Remove macros Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION

2020-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +21550 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22552 ___ Python tracker

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-04 Thread miss-islington
miss-islington added the comment: New changeset 6bd058e0ff5d4a63fb35f6d45161cdf51cb68c58 by Miss Skeleton (bot) in branch '3.8': bpo-41892: Clarify that an example in the ElementTree docs explicitly avoids modifying an XML tree while iterating over it. (GH-22464)

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +21552 pull_request: https://github.com/python/cpython/pull/22554 ___ Python tracker ___