[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-05-16 Thread STINNER Victor
STINNER Victor added the comment: > I reopen the issue to remind me that collections.deque() freelist is shared > by all interpreters. Each deque instance now has its own free list. But dtoa.c still has a per-process cache, shared by all interpreters. -- ___

[issue42834] [subinterpreters] Convert "global" static variable caches in _json to heap variables

2021-05-16 Thread Christian Heimes
Change by Christian Heimes : -- title: [subinterpreters] Make static caches in various places subinterpreter compatible -> [subinterpreters] Convert "global" static variable caches in _json to heap variables ___ Python tracker

[issue42834] [subinterpreters] Make static caches in various places subinterpreter compatible

2021-05-16 Thread Christian Heimes
Christian Heimes added the comment: KJ, please create a new bug for compile.c. bpo's are cheap to create. -- nosy: +christian.heimes resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36876] [subinterpreters] Global C variables are a problem

2021-05-16 Thread Dennis Sweeney
Dennis Sweeney added the comment: I'm getting the following FutureWarning on a certain regular expression. I think it just needs "[]" to become "\[\]". 0:05:36 load avg: 0.00 [ 53/427] test_check_c_globals ...\Tools\c-analyzer\c_common\tables.py:236: FutureWarning: Possible nested set at pos

[issue44154] Optimize Fraction pickling

2021-05-16 Thread Sergey B Kirpichev
Sergey B Kirpichev added the comment: > Oh yes - please do. Ok, I did. > It's not just pickle size - going through str() makes (un)pickling quadratic > time in both directions if components are large. Yeah, I noticed speedup too, but size was much more important for may application. BTW,

[issue44154] Optimize Fraction pickling

2021-05-16 Thread Tim Peters
Tim Peters added the comment: Oh yes - please do. It's not just pickle size - going through str() makes (un)pickling quadratic time in both directions if components are large. Pickle the component ints instead, and the more recent pickle protocol(s) can do both directions in linear time inst

[issue44154] Optimize Fraction pickling

2021-05-16 Thread Sergey B Kirpichev
Change by Sergey B Kirpichev : -- pull_requests: +24803 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26186 ___ Python tracker ___ __

[issue44154] Optimize Fraction pickling

2021-05-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: Yes, this looks reasonable. Go ahead with a PR. -- assignee: -> rhettinger nosy: +rhettinger type: -> performance ___ Python tracker __

[issue44154] Optimize Fraction pickling

2021-05-16 Thread Sergey B Kirpichev
New submission from Sergey B Kirpichev : The current version of the Fraction.__reduce__() method uses str(), which produces bigger dumps, esp. for large components. C.f.: >>> import random, pickle >>> from fractions import Fraction as F >>> random.seed(1); a = F(*random.random().as_integer_rat

[issue44151] Improve parameter names and return value ordering for linear_regression

2021-05-16 Thread Miki Tebeka
Miki Tebeka added the comment: I'm +1 on the changes proposed by Raymond. In my teaching experience most developers who will use the built-in statistics package will have highschool level math experience. On the other hand, they'll probably to Wikipedia and the entry there uses dependent va

[issue44151] Improve parameter names and return value ordering for linear_regression

2021-05-16 Thread Matt Harrison
Matt Harrison added the comment: And by "if your model is in the correct layout", I meant "if your data is in the correct layout" -- ___ Python tracker ___ __

[issue44151] Improve parameter names and return value ordering for linear_regression

2021-05-16 Thread Matt Harrison
Matt Harrison added the comment: The ML world has collapsed on the terms X and y. (With that capitalization). Moreover, most (Python libraries) follow the interface of scikit-learn [0]. Training a model looks like this: model = LinearRegression() model.fit(X, y) After that, the mode

[issue40358] pathlib's relative_to should behave like os.path.relpath

2021-05-16 Thread Barney Gale
Barney Gale added the comment: Also requested in #42234. -- nosy: +barneygale ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue42234] pathlib relative_to behaviour change

2021-05-16 Thread Barney Gale
Barney Gale added the comment: In fact, I think this is a duplicate of issue40358, which has an open PR against it. -- ___ Python tracker ___

[issue36464] Python 2.7 build install fails intermittently with -j on MacOS

2021-05-16 Thread Carol Willing
Carol Willing added the comment: @iritkatriel Thanks for the follow up. I'm going to close this as I haven't seen any issues with -j on MacOS. -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker <

[issue42234] pathlib relative_to behaviour change

2021-05-16 Thread Barney Gale
Barney Gale added the comment: That does sound pretty useful! I'd be happy to review a PR though I'm not a core dev. -- nosy: +barneygale ___ Python tracker ___ _

[issue38671] pathlib.Path.resolve(strict=False) returns relative path on Windows if the entry does not exist

2021-05-16 Thread Barney Gale
Change by Barney Gale : -- nosy: +barneygale nosy_count: 8.0 -> 9.0 pull_requests: +24802 pull_request: https://github.com/python/cpython/pull/26184 ___ Python tracker ___

[issue36464] Python 2.7 build install fails intermittently with -j on MacOS

2021-05-16 Thread Irit Katriel
Irit Katriel added the comment: I closed PR 13186 because the change in it was already committed under issue36464. Can this issue be closed now as well or is there anything left to look into? -- nosy: +iritkatriel ___ Python tracker

[issue44151] Improve parameter names and return value ordering for linear_regression

2021-05-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: > The named tuple should be called Line because that is what it describes. > Also, a Line class would be reusuable for other purposes that linear > regression. I think that most people would expect that a Line class would represent a straight line widget

[issue44151] Improve parameter names and return value ordering for linear_regression

2021-05-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: I agree with you that "regressor" is too obscure and should be changed. I disagree about the "y = mx + c". Haven't we already discussed this? That form is used in linear algebra, but not used in statistics. Quoting from Yale: "A linear regression line has a

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2021-05-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Pablo, would you allow the _tkinter change in .0b2? I checked the change and I think is scoped enough and doesn't change the public API (and it solves a bug). Is fine with me, but please make sure of the following: * At least a core dev reviews and

[issue41620] Python Unittest does not return results object when the test is skipped

2021-05-16 Thread Iman Tabrizian
Iman Tabrizian added the comment: I'll add a documentation and unit test and update the PR. -- ___ Python tracker ___ ___ Python-bu

[issue44146] Format string fill not handling brace char

2021-05-16 Thread Eric V. Smith
Eric V. Smith added the comment: In the future, if you get an error, please tell us what the error is. It makes responding to bugs easier. '{::>10d'.format(5) Gives me an error with 3.10: >>> '{::>10d'.format(5) Traceback (most recent call last): File "", line 1, in ValueError: unmatched

[issue40172] ZipInfo corrupts file names in some old zip archives

2021-05-16 Thread Yudilevi
Yudilevi added the comment: Hey :) Sorry that I'm not responsive, just busy. I'll add one soon. Yudi On Mon, May 17, 2021 at 12:08 AM Irit Katriel wrote: > > Irit Katriel added the comment: > > Can you suggest a unit test for this? > > -- > nosy: +iritkatriel > > _

[issue40172] ZipInfo corrupts file names in some old zip archives

2021-05-16 Thread Irit Katriel
Irit Katriel added the comment: Can you suggest a unit test for this? -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-

[issue39950] Add pathlib.Path.hardlink_to()

2021-05-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset b913f47e87f788e705716ae037ee9f68b4265e69 by Miss Islington (bot) in branch '3.10': bpo-39950: Fix deprecation warning in test for `pathlib.Path.link_to()` (GH-26155) (GH-26178) https://github.com/python/cpython/commit/b913f47e87f788e705716ae0

[issue44153] Signaling an asyncio subprocess might raise ProcessLookupError, even if you haven't called .wait() yet

2021-05-16 Thread Max Marrone
Change by Max Marrone : -- title: Signaling an asyncio subprocess raises ProcessLookupError, depending on timing -> Signaling an asyncio subprocess might raise ProcessLookupError, even if you haven't called .wait() yet ___ Python tracker

[issue44153] Signaling an asyncio subprocess raises ProcessLookupError, depending on timing

2021-05-16 Thread Max Marrone
New submission from Max Marrone : # Summary Basic use of `asyncio.subprocess.Process.terminate()` can raise a `ProcessLookupError`, depending on the timing of the subprocess's exit. I assume (but haven't checked) that this problem extends to `.kill()` and `.send_signal()`. This breaks the e

[issue39950] Add pathlib.Path.hardlink_to()

2021-05-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +24801 pull_request: https://github.com/python/cpython/pull/26178 ___ Python tracker ___ __

[issue44152] [not a bug] .isupper() does not support Polytonic Greek (but .islower() does)

2021-05-16 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue44152] [not a bug] .isupper() does not support Polytonic Greek (but .islower() does)

