[issue42711] lru_cache and NotImplemented

2020-12-21 Thread Kaleb Barrett
New submission from Kaleb Barrett : Having to return `NotImplemented` (which counts as a successful function call) in `functools.lru_cache` and `functools.cache` decorated binary dunder methods has the potential to fill the LRU cache with calls that will in ultimately result in errors (read

[issue35728] Tkinter font nametofont requires default root

2020-12-21 Thread Desmond Cheong
Change by Desmond Cheong : -- keywords: +patch nosy: +desmondcheongzx nosy_count: 2.0 -> 3.0 pull_requests: +22744 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23885 ___ Python tracker

[issue42709] I

2020-12-21 Thread Tim Peters
Tim Peters added the comment: It appears to be spam: the title is the single letter "I", and there's not a single word of text. There was nothing sensible to be done _except_ to close it :-) -- nosy: +tim.peters ___ Python tracker

[issue42709] I

2020-12-21 Thread James B Wilkinson
New submission from James B Wilkinson : > On Dec 21, 2020, at 11:11 PM, Raymond Hettinger > wrote: > > > Change by Raymond Hettinger : > > > -- > stage: -> resolved > status: open -> closed I see that this has been marked “resolved” and closed with no hint as to what the problem

[issue42710] Viewing pydoc API documentation

2020-12-21 Thread Faris Chugthai
New submission from Faris Chugthai : I'm sure that this has been observed before, but I was unable to find the original issue where this was discussed so I'm going to apologize in advance for what is probably a duplicate issue. But why is there no documentation available on the classes and

[issue42709] I

2020-12-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42709] I

2020-12-21 Thread James B Wilkinson
Change by James B Wilkinson : -- nosy: the.doc priority: normal severity: normal status: open title: I ___ Python tracker ___ ___

[issue42693] "if 0:" lines are traced; they didn't use to be

2020-12-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > But why remove it? It is in the source code. Because traditionally, "if 0: " has been used as a way to comment out code while leaving syntax highlighting in place. The expectation is all the code effectively ceases to exist, just like a comment.

[issue40284] Add mapping methods to types.SimpleNamespace

2020-12-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue38381] Possible wordcode optimization for STORE/LOAD pairs

2020-12-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue1818] Add named tuple reader to CSV module

2020-12-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue40284] Add mapping methods to types.SimpleNamespace

2020-12-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39159] Ideas for making ast.literal_eval() usable

2020-12-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Can you explain it a bit more detailed, > how does this standalone expression compiler should work? Aim for something like JSON parser but for the supported Python constant expressions and with the existing tokenize module to feed a hand-rolled

[issue42708] AttributeError when running multiprocessing on MacOS 11 with Apple Silicon (M1)

2020-12-21 Thread Reeyarn Li
Reeyarn Li added the comment: There is already a solution: https://stackoverflow.com/questions/41385708/multiprocessing-example-giving-attributeerror When putting the function into a separate file and import it in the main file, there is no error at all. ##File: defs.py def f(x):

[issue42707] Python uses ANSI CP for stdio on Windows console instead of using console or OEM CP

2020-12-21 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > I've been struggling to understand today why a simple file redirection > couldn't work properly today (encoding issues) The core issue is that "working properly" is not defined in general when we're talking about piping/redirection, as opposed to the

[issue42708] AttributeError when running multiprocessing on MacOS 11 with Apple Silicon (M1)

2020-12-21 Thread Reeyarn Li
New submission from Reeyarn Li : I just run the sample code from multiprocessing's documentation page: #https://docs.python.org/3/library/multiprocessing.html from multiprocessing import Pool def f(x): return x*x with Pool(5) as p: print(p.map(f, [1, 2, 3])) ## end of code And it

[issue30988] Exception parsing invalid email address headers starting or ending with dot

2020-12-21 Thread Karl Fogel
Karl Fogel added the comment: I can also confirm this bug, with Python 3.9.1 on Debian GNU/Linux ('testing' distro up-to-date as of 2020-12-21). 1) Create a parser `p` with `p = email.parser.HeaderParser(policy=email.policy.default)`. 2) Parse a single problematic (as described below)

[issue42246] Implement PEP 626 -- Precise line numbers for debugging

2020-12-21 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +methane ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39159] Ideas for making ast.literal_eval() usable

