[issue42422] types.CodeType() has no bytecode verifier

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: > You may use https://bytecode.readthedocs.io/ which might help to write more > portable code, (...) Ah, I didn't notice that at the beginning of the documentation, you can see that even a very simple loop has a different bytecode before and after Python

[issue42422] types.CodeType() has no bytecode verifier

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: Compiled bytecode is not portable between Python versions. You may use https://bytecode.readthedocs.io/ which might help to write more portable code, but this project does not contain a bytecode verifier and I'm not sure that it's updated when the Python

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

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: About PR 23448: I don't see the value of adding a script just prove that CPython has no bytecode verifier. If you consider that it's not well documented, it should be documented in the types.CodeType documentation:

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

2020-12-07 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > I would be happy to update and fix it instead if you think it's better that > way. Please let me know, it will be great to see my first submission being > treated. Yes, please. That seems more appropriate --

[issue42595] 5 * str

2020-12-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, this isn't a bug. It is tested and guaranteed behavior. -- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue42595] 5 * str

2020-12-07 Thread NO_DANGER LacalBitcoins
New submission from NO_DANGER LacalBitcoins : 5 * 'abc' нет ошибки. Нелогично! -- files: Screenshot_1.png messages: 382709 nosy: denisustinovweb priority: normal severity: normal status: open title: 5 * str type: crash Added file: https://bugs.python.org/file49659/Screenshot_1.png

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

2020-12-07 Thread Dennis Sweeney
Dennis Sweeney added the comment: Why not just fix bogus_code_obj.py? Something like this (using the replace method) would make it more future-proof to similar changes in the code object constructor signature (and be more readable!): import dis POP_TOP = dis.opmap['POP_TOP'] wordcode =

[issue41889] enum: Mixin and int base class regression in 3.8.6

2020-12-07 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42560] Improve Tkinter Documentation

2020-12-07 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +22557 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23689 ___ Python tracker

[issue42572] Better path handling with argparse

2020-12-07 Thread paul j3
paul j3 added the comment: What exactly do you do with a path argument? Admittedly I'm not expert with os and os.path modules, but isn't a path just a string passed to a function such as cwd(), or joined to another create a filename. I don't know what a 'path' type or action would do.

[issue42564] "from .__init__ import ..." syntax imports a duplicate module

2020-12-07 Thread Gregory Szorc
Gregory Szorc added the comment: Who uses this syntax? https://github.com/search?l=Python=%22from+.__init__+import%22=Code says a lot of random code, surprisingly/sadly. As for python-ideas, thanks for the suggestion: I may very well craft an email! --