2021-05-16 Thread E G
E G added the comment: Oops: this is not a bug. The isupper() method tests ALL chars. Only the first char in the examples was a capital. All of the logic/tests succeed. Sorry for the error. Thanks to Serhiy S. for swift attention on this. -- resolution: -> not a bug title: .isupper

[issue44152] .isupper() does not support Polytonic Greek (but .islower() does)

2021-05-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Are you sure that all characters in Δημοϲθενικοί are upper-case letters? Because this is what the isupper() method tests. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue44147] [WinError 193] %1 is not a valid Win32 application

2021-05-16 Thread Eryk Sun
Eryk Sun added the comment: The issue tracker is not a general support forum for software development. Please ask first on python-list or the users group on discuss.python.org. For now, I'm changing the status of this issue to pending. If the discussion determines that there's a bug in Pytho

[issue41620] Python Unittest does not return results object when the test is skipped

2021-05-16 Thread Irit Katriel
Irit Katriel added the comment: I agree with Iman that this looks like a bug because the code updates the result object with skip info but then doesn't return it. The patch needs a unit test covering this, as well as probably a doc update. -- ___

[issue41620] Python Unittest does not return results object when the test is skipped

2021-05-16 Thread Irit Katriel
Change by Irit Katriel : -- Removed message: https://bugs.python.org/msg393489 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue41620] Python Unittest does not return results object when the test is skipped

