[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-16 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- pull_requests: +4 pull_request: https://github.com/python/cpython/pull/23335 ___ Python tracker ___

[issue42383] Pdb does not correclty restart the target if it changes the current directory

2020-11-16 Thread Andrey Bienkowski
Andrey Bienkowski added the comment: I'm working on fixing this -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42384] Inconsistent sys.path between python and pdb

2020-11-16 Thread Andrey Bienkowski
Andrey Bienkowski added the comment: I'll look into fixing this after I fix #42383 -- ___ Python tracker ___ ___ Python-bugs-list

[issue42120] Depreciated MACRO of copysign for MSVC

2020-11-16 Thread miss-islington
miss-islington added the comment: New changeset 2c38e49dba88a39679b2182ca3f5f478d3a3f647 by Miss Islington (bot) in branch '3.9': [3.9] bpo-42120: Remove macro defining copysign to _copysign on Windows (GH-23326) (GH-23331)

[issue42382] No easy way to get the distribution which provided a importlib.metadata.EntryPoint

2020-11-16 Thread Pedro Algarvio
Change by Pedro Algarvio : -- keywords: +patch pull_requests: +2 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23334 ___ Python tracker ___

[issue42384] Inconsistent sys.path between python and pdb

2020-11-16 Thread Andrey Bienkowski
New submission from Andrey Bienkowski : The first entry in sys.path is different between `python foo.py` and `python -m pdb foo.py`. In the former it is the absolute path to the parent directory of foo.py while in the later it is a relative path (unless the debug target was specified using

[issue31121] Unable to exit pdb when script becomes invalid

2020-11-16 Thread Andrey Bienkowski
Andrey Bienkowski added the comment: Another way to reproduce this that will continue to work once #42383 is fixed is to delete or move the script while it's being debugged. -- nosy: +hexagonrecursion ___ Python tracker

[issue42383] Pdb does not correclty restart the target if it changes the current directory

2020-11-16 Thread Andrey Bienkowski
New submission from Andrey Bienkowski : This was mentioned in #31121, but I believe this deserves its own separate issue. If the debug target is specified using a relative path and later the current directory is changed, pdb tries to search for the target in the new current directory. This

[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Thomas
Thomas added the comment: I have simplified the test case a bit more: import multiprocessing.pool, zipfile # Create a ZipFile with two files and same content with zipfile.ZipFile("test.zip", "w", zipfile.ZIP_STORED) as z: z.writestr("file1", b"0"*1) z.writestr("file2",

[issue40383] weakref class name are hardcoded in reprs

2020-11-16 Thread OhBonsai
Change by OhBonsai : -- nosy: -OhBonsai ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42382] No easy way to get the distribution which provided a importlib.metadata.EntryPoint

2020-11-16 Thread Pedro Algarvio
New submission from Pedro Algarvio : With `pkg_resources` an `EntryPoint` has a dist attribute which allows you to get the distribution that provided that specific entry-point, however, with `importlib.metafata` and `importlib_metadata` that's not an east task. ```python

[issue38085] Interrupting class creation in __init_subclass__ may lead to incorrect isinstance() and issubclass() results

2020-11-16 Thread hongweipeng
hongweipeng added the comment: Class `Triffid` failed to create in `__init_subclass__`, so `Triffid._abc_cache` uses its base class `_abc_cache`. -- nosy: +hongweipeng ___ Python tracker

[issue17157] issubclass() should accept iterables in 2nd arg

2020-11-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: except ... is another instance of (exception) class or tuple of classes. -- ___ Python tracker ___

[issue11604] Have type(n,b,d) check for type(b[i]) is module

2020-11-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I cannot anymore remember seeing this. So closing. -- resolution: -> out of date stage: test needed -> resolved status: pending -> closed ___ Python tracker

[issue42335] Python Crashes Exception code 0xc0000374 ntdll.dll

2020-11-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you. Good luck tracking down the problem. -- ___ Python tracker ___ ___ Python-bugs-list

[issue12726] explain that locale.getlocale() does not read system's locales

2020-11-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: locale.getlocale(category=LC_CTYPE) Returns the current setting for the given locale category as sequence containing language code, encoding. category may be one of the LC_* values except LC_ALL. It defaults to LC_CTYPE. Except for the code 'C',

[issue9640] Improved doctest REPORT_*DIFFs with ELLIPSIS and/or NORMALIZE_WHITESPACE

2020-11-16 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Thomas
Thomas added the comment: Scratch what I said in the previous message. I thought that the lock was created in _SharedFile and did not notice that it was passed as a parameter. -- ___ Python tracker

[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-16 Thread miss-islington
miss-islington added the comment: New changeset f03d318ca42578e45405717aedd4ac26ea52aaed by Yurii Karabas in branch 'master': bpo-42345: Fix three issues with typing.Literal parameters (GH-23294) https://github.com/python/cpython/commit/f03d318ca42578e45405717aedd4ac26ea52aaed --

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Let’s make sure this is all written up in whatsnew. -- ___ Python tracker ___ ___

[issue10854] Output .pyd name in error message of ImportError when DLL load fails

2020-11-16 Thread Eryk Sun
Eryk Sun added the comment: > The patch adding 'name' and 'path' to the ImportError str/repr > was not merged yet. It's up to whatever code raises an ImportError to determine how the name and path should be included in the error message. In Windows, the DLL name was added to the exception

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +1 pull_request: https://github.com/python/cpython/pull/2 ___ Python tracker ___

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset b0aba1fcdc3da952698d99aec2334faa79a8b68c by Pablo Galindo in branch 'master': bpo-42381: Allow walrus in set literals and set comprehensions (GH-23332) https://github.com/python/cpython/commit/b0aba1fcdc3da952698d99aec2334faa79a8b68c

[issue42202] Optimize function annotation

2020-11-16 Thread Inada Naoki
Inada Naoki added the comment: > Yes, but the code for creating a dict can be simpler. In any case we will > better see what format is better when try to write a code. Note that many annotations are not accessed. RAM usage of annotation information is important than how easy to create dict.

[issue42287] Use Py_NewRef & Py_XNewRef where applicable

2020-11-16 Thread Yonatan Goldschmidt
Yonatan Goldschmidt added the comment: > I don't see how Py_NewRef() or Py_XNewRef() is less error prone. In my > experience, any change is more likely to introduce new bugs than leaving the > code unchanged. Agree that inserting changes opens a door to introducing bugs. However, the "end

[issue42368] Make set ordered

2020-11-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank for the suggestion. We've considered it a couple of times before but there are downsides that get in the way: * The related mathematical concept of sets is unordered. * It isn't clear what ordering should be returned by set operations like

[issue12726] explain that locale.getlocale() does not read system's locales

2020-11-16 Thread Eryk Sun
Eryk Sun added the comment: > I tried "import locale; locale.getlocale()" on macOS and > windows (3.10) and linux (3.7) and in all cases I got > non-None values. In Windows, starting with Python 3.8, Python sets the LC_CTYPE locale to the user (not system) default locale instead of the

[issue41625] Add splice() to the os module

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

[issue41625] Add splice() to the os module

2020-11-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset a57b3d30f66c90f42da751bf82256b9b22961ed0 by Pablo Galindo in branch 'master': bpo-41625: Expose the splice() system call in the os module (GH-21947) https://github.com/python/cpython/commit/a57b3d30f66c90f42da751bf82256b9b22961ed0

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Okay. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Nagging question — is there sufficient difference between {x := y} and {x: y} > ? I think there is enough distinction, yes. It will also be a bit odd if is allowed in list and list comps but not set and set comps --

[issue14643] Security page out of date

2020-11-16 Thread Irit Katriel
Irit Katriel added the comment: "out of date" is prettier for this one. :) -- resolution: fixed -> out of date ___ Python tracker ___

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: While {(a:='a'): (b:=1)} looks somewhat cleaner to me. -- ___ Python tracker ___ ___

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Not in anything dict please. Nagging question — is there sufficient difference between {x := y} and {x: y} ? -- ___ Python tracker ___

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: > dict comprehension FWIW, unparenthesized walruses are still disallowed in dictcomps and to be honest, I'm not sure if we should allow them or not. I feel that allowing too many colons there would be too noisy. {a:='a': b:=1} doesn't really look too

[issue17157] issubclass() should accept iterables in 2nd arg

2020-11-16 Thread Irit Katriel
Irit Katriel added the comment: Good discussion. There seems to be agreement that this should not be done. -- nosy: +iritkatriel resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The only question left is that if we should allow this on dict literals and dict comprehensions as well (because these constructs have a ":" in the middle that can be noisy if there are walrus, the answer isn't immediately obvious to me). --

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Apparently we currently don't allow walruses in set literals either: >>> {y := 4, 4**2, 3**3} File "", line 1 {y := 4, 4**2, 3**3} ^ SyntaxError: invalid syntax But they should be allowed as well per PEP 572 (as the pep mentions all

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +0 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23332 ___ Python tracker

[issue42120] Depreciated MACRO of copysign for MSVC

2020-11-16 Thread miss-islington
miss-islington added the comment: New changeset 4f54ca07341c656b763c8c71a051f7f86a2a256c by Miss Islington (bot) in branch '3.8': bpo-42120: Remove macro defining copysign to _copysign on Windows (GH-23326) https://github.com/python/cpython/commit/4f54ca07341c656b763c8c71a051f7f86a2a256c

[issue42374] Unparenthesized walrus is not allowed in genexps

2020-11-16 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: New changeset 2b800ef809eefbc96a536e4b43a8285f2353f64d by Lysandros Nikolaou in branch '3.9': bpo-42374: Allow unparenthesized walrus in genexps (GH-23319) (GH-23329) https://github.com/python/cpython/commit/2b800ef809eefbc96a536e4b43a8285f2353f64d

[issue42374] Unparenthesized walrus is not allowed in genexps

2020-11-16 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue10854] Output .pyd name in error message of ImportError when DLL load fails

2020-11-16 Thread Irit Katriel
Irit Katriel added the comment: The patch adding 'name' and 'path' to the ImportError str/repr was not merged yet. -- nosy: +iritkatriel versions: +Python 3.10, Python 3.9 -Python 3.3 ___ Python tracker

[issue14643] Security page out of date

2020-11-16 Thread STINNER Victor
STINNER Victor added the comment: No. I close the issue :) -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue40939] Remove the old parser