[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel
Irit Katriel added the comment: I made a patch that replaces the limit hack by a filter on the traceback. We could stop here an just fix this, or we could create a more generic filter in the traceback module as suggested in issue31299. -- ___

[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: -22554 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +22556 pull_request: https://github.com/python/cpython/pull/23688 ___ Python tracker ___

[RELEASE] Python 3.9.1 is now available, together with 3.10.0a3 and 3.8.7rc1

2020-12-07 Thread Pablo Galindo Salgado
It's starting to get very cold (at least on the Northern hemisphere) so we have been carefully packaging a total of three new Python releases to keep you warm these days! Python 3.9.1 is the first maintenance release of Python 3.9, and also the first version of Python to support macOS 11 Big Sur

[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +22555 pull_request: https://github.com/python/cpython/pull/23687 ___ Python tracker ___

[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: -22552 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +22552 pull_request: https://github.com/python/cpython/pull/23687 ___ Python tracker ___

[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: -22552 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: -22553 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +22554 pull_request: https://github.com/python/cpython/pull/23688 ___ Python tracker ___

[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +22553 pull_request: https://github.com/python/cpython/pull/23687 ___ Python tracker ___

[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch nosy: +iritkatriel nosy_count: 1.0 -> 2.0 pull_requests: +22552 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23687 ___ Python tracker

[RELEASE] Python 3.9.1 is now available, together with 3.10.0a3 and 3.8.7rc1

2020-12-07 Thread Pablo Galindo Salgado
It's starting to get very cold (at least on the Northern hemisphere) so we have been carefully packaging a total of three new Python releases to keep you warm these days! Python 3.9.1 is the first maintenance release of Python 3.9, and also the first version of Python to support macOS 11 Big Sur

[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: -22551 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42572] Better path handling with argparse

2020-12-07 Thread Austin Scola
Austin Scola added the comment: Awesome, thank you for the guidance Eric. I'll start a thread on the python-ideas mailing list, gauge the level of support, and go from there. -- ___ Python tracker

[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +22551 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23687 ___ Python tracker

Re: Letter replacer - suggestions?

2020-12-07 Thread dn via Python-list
On 08/12/2020 12:15, Marco Sulla wrote: On Tue, 8 Dec 2020 at 00:10, dn via Python-list wrote: The translation phase is most easily achieved with the built-in str.translate() I forgot it :-) That's down to the rich-ness of the Python eco-system! IIRC (from previous posts) the OP is

[issue41818] Lib/pty.py major revision

2020-12-07 Thread Soumendra Ganguly
Change by Soumendra Ganguly : -- pull_requests: +22550 pull_request: https://github.com/python/cpython/pull/23686 ___ Python tracker ___

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: Objects/memoryview.c uses memcpy() on _Bool which leads to undefined behavior with GCC 11: see bpo-42587. -- ___ Python tracker ___

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-12-07 Thread Guido van Rossum
Guido van Rossum added the comment: Looking for another reviewer. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42587] test_buffer fails on Python built with GCC 11

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: > FAIL: test_memoryview_cast (test.test_buffer.TestBufferProtocol) On AArch64, GCC 11 miscompiles unpack_cmp() of Objects/memoryview.c for the '?' case: /* boolean */ case '?': CMP_SINGLE(p, q, _Bool); return equal; I reported the bug to GCC

[issue41889] enum: Mixin and int base class regression in 3.8.6

2020-12-07 Thread Ethan Furman
Ethan Furman added the comment: New changeset be52ca45d9eb9c3e8941e46ddc67a210f0f4c6fa by Miss Islington (bot) in branch '3.9': bpo-41889: [Enum] fix multiple-inheritance regression (GH-22487) (GH-23673) https://github.com/python/cpython/commit/be52ca45d9eb9c3e8941e46ddc67a210f0f4c6fa

[issue41889] enum: Mixin and int base class regression in 3.8.6

2020-12-07 Thread Ethan Furman
Ethan Furman added the comment: New changeset 699e5e448919283578afe445069ab93b34bf8eae by Miss Islington (bot) in branch '3.8': bpo-41889: [Enum] fix multiple-inheritance regression (GH-22487) (GH-23672) https://github.com/python/cpython/commit/699e5e448919283578afe445069ab93b34bf8eae

[issue42574] Travis can't build the 3.8 branch right now

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

[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset b6d6f5367da1f2e3f749c358ae8563c56a0cc395 by Pablo Galindo in branch '3.8': bpo-42574: Use format() instead of f-string in Tools/clinic/clinic.py to allow using older Python versions (GH-23685)

[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread mattip
mattip added the comment: I moved the new test to a separate test function and added `skipIf` for freebsd and AIX. -- ___ Python tracker ___

[issue40406] MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())

2020-12-07 Thread Blue
Change by Blue : -- nosy: +simon.d.beal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: list of dictionaries search using kwargs

2020-12-07 Thread Marco Sulla
On Mon, 7 Dec 2020 at 23:35, Larry Martell wrote: > > On Mon, Dec 7, 2020 at 5:29 PM Marco Sulla > wrote: > > > > You can return dictionaries that returns True if > > > > (a.items() & kwargs.items()) == kwargs.items() > > > > when `a` is one of your dicts. > > But what is passed in kwargs will

Re: Letter replacer - suggestions?

2020-12-07 Thread Marco Sulla
On Tue, 8 Dec 2020 at 00:10, dn via Python-list wrote: > The translation phase is most easily achieved with the built-in > str.translate() I forgot it :-) -- https://mail.python.org/mailman/listinfo/python-list

[issue42572] Better path handling with argparse

2020-12-07 Thread Eric V. Smith
Eric V. Smith added the comment: Hi, Austin. If it's something that can be implemented in a library (which this suggestion qualifies as), then we typically want to see it on PyPI and to gain some traction there. I only suggested argparse-types because it also has some argparse add-ons. But

Re: Letter replacer - suggestions?

2020-12-07 Thread dn via Python-list
word = input('input word you want to change letters in: ') chars = tuple(word) change_this = input('Enter the letters you want to change: ') replace_with = input('Enter the letters to replace with: ') if len(change_this) != len(replace_with): raise RuntimeError( "Letters to

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

2020-12-07 Thread Sofian Brabez
Sofian Brabez added the comment: Any ETA? I would appreciate to see my contribution being merged. Batuhan, the current code is not doing what it's supposed to do in bogus_code_obj.py (i.e. no crash after 3.8 and above in master and branches). This still make the issue valid I guess. ``` $

[issue3770] test_multiprocessing fails on systems with HAVE_SEM_OPEN=0

2020-12-07 Thread pmp-p
Change by pmp-p : -- nosy: +pmpp ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: list of dictionaries search using kwargs

2020-12-07 Thread MRAB
On 2020-12-07 22:06, Larry Martell wrote: I have a class that has an object that contains a list of dicts. I want to have a class method that takes a variable number of key/value pairs and searches the list and returns the item that matches the arguments. If I know the key value pairs I can do

[issue31299] Add "ignore_modules" option to TracebackException.format()

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: Error

2020-12-07 Thread Michael Torrie
On 12/7/20 11:30 AM, MRAB wrote: > There's no need to remove Python 3.9 first; Python 3.8 can be installed > alongside it. Since the original poster is invoking python.exe directly, probably as per the instructions in the book he's following, I fear having two versions of python installed will

[issue31299] Add "ignore_modules" option to TracebackException.format()

2020-12-07 Thread Irit Katriel
Irit Katriel added the comment: In issue42247 the unit test framework uses limit as a hack to remove its own frame, and then the traceback module applies the limit to the chained exception as well. If the filter suggested here existed, unit test could use that instead of limit. --

[issue42587] test_buffer fails on Python built with GCC 11

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: > FAIL: test_memoryview_cast (test.test_buffer.TestBufferProtocol) It might be related to _Bool. See also bpo-39689. -- ___ Python tracker

Re: list of dictionaries search using kwargs

2020-12-07 Thread Larry Martell
On Mon, Dec 7, 2020 at 5:42 PM Matt Wheeler wrote: > > for item in self.data: > if all(item[k] == v for k,v in kwargs.items()): > return item > > Or > > return [item for item in self.data if all(item[k] == v for k,v in > kwargs.items())] > > to return all matches > > Beware though

Re: list of dictionaries search using kwargs

2020-12-07 Thread Matt Wheeler
for item in self.data:     if all(item[k] == v for k,v in kwargs.items()):         return item Or return [item for item in self.data if all(item[k] == v for k,v in kwargs.items())] to return all matches Beware though that either of these will be slow if your list of dicts is large. If the

[issue42572] Better path handling with argparse

2020-12-07 Thread Austin Scola
Austin Scola added the comment: Hey Eric, Thanks for the response. I'm unfamiliar with the process of adding features to the language. Would you mind explaining to me what some of the qualifications are for getting something added to the stdlib? And also what role packages on PyPI play in

[issue42594] Provide a way to skip magic-number search in ZipFile(mode='a')

2020-12-07 Thread Bart Robinson
New submission from Bart Robinson : When a ZipFile object is created with mode='a', the existing file contents are checked for the magic number b"PK\005\006" near the end of the file. If a non-zipfile just happens to contain this magic number, it can confuse the library into assuming the

Re: list of dictionaries search using kwargs

2020-12-07 Thread Larry Martell
On Mon, Dec 7, 2020 at 5:29 PM Marco Sulla wrote: > > You can return dictionaries that returns True if > > (a.items() & kwargs.items()) == kwargs.items() > > when `a` is one of your dicts. But what is passed in kwargs will not necessarily have values for all of the keys and I only want to check

Re: list of dictionaries search using kwargs

2020-12-07 Thread Marco Sulla
You can return dictionaries that returns True if (a.items() & kwargs.items()) == kwargs.items() when `a` is one of your dicts. -- https://mail.python.org/mailman/listinfo/python-list

[issue33066] raise an exception from multiple positions break the traceback frames

2020-12-07 Thread Irit Katriel
Irit Katriel added the comment: When an exception has a __traceback__ and you raise it, the current frame is added to that traceback. What do you expect the behavior to be when you raise the same exception instance twice, from two different locations? -- nosy: +iritkatriel

Re: Letter replacer - suggestions?

2020-12-07 Thread Marco Sulla
Not sure why you want to do this (it's schoolwork)? Anyway, this is my version: word = input('input word you want to change letters in: ') chars = tuple(word) change_this = input('Enter the letters you want to change: ') replace_with = input('Enter the letters to replace with: ') if

list of dictionaries search using kwargs

2020-12-07 Thread Larry Martell
I have a class that has an object that contains a list of dicts. I want to have a class method that takes a variable number of key/value pairs and searches the list and returns the item that matches the arguments. If I know the key value pairs I can do something like this: instance = next(item

[issue42593] Consistency in unicode string multiplication with an integer

2020-12-07 Thread syl-nktaylor
syl-nktaylor added the comment: The build did seem to run, despite memset using fillchar without the explicit casting, so I assumed it did an implicit casting, but the original casting can be kept of course. With this build, my sample tests for 1-byte, 2-byte and 4-byte chars also ran ok,

[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread mattip
mattip added the comment: I submitted PR 23684 to try to skip tests to fix this. I don't understand why this wasn't caught before merge, and where AIX and FREEBSD are setting EXT_SUFFIX improperly. -- message_count: 9.0 -> 10.0 pull_requests: +22549 stage: resolved -> patch review

[issue42590] Something like Rust's std::sync::Mutex – combining a mutex primitive and a piece of data it's protecting

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

[issue42593] Consistency in unicode string multiplication with an integer

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: +Py_UCS4 fill_char = PyUnicode_READ(char_size, PyUnicode_DATA(str), 0); +memset(to, fill_char, len); The second parameter of memset() is a byte (8-bit "octet"). You cannot pass Py_UCS4 to memset(), it doesn't work. --

[issue41462] os.set_blocking() raises OSError on VxWorks RTOS

2020-12-07 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: It also broke POWER6 AIX 3.8: https://buildbot.python.org/all/#builders/138/builds/125 Traceback (most recent call last): File "/home/buildbot/buildarea/3.8.aixtools-aix-power6/build/Lib/test/test_sysconfig.py", line 366, in test_EXT_SUFFIX_in_vars

[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: This change broke the AMD64 FreeBSD Shared 3.x buildbot: https://buildbot.python.org/all/#/builders/483/builds/513 FAIL: test_EXT_SUFFIX_in_vars (test.test_sysconfig.TestSysConfig) --

[issue42564] "from .__init__ import ..." syntax imports a duplicate module

2020-12-07 Thread Brett Cannon
Brett Cannon added the comment: You could propose your backwards-incompatible proposals on python-ideas, Greg, and see if you get any uptake. -- ___ Python tracker ___

[issue26131] Raise ImportWarning when loader.load_module() is used

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

Re: linear algebric equations

2020-12-07 Thread Dan Stromberg
On Mon, Dec 7, 2020 at 11:36 AM Tito Sanò wrote: > Regarding the solution of linear algebraic equations I noticed a big > difference in the computation > > time in Python compared to the old fortran language. > > I have compared both the linelg and lapack.dgesv-lapack.zgesv modules with > the

[issue41462] os.set_blocking() raises OSError on VxWorks RTOS

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset 06afac6c5740bb81d2b7ab9639d2b08cccf77d33 by pxinwr in branch 'master': bpo-41462: Add os.set_blocking() support for VxWorks RTOS (GH-21713) https://github.com/python/cpython/commit/06afac6c5740bb81d2b7ab9639d2b08cccf77d33 -- nosy:

[issue42593] Consistency in unicode string multiplication with an integer

2020-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: BTW, CPython does not use UTF-8 and UTF-16 encoding in internal representation of strings. It uses Latin1, UCS2 and UCS4 (UTF-32). What benchmarks show? Is your code always faster and how much? If it is slower for some data, for what data and how much?

Re: Letter replacer - suggestions?

2020-12-07 Thread Chris Angelico
On Tue, Dec 8, 2020 at 7:11 AM Jon Ribbens via Python-list wrote: > > On 2020-12-07, Chris Angelico wrote: > > On Tue, Dec 8, 2020 at 6:41 AM Grant Edwards > > wrote: > >> On 2020-12-07, MRAB wrote: > >> > Avoid a 'bare' except unless you _really_ mean it, which is > >> > virtually never.

[issue42593] Consistency in unicode string multiplication with an integer

2020-12-07 Thread syl-nktaylor
New submission from syl-nktaylor : In https://github.com/python/cpython/blob/master/Objects/unicodeobject.c#L12930, unicode_repeat does string multiplication with an integer in 3 different ways: 1) one memset call, for utf-8 when string size is 1 2) linear 'for' loops, for utf-16 and utf-32

[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +22548 pull_request: https://github.com/python/cpython/pull/23685 ___ Python tracker ___

[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I would suggest to use some other string formatting for that one line. The reason is that technically (although very unlikely) downstream consumers could be relying on some old PYTHON_FOR_REGEN in the Makefile for 3.8 and I would not like to change

Re: Letter replacer - suggestions?

2020-12-07 Thread Jon Ribbens via Python-list
On 2020-12-07, Chris Angelico wrote: > On Tue, Dec 8, 2020 at 6:41 AM Grant Edwards > wrote: >> On 2020-12-07, MRAB wrote: >> > Avoid a 'bare' except unless you _really_ mean it, which is >> > virtually never. Catch only those exceptions that you're going to >> > handle. >> >> And sometimes

[issue42536] Iterating on a zip keeps objects alive longer than expected (test_itertools leaks sometimes references)

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

[issue42536] Iterating on a zip keeps objects alive longer than expected (test_itertools leaks sometimes references)

2020-12-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 7c797982383ebfd9cca39c480dcf6132979dd06f by Brandt Bucher in branch '3.8': bpo-42536: GC track recycled tuples (GH-23623) (GH-23652) https://github.com/python/cpython/commit/7c797982383ebfd9cca39c480dcf6132979dd06f --

[issue42536] Iterating on a zip keeps objects alive longer than expected (test_itertools leaks sometimes references)

2020-12-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 60463e8e4f79e5b5e96dc43fb83ded373b489e33 by Brandt Bucher in branch '3.9': bpo-42536: GC track recycled tuples (GH-23623) (GH-23651) https://github.com/python/cpython/commit/60463e8e4f79e5b5e96dc43fb83ded373b489e33 --

[issue42579] Solution from gh#python/cpython#13236 unnecessarily binds building of documentation to the latest version of Sphinx

2020-12-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset b63a620014b67a6e63d10783149c41baaf59def8 by Matěj Cepl in branch 'master': bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662) https://github.com/python/cpython/commit/b63a620014b67a6e63d10783149c41baaf59def8

[issue42579] Solution from gh#python/cpython#13236 unnecessarily binds building of documentation to the latest version of Sphinx

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

Re: Letter replacer - suggestions?

2020-12-07 Thread inhahe
Besides what others have said (especially re using a dict instead), I think it's unpythonic/can result in unexpected behavior to change a list as it's being iterated over. Your modified word_list should be a separate list, I think. Also, if you use enumerate(), you won't have to use .index and it

Re: Letter replacer - suggestions?

2020-12-07 Thread Chris Angelico
On Tue, Dec 8, 2020 at 6:51 AM Schachner, Joseph wrote: > > The only comment I have is that you didn't check the inputs at all. Suppose > the word I type in is "1234". 1234 will turn into an int, not a string. > You can't index through an int, it's one thing. So the program will probably >

Re: Letter replacer - suggestions?

2020-12-07 Thread Chris Angelico
On Tue, Dec 8, 2020 at 6:41 AM Grant Edwards wrote: > > On 2020-12-07, MRAB wrote: > > > Avoid a 'bare' except unless you _really_ mean it, which is > > virtually never. Catch only those exceptions that you're going to > > handle. > > And sometimes "handling" is just printing some extra stuff

[issue42592] TypedDict: total=False but still key required

2020-12-07 Thread Brandt Bucher
Brandt Bucher added the comment: It looks like this is a duplicate of issue 42059. We should just use their existing PR instead (PR 22736). -- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> TypedDict(...) as function does not respect

RE: Letter replacer - suggestions?

2020-12-07 Thread Schachner, Joseph
The only comment I have is that you didn't check the inputs at all. Suppose the word I type in is "1234". 1234 will turn into an int, not a string. You can't index through an int, it's one thing. So the program will probably throw an error. If the word at least starts with a letter, then it

ANN: Astropy v4.2 and v4.0.4 releases

2020-12-07 Thread Brigitta Sipocz
Dear All, On behalf of the Astropy Project, I am pleased to announce the v4.2 release of astropy, the core Python package for astronomy. This astropy release supports Python 3.7-3.9 and Numpy 1.17+. This release includes new functionalities, fixes and improvements for 183 issues, 105 pull

Re: Letter replacer - suggestions?

2020-12-07 Thread Grant Edwards
On 2020-12-07, MRAB wrote: > Avoid a 'bare' except unless you _really_ mean it, which is > virtually never. Catch only those exceptions that you're going to > handle. And sometimes "handling" is just printing some extra stuff and then re-raising the original exception: try:

[issue42592] TypedDict: total=False but still key required

2020-12-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Some notes on needed TypedDict doc fixes. https://docs.python.org/3/library/typing.html#typing.TypedDict "class typing.TypedDict(dict)" The actual signature from inspect.signature is "(typename, fields=None, /, *, total=True, **kwargs)". I presume fields

linear algebric equations

2020-12-07 Thread Tito Sanò
Regarding the solution of linear algebraic equations I noticed a big difference in the computation time in Python compared to the old fortran language. I have compared both the linelg and lapack.dgesv-lapack.zgesv modules with the fortan: dgelg and f04adf. The difference in computation time is

Re: Learning tkinter - a grid problem

2020-12-07 Thread Terry Reedy
On 12/6/2020 5:59 AM, Terry Reedy wrote: On 12/6/2020 3:11 AM, Sibylle Koczian wrote: Am 05.12.2020 um 19:56 schrieb Paulo da Silva: Why this example does not work? -- from tkinter import * root=Tk() root.geometry("400x200") S=Scrollbar(root) T=Text(root) ... mainloop()

Re: Error

2020-12-07 Thread MRAB
On 2020-12-07 18:29, Mats Wichmann wrote: On 12/7/20 11:13 AM, Michael Torrie wrote: On 12/7/20 11:07 AM, Barry Fitzgerald wrote: I did the pip install I did the pip install pygameThe pip install pgzero I get this error C:\Users\barol>pip install pgzeroDefaulting to user installation because

[issue42585] Segmentation fault on Linux with multiprocess queue

2020-12-07 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- components: +Library (Lib) nosy: +davin, pitrou versions: -Python 3.6 ___ Python tracker ___ ___

[issue42592] TypedDict: total=False but still key required

2020-12-07 Thread Brandt Bucher
Change by Brandt Bucher : -- assignee: -> brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Ammar Askar
Ammar Askar added the comment: Oh whoops, got sniped by Brandt while investigating :) -- ___ Python tracker ___ ___

[issue39625] Traceback needs more details

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> stack tracebacks should give the relevant class name ___ Python tracker

[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Ammar Askar
Ammar Askar added the comment: >From a quick glance at >https://github.com/python/cpython/pulls?page=2=base%3A3.8+-label%3Atype-documentation It looks like travis on 3.8 last passed at https://github.com/python/cpython/pull/23364 around 19 days ago The culprit commit is likely

[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Brandt Bucher
Brandt Bucher added the comment: So I suppose we can either: - set PYTHON_FOR_REGEN to something 3.6+ on these backport branches - use some other string formatting for that one line I sort of prefer the second, since I *think* this is the only thing keeping older Pythons from working here.

[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Brandt Bucher
Brandt Bucher added the comment: It has been failing for some time. It's just not a required check, so it's easy to miss on a backport branch. I think the addition of an f-string in PR 23371 a few weeks ago is what started making this fail (since the system python can't run clinic anymore).

[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I am a bit confusedwhy is this failing now? -- ___ Python tracker ___ ___

  1   2   >