2021-05-16 Thread Irit Katriel
Change by Irit Katriel : -- Removed message: https://bugs.python.org/msg384971 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue44152] .isupper() does not support Polytonic Greek (but .islower() does)

2021-05-16 Thread E G
New submission from E G : Δημοϲθενικοί starts with an upper-case delta. 'Δημοϲθενικοί'.isupper() should yield "True". Ἀεὶ also fails this test: it begins with a capital Alpha with a breathing. εἰϲ is properly parsed: isupper() is False and islower() is True. Despite the problem with .isupper

[issue44151] Improve parameter names and return value ordering for linear_regression

2021-05-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: Related links: * https://support.microsoft.com/en-us/office/linest-function-84d7d0d9-6e50-4101-977a-fa7abf772b6d * https://www.khanacademy.org/math/statistics-probability/describing-relationships-quantitative-data/introduction-to-trend-lines/a/linear-reg

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2021-05-16 Thread Tal Einat
Change by Tal Einat : -- versions: +Python 3.11 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2021-05-16 Thread Tal Einat
Tal Einat added the comment: > Can we backport? The change to _tkinter, not directly exposed in tkinter, > could be considered an enhancement, but is necessary to fix what I consider a > real bug in tkinter, and hence in IDLE. I'm +1 for backporting the latest PR. It only adds the clearly

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2021-05-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: As Tal notes on the PR, the _tkinter patch is the minimum needed to fix the problem for IDLE, not the undetermined patch to tkinter that should be done to properly expose the fix to all tkinter users. If the tcl function were exposed with a presumably tempor

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2021-05-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Can we backport? The change to _tkinter, not directly exposed in tkinter, could be considered an enhancement, but is necessary to fix what I consider a real bug in tkinter, and hence in IDLE. Pablo, would you allow the _tkinter change in .0b2? If we cannot

[issue44151] Improve parameter names and return value ordering for linear_regression