2020-11-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > The removals are documented, but the developers who are affected have no clue > what to do. What do you think? Here is difficult to recommend a canonical Path because as I mentioned, there is no replacement for these functions because that

[issue42120] Depreciated MACRO of copysign for MSVC

2020-11-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +22219 pull_request: https://github.com/python/cpython/pull/23331 ___ Python tracker ___

[issue42120] Depreciated MACRO of copysign for MSVC

2020-11-16 Thread Steve Dower
Steve Dower added the comment: New changeset 9cc9e277254023c0ca08e1a9e379fd89475ca9c2 by Steve Dower in branch 'master': bpo-42120: Remove macro defining copysign to _copysign on Windows (GH-23326) https://github.com/python/cpython/commit/9cc9e277254023c0ca08e1a9e379fd89475ca9c2 --

[issue42120] Depreciated MACRO of copysign for MSVC

2020-11-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +22218 pull_request: https://github.com/python/cpython/pull/23330 ___ Python tracker

[issue13962] multiple lib and include directories on Linux

2020-11-16 Thread Irit Katriel
Irit Katriel added the comment: I think the suggestion here is to replace "if MACOS:" with a condition that hold for "unixy" platforms. https://github.com/python/cpython/blob/master/setup.py#L805 (based on https://bugs.python.org/msg150788). -- nosy: +iritkatriel versions: +Python