2020-12-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset fbc7723778be01b8f3bb72d2dcac15ab9fbb9923 by Batuhan Taskaya in branch 'master': bpo-39159: Declare error that might be raised from literal_eval (GH-19899) https://github.com/python/cpython/commit/fbc7723778be01b8f3bb72d2dcac15ab9fbb9923

[issue42008] Internal Random class calling seed() with incorrect argument

2020-12-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the PR :-) -- assignee: -> rhettinger resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.8, Python 3.9 ___ Python tracker

[issue42008] Internal Random class calling seed() with incorrect argument

2020-12-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset b8fde8b5418b75d2935d0ff93b20d45d5350f206 by AMIR in branch 'master': bpo-42008: Fix internal _random.Random() seeding for the one argument case (GH-22668) https://github.com/python/cpython/commit/b8fde8b5418b75d2935d0ff93b20d45d5350f206

[issue29030] argparse: choices override default metavar

2020-12-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- title: argparse: choices override metavar -> argparse: choices override default metavar ___ Python tracker ___

[issue9625] argparse: Problem with defaults for variable nargs when using choices

2020-12-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29030] argparse: choices override metavar

2020-12-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +22743 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23884 ___ Python tracker

[issue42705] Intercepting thread lock objects not working under context managers

2020-12-21 Thread Mohamad Kanj
Mohamad Kanj added the comment: Thanks Raymond for the input. So with some experimentation, the __enter__() & __exit__() functions could be traceable when other kinds of objects are used with the context manager (i.e with statement using file IO or custom class objects). However, just when

[issue16535] json encoder unable to handle decimal

2020-12-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I wonder if adding something similar to what `simplejson` uses > (i.e. explicitly specifying in `json.dump(s)` how to > serialize `decimal.Decimal`) could be acceptable. +1 for this approach. For financial applications, we need the recommended

[issue42151] Pure Python xml.etree.ElementTree is missing default attribute values

2020-12-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Changing the behaviour of the C implementation would > certainly break a lot more code than changing the Python > implementation. +1 for changing only the Python implementation. -- nosy: +rhettinger ___

[issue42705] Intercepting thread lock objects not working under context managers

2020-12-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: The sys.setprofile() doc don't make it clear whether the __enter__ and __exit__ call were intended to be traceable events. The docs do state, "there is no way for the profiler to know about context switches between threads, so it does not make sense to

[issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021

2020-12-21 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > So, can this be closed? For macOS, the SQLITE_ENABLE_MATH_FUNCTIONS option is enabled by default, but I'm not sure about the Windows build. The SQLite docs says: "This option is also included on Windows builds using the "Makefile.msc" makefile

[issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021

2020-12-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > but why would you do your maths computations in sql? There are number of reasons it might be more convenient in SQL. For example, it could be handy to create views measured in degrees instead of radians. That might make where clauses in queries a

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Mon, Dec 21, 2020 at 09:11:48PM +, Samuel Marks wrote: > There were only 12k occurrences, I'm sure I could manually go through that > in an afternoon. Would you accept it then? Assuming "an afternoon" is half a work day, so 4 hours, that's 1.2

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Samuel Marks
Samuel Marks added the comment: There were only 12k occurrences, I'm sure I could manually go through that in an afternoon. Would you accept it then? On Tue, 22 Dec 2020, 12:22 am Eric V. Smith, wrote: > > Eric V. Smith added the comment: > > See

[issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021

2020-12-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: It is probably harmless to enable the option, especially if it will be the SQLite default, but why would you do your maths computations in sql, using the limited set of functions available, when you could do them in Python, with a much larger set of

[issue42702] Inconsistent state after autoreconf

2020-12-21 Thread agbaroni
agbaroni added the comment: I'm closing the issue: I hadn't the autoconf-archive package on Fedora 33. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue42707] Python uses ANSI CP for stdio on Windows console instead of using console or OEM CP

2020-12-21 Thread Alexandre
New submission from Alexandre : Hello, first of all, I hope this was not already discussed (I searched the bugs but it might have been discussed elsewhere) and it's really a bug. I've been struggling to understand today why a simple file redirection couldn't work properly today (encoding

[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-21 Thread Ned Deily
Ned Deily added the comment: > Should I do something with this now or just wait for updates? I'd wait for a Homebrew recipe update. -- ___ Python tracker ___

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

2020-12-21 Thread Michael Felt
Michael Felt added the comment: While my patch in working - was successful in what it attempted to do, it did not fix this test issue. Instead - I reinstalled the `bos.adt.libm-7.2.0.0` fileset, to backout of the so-called bugfix/APAR IV95512. @David - can you take this up with AIX support

[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: To use tkinter and hence IDLE and turtle on macOS, get the Mac Python installer on python.org. -- ___ Python tracker ___

[issue42650] Can people use dest=argparse.SUPPRESS in custom Action classes?

2020-12-21 Thread Brad Warren
Brad Warren added the comment: Thanks for the help! I was mistaken here. The behavior I want is to not add the option to the namespace regardless of whether or not the user set it. I was initially under the impression that dest=SUPPRESS caused this behavior, however, it seems to have the

[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-21 Thread Пётр Сиренко
Пётр Сиренко added the comment: Guys, thank you all for joining the conversation! I don't understand what exactly should I do to fix this, but I have a lot to study through py4u and plenty of time before I will really need Python fixed. Should I do something with this now or just wait for

[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-21 Thread FX Coudert
FX Coudert added the comment: Our messages crossed, thanks Ned for the help. Hopefully we'll be solving this in a way that benefit most users. -- ___ Python tracker ___

[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-21 Thread FX Coudert
FX Coudert added the comment: But we can override with --with-tcltk-includes and --with-tcltk-libs I've opened a pull request for Homebrew to switch to recent tcl-tk: https://github.com/Homebrew/homebrew-core/pull/67378 -- ___ Python tracker

[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-21 Thread Ned Deily
Ned Deily added the comment: If you are not using Tcl and Tk framework builds installed in /Library, you use the configure or make options: --with-tcltk-includes='-I...' override search for Tcl and Tk include files --with-tcltk-libs='-L...'

[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-21 Thread FX Coudert
FX Coudert added the comment: After checking, I can see the code in cpython's setup.py is still there. detect_tkinter_darwin will prefer the system's version over anything we can specific in our cflags or ldflags. This seems contrary to the advice above not to use macOS system Tcl/Tk.

[issue42706] random.uniform 2x slower than inline implementation

2020-12-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > does the call/return really add that much overhead? Yes, it does. $ python3.9 -m timeit -s 'x=3.5' 'x**2' 500 loops, best of 5: 63.5 nsec per loop $ python3.9 -m timeit -s 'x=3.5' -s 'f=lambda x: x**2' 'f(x)' 200 loops, best of 5: 136 nsec per

[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-21 Thread FX Coudert
FX Coudert added the comment: Hi Ned, FX from Homebrew here. One of the reasons we a couple of years ago to stick with macOS system tcl-tk was that cpython's configure does not currently allow to build against our tcl-tk, which is not a framework but a simple Unix-style library build. We

[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-21 Thread Paul Ganssle
Paul Ganssle added the comment: For future reference, this bug is triggered only when `.fromutc` is called on a subclass of `datetime` and the resulting date is the second ambiguous time (e.g. if there's a DST transition from 02:00 → 01:00, and the result of the `.fromutc` call is the

[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-21 Thread Ned Deily
Ned Deily added the comment: > I have tried to update tcl-tk with the homebrew, but in command line I see 8.5 > Could you please help me to fix this tcl-tk problem? You should check with the Homebrew project; we have no insight into or control over their packaging choices. Good luck!

[issue42701] Discrepency between configure.ac and configure

2020-12-21 Thread Ned Deily
Change by Ned Deily : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42704] [macOS] [python3.7] : platform.machine() returns x86_64 on ARM machine

2020-12-21 Thread Ned Deily
Change by Ned Deily : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42704] [macOS] [python3.7] : platform.machine() returns x86_64 on ARM machine

2020-12-21 Thread Ned Deily
Ned Deily added the comment: Note also that Python 3.7 is now in the security-fix-only phase of its lifecycle meaning it no longer receives non-security bug fixes and binary installers for it will no longer be produced. In particular, Pygthon 3.7 has not been updated for macOS 11 and Apple

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

2020-12-21 Thread Michael Felt
Michael Felt added the comment: I have been doing a lot of research on this. Wish I had thought do start the way I finished. Basically, when math.nextafter() was added all the AIX bots were on systems running AIX earlier than AIX 7.2 TL2. When AIX 7.2 TL2 was released (roughly Q3 2017) a

[issue42706] random.uniform 2x slower than inline implementation

2020-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, calling functions in Python has some overhead. It is not specific to random.uniform(). -- nosy: +rhettinger, serhiy.storchaka ___ Python tracker

[issue42704] [macOS] [python3.7] : platform.machine() returns x86_64 on ARM machine

2020-12-21 Thread Ronald Oussoren
Ronald Oussoren added the comment: That installer contains intel (x86_64) binaries. The behaviour of platform.machine() and platform.processor() is expected, due to Rosetta the binary runs as if it is running on an Intel Mac. There is a "universal2" installer for Python 3.9.1 which will run

[issue42706] random.uniform 2x slower than inline implementation

2020-12-21 Thread Scott Norton
New submission from Scott Norton : The library function random.uniform takes about twice as long as a manual inline implementation (Python 3.9.1). >>> import timeit >>> timeit.timeit('3 + (8 - 3) * random.random()', 'import random') 0.154088729228 >>> timeit.timeit('a + (b - a) *

[issue42704] [macOS] [python3.7] : platform.machine() returns x86_64 on ARM machine

2020-12-21 Thread Malay Shah
Malay Shah added the comment: I downloaded it from : www.python.org/ftp/python/3.7.9/python-3.7.9-macosx10.9.pkg -- ___ Python tracker ___

[issue42705] Intercepting thread lock objects not working under context managers

2020-12-21 Thread Mohamad Kanj
New submission from Mohamad Kanj : The interception of Python and C functions is achieved through the `sys` module - however, when using thread locks from `threading` module for instance under context managers, the calls on the lock to `acquire()` and `release()` cannot be witnessed. If

[issue42705] Intercepting thread lock objects not working under context managers

2020-12-21 Thread Mohamad Kanj
Change by Mohamad Kanj : -- assignee: docs@python components: C API, Demos and Tools, Distutils, Documentation files: tracing-locking-mechanisms.py nosy: docs@python, dstufft, eric.araujo, mhmdkanj priority: normal severity: normal status: open title: Intercepting thread lock objects

[issue36968] Top level transient modal windows stopping deiconify on windows 10

2020-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Tkinter is a wrapper around the Tk library. This seems a bug in Tk itself. Please file report on the corresponding bug tracker. -- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed

[issue42704] [macOS] [python3.7] : platform.machine() returns x86_64 on ARM machine

2020-12-21 Thread Ronald Oussoren
Ronald Oussoren added the comment: How did you install python3.7? Platform.machine() will return "x86_64" when running in Rosetta 3. That is, when python itself is an x86_64 binary. -- ___ Python tracker

[issue42693] "if 0:" lines are traced; they didn't use to be

2020-12-21 Thread Ned Batchelder
Ned Batchelder added the comment: This feels like a recurring debate. I will need some time to lay out my case. Perhaps it needs a wider audience than a bpo issue? -- ___ Python tracker

[issue42703] Asyncio Event Documentation Links Incorrect

2020-12-21 Thread Matt Fowler
Change by Matt Fowler : -- keywords: +patch pull_requests: +22741 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23881 ___ Python tracker ___

[issue42701] Discrepency between configure.ac and configure

2020-12-21 Thread Michael Felt
Michael Felt added the comment: The 'issue' is that a package known as autoconf-archive must ALSO be installed - so that aclocal has a definition for ax_check_compile_flag. Guessing that resolution is `third_party` - If not, please explain what the resolution flag is used for. --

[issue42704] [macOS] [python3.7] : platform.machine() returns x86_64 on ARM machine

2020-12-21 Thread Malay Shah
New submission from Malay Shah : there is a discrepancy in platform.machine() behaviour on mac ARM: In python2.7.16 , platform.machine() returns : "arm64" In python3.7.9 , platform.machine() returns : "x86_64" -- components: macOS messages: 383525 nosy: ned.deily, ronaldoussoren,

[issue42703] Asyncio Event Documentation Links Incorrect

2020-12-21 Thread Matt Fowler
New submission from Matt Fowler : The documentation for `asyncio.Event` has incorrect links. The `wait` coroutine incorrectly links to the docs for the `asyncio.wait` waiting primitive, and the `set` method incorrectly links to the docs for the `set` class constructor. -- assignee:

[issue42257] platform.libc_ver() doesn't consider in case of executable is empty string

2020-12-21 Thread Kurochan
Kurochan added the comment: Can anyone review this PR? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42701] Discrepency between configure.ac and configure

2020-12-21 Thread Michael Felt
Michael Felt added the comment: This is beginning to look like it is an issue with the version of automake installed: aixtools@gcc119:[/home/aixtools/cpython/cpython-master]automake --version Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${

[issue42693] "if 0:" lines are traced; they didn't use to be

2020-12-21 Thread Mark Shannon
Mark Shannon added the comment: You should never have to disable optimizations. Let's be clear about what an optimization is. An optimization (CS not math) is a change to the program such that it has the same effect, according to the language spec, but improves some aspect of the behavior,

[issue42634] Incorrect line number in bytecode for try-except-finally

2020-12-21 Thread Mark Shannon
Mark Shannon added the comment: New changeset f2dbfd7e20431f0bcf2b655aa876afec7fe03c6f by Mark Shannon in branch 'master': bpo-42634: Mark reraise after except blocks as artificial. (GH-23877) https://github.com/python/cpython/commit/f2dbfd7e20431f0bcf2b655aa876afec7fe03c6f --

[issue42701] Discrepency between configure.ac and configure

2020-12-21 Thread Michael Felt
Michael Felt added the comment: This is what I find via bisect: aixtools@gcc119:[/home/aixtools/cpython/cpython-master]git checkout . && git bisect bad c6d7e82d19c091af698d4e4b3623648e259843e3 is the first bad commit commit c6d7e82d19c091af698d4e4b3623648e259843e3 Author: Petr Viktorin

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Eric V. Smith
Eric V. Smith added the comment: See https://github.com/ikamensh/flynt#dangers-of-conversion for reasons. Would I like to see all string literal formatting done with f-strings? Yes! Would I accept the risk and hassle of doing it blindly? No. --

[issue42702] Inconsistent state after autoreconf

2020-12-21 Thread agbaroni
New submission from agbaroni : git clone https://github.com/python/cpython && cd cpython && autoreconf && ./configure --with-pydebug gives the following error: checking for --enable-optimizations... no ./configure: line 6443: syntax error near unexpected token `-fno-semantic-interposition,'

[issue35790] Correct the description of sys.exc_info() and add a code example

2020-12-21 Thread Julien Palard
Change by Julien Palard : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35790] Correct the description of sys.exc_info() and add a code example

2020-12-21 Thread Julien Palard
Julien Palard added the comment: New changeset d515c610c61b9a8c40c037a3dc3bfc8d67563658 by Géry Ogam in branch 'master': bpo-35790: Correct the description of sys.exc_info() and add a code example (GH-11625) https://github.com/python/cpython/commit/d515c610c61b9a8c40c037a3dc3bfc8d67563658

[issue42701] Discrepency between configure.ac and configure

2020-12-21 Thread Michael Felt
New submission from Michael Felt : While working on a PR for issue42323 I get an error with the generated ./configure even without my patch. Working from commit 37a6d5f8027f969418fe53d0a73a21003a8e370d aixtools@gcc119:[/home/aixtools/cpython/cpython-master]git log --oneline | head 37a6d5f

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Samuel Marks
Samuel Marks added the comment: EDIT: Just found https://github.com/ikamensh/flynt -- ___ Python tracker ___ ___ Python-bugs-list

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Samuel Marks
Samuel Marks added the comment: I suppose that's a good justification to never improve/upgrade the syntax and quality of the codebase. In terms of automatic upgrades of the codebase, one could always replicate the approach I use in doctrans—i.e., use of `ast` and/or `inspect`—to

[issue42696] Duplicated unused bytecodes at end of function

2020-12-21 Thread Mark Shannon
Mark Shannon added the comment: Our reachability analysis is correct (in this case at least). There is no unreachable code here. In theory we could merge the two basic blocks at the end, but searching for identical blocks and merging them is potentially quite expensive (and fiddly). What

[issue42693] "if 0:" lines are traced; they didn't use to be

2020-12-21 Thread Ned Batchelder
Ned Batchelder added the comment: > PEP 626 states that *all* executed code gets traced. Yes, but reading the PEP now, it's not clear what "executed" means. Do we mean "conceptually executed", or, "executed as compiled by the optimizing compiler"? > In fact this NOP can be removed by

[issue42634] Incorrect line number in bytecode for try-except-finally

2020-12-21 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +22740 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/23877 ___ Python tracker ___

[issue42696] Duplicated unused bytecodes at end of function

2020-12-21 Thread Mark Shannon
Mark Shannon added the comment: My guess is that we are changing the CFG after computing reachability leaving unreachable blocks marked as reachable. -- assignee: -> Mark.Shannon ___ Python tracker

[issue42693] "if 0:" lines are traced; they didn't use to be

2020-12-21 Thread Mark Shannon
Mark Shannon added the comment: But why remove it? It is in the source code. Do we want tracing and profiling to depend on what transformations the optimizer does or does not make? What lines are to be traced here? What is the last line executed? def no_code(): if 0: some_code

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Eric V. Smith
Eric V. Smith added the comment: > Wait I don't understand why you wouldn't accept a wholesale replacement of > all `%` and `format` with f-strings through the entire CPython codebase > [master branch]? For such a large change it's difficult to review every single change and ensure it's

[issue42693] "if 0:" lines are traced; they didn't use to be

2020-12-21 Thread Ned Batchelder
Ned Batchelder added the comment: Previous versions of Python completely removed the "if 0:" statement, because it would have no effect. The condition was checked at compile time, effectively. It seems odd for 3.10 to add it back in. -- ___

[issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021

2020-12-21 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Seems like the math functions will be included by default anyways, so we'll have to explicitly exclude them if we don't want them. https://www.sqlite.org/draft/compile.html#enable_math_functions: "This option [SQLITE_ENABLE_MATH_FUNCTIONS] is

[issue42634] Incorrect line number in bytecode for try-except-finally

2020-12-21 Thread Mark Shannon
Change by Mark Shannon : -- resolution: fixed -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42693] "if 0:" lines are traced; they didn't use to be

2020-12-21 Thread Mark Shannon
Mark Shannon added the comment: Yes, this is change is deliberate. PEP 626 states that *all* executed code gets traced. Occasionally that will result in NOPs in the code, that are necessary for correctness, but cannot be removed by the optimizer. Is this a problem in practice? In fact this

[issue31483] ButtonPress event not firing until button release Python 3.6.1

2020-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And in any case Tkinter is just a wrapper around Tk. If there is a bug it should be reported on the Tk bug tracker. -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker

[issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021

2020-12-21 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I see no reason not to build SQLite with -DSQLITE_ENABLE_MATH_FUNCTIONS for the Windows and macOS builds. Why take the detour through the Python library when you can use the built-in SQLite functions? The change is trivial: Add

[issue34550] UnicodeDecodeError when invoke method configure() of Menu instance

2020-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There should no be any UnicodeDecodeError now. Tkinter on Windows uses now the UTF-16 encoding with the surrogatepass error handler which should never fail. Could you please confirm that the issue is gone? -- status: open -> pending

[issue37232] Parallel compilation fails because of low ulimit.

2020-12-21 Thread Jakub Kulik
Jakub Kulik added the comment: I am closing this as it is true that the limit on files of 256 is pretty low, and no matter how robust you make it, arbitrarily low ulimits will crash it anyway. -- resolution: -> not a bug stage: -> resolved status: open -> closed

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Samuel Marks
Samuel Marks added the comment: Wait I don't understand why you wouldn't accept a wholesale replacement of all `%` and `format` with f-strings through the entire CPython codebase [master branch]? BTW: Kinda unrelated, but would be great to have perspective on this little project -

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Eric V. Smith
Eric V. Smith added the comment: @samuelmarks: A place where there it is possible to improve performance is with f-strings replacing %-formatting or str.format. This does move significant work to compile time. However, we'd be unlikely to accept a wholesale stdlib change that swaps in

[issue35728] Tkinter font nametofont requires default root

2020-12-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +easy versions: +Python 3.10 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue4343] tkinter: add _get_master() and use it consistently

2020-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not think that popping up a root window on first call of Variable() or getboolean() is a good idea. Issue42630 fixed errors in other way. A root window is not automatically created for non-graphic objects (like Variable), instead a RuntimeError with

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Samuel Marks
Samuel Marks added the comment: Yeah I hear ya, was just trying for the most concise issue title. I tend to [over]use `map`, `filter`, `filterfalse` and other `itertools` and `operator` methods in my own codebase. Surprised with that result, that using an explicit list is actually faster.

[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-21 Thread Michał Górny
Michał Górny added the comment: Thank you for debugging this. I can confirm that this patch resolves my issue. -- ___ Python tracker ___

[issue18131] Tkinter Variables require a proper master

2020-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And the first issue was fixed in issue42630. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue42277] Solaris & PEP 3149: start using ABI version tagged .so files

2020-12-21 Thread Jakub Kulik
Change by Jakub Kulik : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42277] Solaris & PEP 3149: start using ABI version tagged .so files

2020-12-21 Thread Jakub Kulik
Jakub Kulik added the comment: This was resolved with issue 42604 and PR 23708. -- ___ Python tracker ___ ___ Python-bugs-list

  1   2   >