2021-05-16 Thread Raymond Hettinger
New submission from Raymond Hettinger : The current signature is: linear_regression(regressor, dependent_variable) While the term "regressor" is used in some problem domains, it isn't well known outside of those domains. The term "independent_variable" would be better because it is com

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2021-05-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Tal: cancel comment above. I was confused because FinalizeThread is exposed as just finalize. On Windows, PR fixes issue whether Shell or editor is closed last. -- ___ Python tracker

[issue44147] [WinError 193] %1 is not a valid Win32 application

2021-05-16 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Can you provide the full traceback log of at least one of the import failures. Try importing matplotlib, for example, and extract the traceback log. Usually this error occurs due to PATH conflicts. This issue is thoroughly discussed in https://github.com/py

[issue44150] Add optional weights parameter to statistics.fmean()

2021-05-16 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +24800 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26175 ___ Python tracker __

[issue44150] Add optional weights parameter to statistics.fmean()

2021-05-16 Thread Raymond Hettinger
New submission from Raymond Hettinger : Weighted averages are another basic that we should support. A professor assigns a grade for a course by weighting quizzes at 20%, homework at 20%, a midterm exam at 30%, and a final exam at 30%: >>> grades = [85, 92, 83, 91] >>> weights = [0.20, 0.20, 0

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2021-05-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy: what do you know of tcl finalization? Tal: why does your patch only expose the option that you said crashes ubuntu. Spacekiwigames: if you have a cpython fork and local repository, you could try the patch on your linux mint. -- nosy: +Spacek

[issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses

2021-05-16 Thread Pete Wicken
Pete Wicken added the comment: I've opened a PR that should hopefully address this issue. -- ___ Python tracker ___ ___ Python-bugs

[issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses

2021-05-16 Thread Pete Wicken
Change by Pete Wicken : -- keywords: +patch pull_requests: +24799 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26172 ___ Python tracker ___

[issue44149] difflib.get_close_matches: Add `key` argument

2021-05-16 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue44144] Python window not opening

2021-05-16 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue44149] difflib.get_close_matches: Add `key` argument

2021-05-16 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +24798 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26170 ___ Python tracker _

[issue44148] Raise a SystemError if frame is NULL in PyEval_GetGlobals

2021-05-16 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I don't know much about ceval.c functions, so is there a reason PyEval_GetGlobals doesn't raise an error? I'm sorry for creating noise about it if the current behavior is intended. I'll close the issue and the PR then. -- __

[issue44149] difflib.get_close_matches: Add `key` argument

2021-05-16 Thread Mustafa Quraish
New submission from Mustafa Quraish : Add a `key` argument to difflib.get_close_matches(), so that it is possible to say find the closest objects where an attribute matches the given string. -- components: Library (Lib) messages: 393747 nosy: mustafaquraish priority: normal severity: n

[issue44148] Raise a SystemError if frame is NULL in PyEval_GetGlobals

2021-05-16 Thread Shreyan Avigyan
Change by Shreyan Avigyan : -- keywords: +patch pull_requests: +24797 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26166 ___ Python tracker ___

[issue44148] Raise a SystemError if frame is NULL in PyEval_GetGlobals

2021-05-16 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Sorry, it's SystemError not RuntimeError -- title: Raise a RuntimeError if frame is NULL in PyEval_GetGlobals -> Raise a SystemError if frame is NULL in PyEval_GetGlobals ___ Python tracker

[issue44148] Raise a RuntimeError if frame is NULL in PyEval_GetGlobals

2021-05-16 Thread Shreyan Avigyan
New submission from Shreyan Avigyan : Currently, PyEval_GetGlobals just returns NULL if frame is NULL while PyEval_GetLocals raises a runtime error and then returns NULL if frame is NULL. Raising a RuntimeError and then returning NULL from PyEval_GetGlobals if frame is NULL would be a better

[issue44114] Incorrect function signatures in dictobject.c

2021-05-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 925cb85e9e28d69be53db669527c0a1292f0fbfb by Miss Islington (bot) in branch '3.9': bpo-44114: Fix dictkeys_reversed and dictvalues_reversed function signatures (GH-26062) (GH-26093) https://github.com/python/cpython/commit/925cb85e9e28d69be53d

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2021-05-16 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +24796 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/26163 ___ Python tracker ___

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2021-05-16 Thread Tal Einat
Tal Einat added the comment: See PR GH-26163. -- stage: patch review -> needs patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2021-05-16 Thread Tal Einat
Tal Einat added the comment: Okay, so it appears that a generic solution for tkinter is non-trivial, as it is not clear when to call Tcl_Finalize() or Tcl_FinalizeThread(). However, giving tkinter apps the ability to call those when appropriate is possible. Exposing a thin wrapper around Tc

[issue42834] [subinterpreters] Make static caches in various places subinterpreter compatible

2021-05-16 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +24795 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/26161 ___ Python tracker ___ _

[issue42834] [subinterpreters] Make static caches in various places subinterpreter compatible

2021-05-16 Thread Ken Jin
Ken Jin added the comment: Hi Victor, I'm re-using this issue as I'm doing a similar change to compile.c. I hope you're alright with that. -- resolution: fixed -> status: closed -> open title: [subinterpreters] Convert "global" static variable caches in _json to heap variables -> [s

[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2021-05-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 26160 adds support of %d, %i, %u, %o, %x, %X, %f, %e, %g, %F, %E, %G. What is not supported: * Formatting with a single value not wrapped into a 1-tuple (like in "%d bytes" % size). The behavior is non-trivial, it needs checking whether the value is a

[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2021-05-16 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +Mark.Shannon versions: +Python 3.11 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list m

[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2021-05-16 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +24794 pull_request: https://github.com/python/cpython/pull/26160 ___ Python tracker ___

[issue44147] [WinError 193] %1 is not a valid Win32 application

2021-05-16 Thread Bassel
New submission from Bassel : I'm trying to import these libraries in python using this code: import matplotlib as plt from matplotlib import style import pandas as pd import pandas_datareader.data as web I get unresolved import for each line. I installed them using the terminal of Visual Studi

[issue44134] lzma: stream padding in xz files

2021-05-16 Thread rogdham
rogdham added the comment: It must be decided what to do in the following cases, which are not valid per the XZ file specification, but supported by the lzma module (and tested): 1. different format concatenated together (e.g. a .xz and a .lzma); this somehow includes tailing null bytes (12

[issue44141] Getting error while importing ssl "import _ssl ImportError: DLL load failed: The specified procedure could not be found."

2021-05-16 Thread Christian Heimes
Christian Heimes added the comment: OpenSSL 3.0.0 is in alpha phase, which means it is unstable, experimental, and not designed for end-users or production use. I recommend that you stick to OpenSSL 1.1.1. It will be supported until September 2023. -- resolution: -> wont fix stage:

[issue44141] Getting error while importing ssl "import _ssl ImportError: DLL load failed: The specified procedure could not be found."

2021-05-16 Thread Tarnum
Tarnum added the comment: Got it but this is a sad news for me... -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue44146] Format string fill not handling brace char

2021-05-16 Thread svs
New submission from svs : Format strings and f-strings don't seem to handle brace characters as a fill character. E.g. '{::>10d'.format(5) => ':5" (as expected) '{:{>10d'.format(5) => error. Expect: '{5" trying {{ escape does not work either. '{:{{>10d'.format(5) => error.

[issue26110] Speedup method calls 1.2x

2021-05-16 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +24793 pull_request: https://github.com/python/cpython/pull/26159 ___ Python tracker ___ ___ P

[issue44141] Getting error while importing ssl "import _ssl ImportError: DLL load failed: The specified procedure could not be found."

2021-05-16 Thread Christian Heimes
Christian Heimes added the comment: Python 3.7 is in security fix-only mode and will not get support for OpenSSL 3.0.0. Only Python 3.8, 3.9, 3.10 beta, and main branch contain OpenSSL 3.0.0 compatibility patches. -- ___ Python tracker

[issue39950] Add pathlib.Path.hardlink_to()

2021-05-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +24792 pull_request: https://github.com/python/cpython/pull/26158 ___ Python tracker ___ __

[issue44145] hmac.update is not releasing the GIL when openssl's hmac is used

2021-05-16 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +24791 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/26157 ___ Python tracker