[issue42374] Unparenthesized walrus is not allowed in genexps

2020-11-16 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- pull_requests: +22217 pull_request: https://github.com/python/cpython/pull/23329 ___ Python tracker ___

[issue42316] Walrus Operator in list index

2020-11-16 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: New changeset cae60187cf7a7b26281d012e1952fafe4e2e97e9 by Lysandros Nikolaou in branch 'master': bpo-42316: Allow unparenthesized walrus operator in indexes (GH-23317) https://github.com/python/cpython/commit/cae60187cf7a7b26281d012e1952fafe4e2e97e9

[issue42374] Unparenthesized walrus is not allowed in genexps

2020-11-16 Thread miss-islington
miss-islington added the comment: New changeset cb3e5ed0716114393696ec7201e51fe0595eab4f by Lysandros Nikolaou in branch 'master': bpo-42374: Allow unparenthesized walrus in genexps (GH-23319) https://github.com/python/cpython/commit/cb3e5ed0716114393696ec7201e51fe0595eab4f --

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, I suppose the comprehensions should all have the same syntax inside their various brackets. -- ___ Python tracker ___

[issue42131] [zipimport] Update zipimport to use specs

2020-11-16 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2020-11-16 Thread Brett Cannon
Change by Brett Cannon : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40939] Remove the old parser

2020-11-16 Thread Miro Hrončok
Miro Hrončok added the comment: Thanks. I feel like the What's new document should teach people what to do when they are hit by the removals. The removals are documented, but the developers who are affected have no clue what to do. What do you think? (Sorry I wasn't able to provide this

[issue14643] Security page out of date

2020-11-16 Thread Irit Katriel
Irit Katriel added the comment: http://www.python.org/news/security/ no longer exists. Is this issue still relevant? -- nosy: +iritkatriel ___ Python tracker ___

[issue42120] Depreciated MACRO of copysign for MSVC

2020-11-16 Thread Steve Dower
Steve Dower added the comment: Turns out a straight delete is fine, as both names are defined in UCRT. I think it's safe to backport as well, since it's only going to affect other people's code poorly (and they'll need to recompile to see any change anyway). -- assignee: ->

[issue42120] Depreciated MACRO of copysign for MSVC

2020-11-16 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +22216 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23326 ___ Python tracker ___

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Lysandros Nikolaou
New submission from Lysandros Nikolaou : Since unparenthesized walruses are allowed in list comprehensions and in generator expressions, should we maybe allow them in set comprehensions as well? -- components: Interpreter Core messages: 381173 nosy: gvanrossum, lys.nikolaou, pablogsal

[issue40939] Remove the old parser

2020-11-16 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: Victor, Miro, both removal of the parser module and of all the C API functions are now documented in the 3.10 whatsnew document. Do you feel that this is enough for us to close this issue again? -- ___ Python

[issue5405] There is no way of determining which ABCs a class is registered against

2020-11-16 Thread Irit Katriel
Change by Irit Katriel : -- type: behavior -> enhancement versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.1 ___ Python tracker ___

[issue42339] official embedded Python fails to import certain modules

2020-11-16 Thread Jelle Geerts
Jelle Geerts added the comment: Thanks to you too, Steve! *tips imaginary hat* -- ___ Python tracker ___ ___ Python-bugs-list

[issue42336] Make PCbuild/build.bat build x64 by default

2020-11-16 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +22215 pull_request: https://github.com/python/cpython/pull/23325 ___ Python tracker ___

[issue5880] Remove unneeded "context" pointer from getters and setters

2020-11-16 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.9 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18838] The order of interactive prompt and traceback on Windows

2020-11-16 Thread Adam Bartoš
Adam Bartoš added the comment: So far I could reproduce the issue on Python 3.7, Windows Vista 64bit. I'll try with newer versions. The output I got: >>> from subprocess import * >>> Popen("py -i foo.py", stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate() (b'', b'>>> Traceback (most recent

[issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x

2020-11-16 Thread Steve Dower
Steve Dower added the comment: Thanks for the patch, Zackery! -- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue10479] cgitb.py should assume a binary stream for output

2020-11-16 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.1, Python 3.2 ___ Python tracker ___ ___

[issue7955] TextIOWrapper Buffering Inconsistent Between _io and _pyio

2020-11-16 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___

[issue42278] Remove usage of tempfile.mktemp in stdlib

2020-11-16 Thread Steve Dower
Steve Dower added the comment: Just left a blocking review on the PR - I don't want to rely on the shell being able to use an already open file. There's at least one other issue about making NamedTemporaryFile work for this case. Once that is done, this can be made to work. --

[issue42380] Build windows binaries with MS VS2019 16.8+ / MSVC 19.28+

2020-11-16 Thread h-vetinari
New submission from h-vetinari : While Visual Studio 16.8 (<-> MSVC 19.28) has _just_ been released, I think it would be worthwhile to consider upgrading the compiler toolchain that's used to build the CPython windows binaries, particularly before the release of 3.10. That's because many

[issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX

2020-11-16 Thread David Edelsohn
David Edelsohn added the comment: I believe that Michael was trying to probe under what circumstances the failure appears. But, not GCC 4.7 is not relevant. -- ___ Python tracker

[issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x

2020-11-16 Thread Steve Dower
Steve Dower added the comment: New changeset f62dad16b8e540486a0a0fed41e723d36986f860 by Zackery Spytz in branch 'master': bpo-38506: Fix the Windows py.exe launcher's misordering of 3.10 (GH-18307) https://github.com/python/cpython/commit/f62dad16b8e540486a0a0fed41e723d36986f860

[issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX

2020-11-16 Thread STINNER Victor
STINNER Victor added the comment: > Back to the bot: AIX 7.1 TL4 SP8 and gcc-4.7.4 The latest GCC version is GCC 10. Is it still relevant to test GCC 4.7 released 8 years ago? (Well, I'm not sure that the C compiler explains all issues.) -- ___

[issue42339] official embedded Python fails to import certain modules

2020-11-16 Thread Steve Dower
Steve Dower added the comment: I added a note to the 3.8 docs. Pretty sure there's another open issue about improving FormatMessage, and if not, one can be opened. Thanks for the report, Jelle, and for helping us figure it out! -- components: +Documentation resolution: -> fixed

[issue42339] official embedded Python fails to import certain modules

2020-11-16 Thread Steve Dower
Steve Dower added the comment: New changeset fa86614078f1f700f350f98486dddf83587ab69e by Steve Dower in branch '3.8': bpo-42339: Adds note about KB2533623 to embeddable package docs (GH-23322) https://github.com/python/cpython/commit/fa86614078f1f700f350f98486dddf83587ab69e --

[issue13561] os.listdir documentation should mention surrogateescape

2020-11-16 Thread STINNER Victor
STINNER Victor added the comment: > I think this was added in another section of this doc. See the second > paragraph in > https://docs.python.org/3/library/os.html#file-names-command-line-arguments-and-environment-variables Right, this section now explains encodings and the error handler.

[issue11604] Have type(n,b,d) check for type(b[i]) is module

2020-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Special cases aren't special enough to break the rules. I think this issue should be closed. This is not common user error, especially in Python 3. I can even imagine that you can subclass module, if it is an instance of special ModuleType subclass. It is

[issue42379] Optional List Args Persist Across Objects

2020-11-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: Hi Rose, this is a FAQ: https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects although it's also a feature that does cause beginners some trouble, see for example my comment here for more information:

[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2020-11-16 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42102] Make builtins.callable "generic"

2020-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We specially introduced __mro_entries__ to make types in the typing module not classes. Turning builtins.callable into a class is a step back. -- ___ Python tracker

[issue42339] official embedded Python fails to import certain modules

2020-11-16 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +22214 pull_request: https://github.com/python/cpython/pull/23322 ___ Python tracker ___

[issue42379] Optional List Args Persist Across Objects

2020-11-16 Thread Eric V. Smith
Eric V. Smith added the comment: This is defined behavior in the language, so it's not a bug. The "pythonic" way to deal with this is usually: def funct(self, array = None): if array is None: array = [] -- components: +Interpreter Core -ctypes nosy: +eric.smith

[issue42379] Optional List Args Persist Across Objects

2020-11-16 Thread Rose Ridder
Rose Ridder added the comment: Sorry, incorrect code pasted in. The full comment and code is below: When creating several objects in one program, if there are lists passed into functions as optional arguments, those lists are persistent across all objects. # -*- coding: utf-8 -*- class

[issue42102] Make builtins.callable "generic"

2020-11-16 Thread Shantanu
Shantanu added the comment: My implementation in PR 22848 turns callable into a type and uses `__new__`. It isn't too bad. It does appear to affect performance of callable though. Here's some data on how often typing imports are used. This is the number of files in which `from typing import

[issue42379] Optional List Args Persist Across Objects

2020-11-16 Thread Rose Ridder
Rose Ridder added the comment: Including script explicitly: # -*- coding: utf-8 -*- class Obj: def __init__(self, num): self.num = num self.var = self.funct() def funct(self, array = []): print (array) array = [1,2,3] return array

[issue42379] Optional List Args Persist Across Objects

2020-11-16 Thread Rose Ridder
New submission from Rose Ridder : When creating several objects in one program, if there are lists passed into functions as optional arguments, those lists are persistent across all objects. -- components: ctypes files: PythonObjectListIssue.py messages: 381153 nosy: rosadenderon

[issue3735] allow multiple threads to efficiently send the same requests to a processing.Pool without incurring duplicate processing

2020-11-16 Thread Irit Katriel
Irit Katriel added the comment: If nobody will object in the next couple of weeks I will close this, as suggested in the previous comment. -- keywords: -needs review nosy: +iritkatriel status: open -> pending ___ Python tracker

[issue42102] Make builtins.callable "generic"

2020-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >From implementation perspective it is not easy at all. You will need to create >a special class with methods __call__ and __getitem__ (and several other >methods and attributes, like __repr__, __reduce__, __name__, __doc__, >__module__,

[issue9261] [doc] include higher (../../) dirs fails

2020-11-16 Thread Christian Heimes
Christian Heimes added the comment: Works as intended. MANINFEST can only include files in the current directory and subdirectories. -- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue9640] Improved doctest REPORT_*DIFFs with ELLIPSIS and/or NORMALIZE_WHITESPACE

2020-11-16 Thread Irit Katriel
Irit Katriel added the comment: The patch needs to be converted into a github PR. Trevor, are you interested in doing that? -- nosy: +iritkatriel ___ Python tracker ___

[issue9261] [doc] include higher (../../) dirs fails

2020-11-16 Thread Irit Katriel
Change by Irit Katriel : -- components: +Documentation -Distutils title: include higher (../../) dirs fails -> [doc] include higher (../../) dirs fails versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6 ___ Python tracker

[issue39463] ast.Constant, bytes, and ast.unparse

2020-11-16 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: We added the warnings, and I believe we can close this safely (since there is no intend to change the behavior of ast.unparse) -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python

[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2020-11-16 Thread Ronald Oussoren
Change by Ronald Oussoren : -- components: +macOS nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue12594] Docs for "Using Python on a Macintosh" needs to be updated

2020-11-16 Thread Ronald Oussoren
Change by Ronald Oussoren : -- components: +macOS nosy: +ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue21521] Tkinter + OSX + Spaces : Multiple file dialogues created

2020-11-16 Thread Ronald Oussoren
Change by Ronald Oussoren : -- components: +macOS nosy: +ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue11604] Have type(n,b,d) check for type(b[i]) is module

2020-11-16 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +newcomer friendly versions: +Python 3.10, Python 3.9 -Python 3.3 ___ Python tracker ___ ___

[issue42202] Optimize function annotation

2020-11-16 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42377] allow typing.cast with TYPE_CHECKING

2020-11-16 Thread Daniel Pinyol
New submission from Daniel Pinyol : Executing the following code we get this error on the "cast" call NameError: name 'A' is not defined ``` from __future__ import annotations from typing import TYPE_CHECKING, Optional, cast if TYPE_CHECKING: class A: pass def f(a: A): pass

[issue42378] logging reopens file with same mode, possibly truncating

2020-11-16 Thread Ed Catmur
New submission from Ed Catmur : If a logging.FileHandler is configured with mode='w', or if logging.basicConfig is called with filemode='w' (as suggested by the Basic Logging Tutorial https://docs.python.org/3/howto/logging.html#logging-basic-tutorial) and if some code logs during shutdown,

  1   2   >