[issue43551] [Subinterpreters]: PyImport_Import use static silly_list under building Python with --with-experimental-isolated-subinterpreters share silly_list in multi subinterpreters cause crash.

2021-03-19 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +23691 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24929 ___ Python tracker ___

[issue43551] [Subinterpreters]: PyImport_Import use static silly_list under building Python with --with-experimental-isolated-subinterpreters share silly_list in multi subinterpreters cause crash.

2021-03-19 Thread junyixie
New submission from junyixie : fix PyImport_Import use static silly_list under building Python with --with-experimental-isolated-subinterpreters share silly_list in multi subinterpreters cause crash. Under the sub interpreters parallel, PyObject_CallFunction clean stack,

[issue43539] test_asyncio: test_sendfile_close_peer_in_the_middle_of_receiving() fails randomly

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: It failed again: https://github.com/python/cpython/pull/24933/checks?check_run_id=2148450378 -- ___ Python tracker ___

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-43557 "Deprecate getdefaultlocale(), getlocale() and normalize() functions". Let's discuss deprecating getdefaultlocale() there. -- ___ Python tracker

[issue43557] Deprecate getdefaultlocale(), getlocale() and normalize() functions

2021-03-19 Thread STINNER Victor
New submission from STINNER Victor : I propose to deprecate getdefaultlocale(), getlocale() and normalize() functions since they have multiple issues, and remove them in Python 3.12. The normalize() function uses the locale.locale_alias dictionary which was copied from the X11 locale

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Inada Naoki
Inada Naoki added the comment: > I created this issue while reviewing the implementation of the PEP 597: PR > 19481. What I want is same to `locale.getpreferredencoding(False)` but ignores UTF-8 mode. Background: PEP 597 adds new `encoding="locale"`option to open() and TextIOWrapper(). It

[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: I replied to INADA-san message on bpo-43552: https://bugs.python.org/issue43552#msg389091 > I had forgot to consider about UTF-8 mode while finishing PEP 597. If > possible, I want to ignore UTF-8 mode when `encoding="locale"` is specified > from Python

[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-19 Thread Inada Naoki
Inada Naoki added the comment: > Since the final goal is to move everybody towards to UTF-8, I'm not sure how > it's a good thing. The final goal (the third motivation of the pep 597) is changing the default encoding (i.e. encoding used when it is not specified) to UTF-8. But forcing

[issue43557] Deprecate getdefaultlocale(), getlocale() and normalize() functions

2021-03-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: +1 on getdefaultlocale() as mentioned in https://bugs.python.org/issue43552 However, -1 on getlocale() and normalize(). Those two are needed to access and successfully set the locale on Linux: the lib C setlocale() is very picky about locale names and so

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 19.03.2021 16:15, Inada Naoki wrote: > > `locale.getpreferredencoding()` is special, because it "Return the encoding > used for text data, according to user preferences. User preferences are > expressed differently on different systems, and might not

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 19.03.2021 13:25, Eryk Sun wrote: >> My assumption is that nl_langinfo(CODESET) does not work on Windows >> or gives wrong results. Is that incorrect ? > > There is no such function for CRT locales. I provided two alternatives that > would allow

[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: I see different cases when open() is called with no encoding argument: (A) User wants to use UTF-8: add encoding="utf-8" (B) Windows user wants to use the ANSI code page of their computer, local file not intended to be shared with other computers: add

[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-03-19 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: https://bugs.python.org/issue43179 and https://mail.python.org/archives/list/python-...@python.org/thread/F5BXISYP7RAINXUMYJSEYG7GCFRFAENF/ discussions didn't reach kind of consensus. I'm tired of these discussions, so I just closed my PR 24534. If someone

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: > - If you add "current", people will rightly ask: then what do all the > other APIs in the locale module return ? Of course, they all return > the current state of settings :-) So this is unnecessary as well. The problem is that there are two different

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: Hum, latest messages are specific to the PEP 597 (implementation). > I had forgot to consider about UTF-8 mode while finishing PEP 597. I propose to continue the discussion about the PEP 597 in bpo-43510. I replied there. I prefer to keep this issue to

[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-19 Thread Inada Naoki
Inada Naoki added the comment: > (1) "UTF-8" in the UTF-8 Mode, or the locale encoding > (2) Always use the locale encoding, ignore the UTF-8 Mode > > What I don't expect is the current behavior, before PEP 597. Who uses open() > without specifying an encoding but always want to use the

[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-03-19 Thread John Paul Adrian Glaubitz
John Paul Adrian Glaubitz added the comment: I think there is one productive result of this discussion which is this patch by Jessica Clark which gets rid of architecture-specific alignment code: > https://github.com/python/cpython/pull/24624 Unfortunately, it has not seen any positive

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: > If Python calls setlocale() per default now, it has served its purpose. Except not for embedding applications if configure_locale [1] isn't set. But in that case determining the default locale isn't Python's problem to solve. > My assumption is that

[issue43546] "Impossible" KeyError from importlib._bootstrap acquire line 110

2021-03-19 Thread Anentropic
Anentropic added the comment: Upgrading ddtrace lib to latest version did not help. Disabling ddtrace patching of django module does make the error go away. Thanks again for your help, I will move my bug report over to ddtrace. -- ___ Python

[issue43244] Move PyArena C API to the internal C API

2021-03-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23694 pull_request: https://github.com/python/cpython/pull/24933 ___ Python tracker ___

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: > In UTF-8 mode, it's fine to `open(filename)` uses UTF-8. But I want to use > "locale encoding" for `open(filename, encoding="locale")` because "locale" > encoding is specified. Is it about the current implementation of the PEP 597, or are you thinking at

[issue43555] Location of SyntaxError with new parser missing (after continuation character)

2021-03-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gvanrossum, lys.nikolaou, pablogsal ___ Python tracker ___ ___ Python-bugs-list

[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-03-19 Thread Eric V. Smith
New submission from Eric V. Smith : https://docs.python.org/3/library/dataclasses.html#post-init-processing should mention that if you need to call super().__init__, you should do it in __post_init__. Dataclasses cannot know what parameters to pass to the super class's __init__, so you'll

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Inada Naoki
Inada Naoki added the comment: > Please address UTF-8 mode explicitly in open() or elsewhere. The locale > module is about the state of the lib C, not what Python enforces via > options in its own I/O layers. I agree with you. APIs in locale module shouldn't aware UTF-8 mode.

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Inada Naoki
Inada Naoki added the comment: > Is it about the current implementation of the PEP 597, or are you thinking at > the future Python which would use UTF-8 by default? I had forgot to consider about UTF-8 mode while finishing PEP 597. If possible, I want to ignore UTF-8 mode when

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 14:47, STINNER Victor wrote: > > STINNER Victor added the comment: > >> - If you add "current", people will rightly ask: then what do all the >> other APIs in the locale module return ? Of course, they all return >> the current state of settings :-) So this is unnecessary as well.

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 14:57, Inada Naoki wrote: > > Background: PEP 597 adds new `encoding="locale"`option to open() and > TextIOWrapper(). It is same to `encoding=None` for now, but it means using > "locale encoding" explicitly. > > But this is wrong in UTF-8 mode. Please address UTF-8 mode

[issue41718] test.regrtest has way too many imports

2021-03-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23695 pull_request: https://github.com/python/cpython/pull/24934 ___ Python tracker ___

[issue43561] Modify XML parsing library descriptions to forewarn of content loss hazard

2021-03-19 Thread Larry Trammell
New submission from Larry Trammell : With reference to improvement issue 43560 : If those improvements remain unimplemented, or are demoted to "don't fix", users are left in the tricky situation where XML parsing applications can fail, apparently "losing content" in a rare and unpredictable

[issue43484] we can create valid datetime objects that become invalid if the timezone is changed

2021-03-19 Thread Éric Araujo
Change by Éric Araujo : -- nosy: +eric.araujo versions: -Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43559] ctypes: Heap Pointer is damaged between C and Python

2021-03-19 Thread Canberk Sönmez
Canberk Sönmez added the comment: Alright, I solved the problem. It was simply a typo: "restypes" instead of "res_types". It didn't cause a problem in Python 3.6 but obviously, something was changed. A nice error message might be nice when setting these attributes. -- resolution: ->

[issue43559] ctypes: Heap Pointer is damaged between C and Python

2021-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: Are you using a 64-bit version of python? What is sys.maxsize? -- nosy: +eric.smith ___ Python tracker ___

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-19 Thread Larry Trammell
Larry Trammell added the comment: Check out issues 43560 (an enhancement issue to improve handling of small XML content chunks) 43561 (a documentation issue to give users warning about the hazard in the interim before the changes are implemented) --

[issue41718] test.regrtest has way too many imports

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "You could save/restore this data only when corresponded modules was imported, like it was done in clear_caches() in refleak.py." That's a very good idea! I implemented it in PR 24934. But I modified runtest() to use *two* saved_test_environment

[issue43535] Make str.join auto-convert inputs to strings.

2021-03-19 Thread Matthew Barnett
Matthew Barnett added the comment: I'm also -1, for the same reason as Serhiy gave. However, if it was opt-in, then I'd be OK with it. -- nosy: +mrabarnett ___ Python tracker

[issue43560] Modify SAX/expat parsing to avoid fragmentation of already-tiny content chunks

2021-03-19 Thread Larry Trammell
New submission from Larry Trammell : Issue 43483 was posted as a "bug" but retracted. Though the problem is real, it is tricky to declare an UNSPECIFIED behavior to be a bug. See that issue page for more discussion and a test case. A brief overview is repeated here. SCENARIO - XML PARSING

[issue43520] Make Fraction(string) handle non-ascii slashes

2021-03-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with Raymond, at least for now. I would expect the string argument to Fraction to be quoted legal Python code. Without a lot of thought and discussion leading to a change in python design with respect to unicode and operators, this limits '/' to

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Inada Naoki
Inada Naoki added the comment: > Why is it being specified that the current LC_CTYPE encoding should be > ignored in Windows when a "locale" encoding is requested? Because `encoding="locale"` must be replacement of the current `encoding=None` (i.e. locale.getpreferredencoding(False).

[issue43452] Microoptimize PyType_Lookup for cache hits

2021-03-19 Thread Dino Viehland
Dino Viehland added the comment: Setup a micro-benchmark, foo.c: #define PY_SSIZE_T_CLEAN #include #include #include int main(int argc, char *argv[]) { wchar_t *program = Py_DecodeLocale(argv[0], NULL); if (program == NULL) { fprintf(stderr, "Fatal error: cannot decode

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: > But please discuss it in another issue. What's returned by locale.get_locale_encoding() and locale.get_current_locale_encoding() is relevant to adding them as new functions and is a chance to implement this correctly in Windows. You're right that what open()

[issue28188] os.putenv should support bytes arguments on Windows

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: I thought this was a good idea at the time, but a core dev never took up the mantle in over 4 years, and no one else showed interest. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue43520] Make Fraction(string) handle non-ascii slashes

2021-03-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Dr Racket supports fraction conversions but insists on a forward slash just like we do. Welcome to DrRacket, version 7.9.0.17--2020-12-24(f6b7f93/a) [cs]. Language: racket, with debugging; memory limit: 128 MB. > (/ 1 2) 1/2 > (string->number "3/5") 3/5 >

[issue33140] shutil.chown on Windows

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: Apparently there's no one else interested in implementing shutil.chown() in Windows. Okay, but as long as that's the case, the definition should be skipped in Windows, which is an easy problem. -- components: -IO keywords: +easy versions: +Python 3.10,

[issue23948] Deprecate os.kill() on Windows

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: I'd prefer to change os.kill() to take the code path that generates a console control event only when the pid value is negative (i.e. a process group ID), with -1 reserved to send the event to all processes in the console session (i.e. console process group 0).

[issue43526] Programmatic management of BytesWarning doesn't work for native triggers.

2021-03-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.10 -Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43535] Make str.join auto-convert inputs to strings.

2021-03-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am sympathetic to the 'hiding bugs' argument in general, but what bugs would this proposal hide? What bugs does print hide by auto-converting non-strings to strings? I recently had the same thought as Raymond's: "it would be nice if str.join converted

[issue33140] shutil.chown should not be defined in Windows

2021-03-19 Thread Eryk Sun
Change by Eryk Sun : -- title: shutil.chown on Windows -> shutil.chown should not be defined in Windows ___ Python tracker ___ ___

[issue23948] Deprecate os.kill() on Windows

2021-03-19 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg256166 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43544] mimetype default list make a wrong guess for illustrator file

2021-03-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: -Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43535] Make str.join auto-convert inputs to strings.

2021-03-19 Thread Vedran Čačić
Vedran Čačić added the comment: Matthew: can you then answer the same question I asked Serhiy? The example usually given when advocating strong typing is whether 2 + '3' should be '23' or 5. Our uneasiness with it doesn't stem from coercions between int and str, but from the fact that + has

[issue43565] PyUnicode_KIND macro does not has specified return type

2021-03-19 Thread Max Bachmann
New submission from Max Bachmann : The documentation stated, that the PyUnicode_KIND macro has the following interface: - int PyUnicode_KIND(PyObject *o) However it actually returns a value of the underlying type of the PyUnicode_Kind enum. This could be e.g. an unsigned int as well.

[issue24505] shutil.which wrong result on Windows

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: Regarding Toby's patch: Probably _is_windows_nt_internal_command() isn't needed or desired. It's more of a command-line parsing issue, rather than a file-search issue. For example, CMD will search for an internal name if it's quoted in double quotes in the

[issue37894] [win] shutil.which can not find the path if 'cmd' include directory path and not include extension name

2021-03-19 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> shutil.which wrong result on Windows ___ Python tracker

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: I'm no longer interested in solving the SIGINT event problem locally at the wait site. A common implementation of _Py_Sleep, _Py_WaitForSingleObject, and _Py_WaitForMultipleObjects is needed. _winapi.WaitForSingleObject would call _Py_WaitForSingleObject and

[issue26350] [Windows] signal.signal and os.kill doc should better explain what is supported

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: The signal.signal() docs should explain that only SIGINT and SIGBREAK can be signaled from another process, and only if the current process is a console application. A link to os.kill() could be added, which should explain their use as signals in relation to

[issue43559] ctypes: Heap Pointer is damaged between C and Python

2021-03-19 Thread Canberk Sönmez
New submission from Canberk Sönmez : Please see the SO post: https://stackoverflow.com/questions/66713071/ctypes-heap-pointer-is-damaged-between-c-and-python-linux-x86-64 In summary, when I return a pointer to a heap-allocated memory location from a C function, its most significant 32 bits

[issue43554] email: encoded headers lose their quoting when refolded

2021-03-19 Thread hai shi
Change by hai shi : -- nosy: +barry, maxking, r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43550] pip.exe is missing from the NuGet package

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: I suppose if you really need a plain `pip` command, you could reinstall with `python.exe -m pip install --force-reinstall pip`. -- nosy: +eryksun ___ Python tracker

[issue43494] Minor changes to Objects/lnotab_notes.txt

2021-03-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 7cb033c423b65def1632d6c3c747111543b342a2 by Skip Montanaro in branch 'master': bpo-43494: Make some minor changes to lnotab notes (GH-24861) https://github.com/python/cpython/commit/7cb033c423b65def1632d6c3c747111543b342a2 -- nosy:

[issue43484] valid datetimes can become invalid if the timezone is changed

2021-03-19 Thread Paul Ganssle
Paul Ganssle added the comment: > That it allows creating the datetime instance looks like a bug to me, i.e. a > time before 0001-01-01 00:00 UTC is invalid. What am I misunderstanding? `datetime.datetime(1, 1, 1, tzinfo=timezone(timedelta(hours=1)))` is a valid datetime, it's just that it

[issue43484] valid datetimes can become invalid if the timezone is changed

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: Thank you for thoughtful and detailed answer, Paul. -- ___ Python tracker ___ ___ Python-bugs-list

[issue43562] test_ssl.NetworkedTests.test_timeout_connect_ex fails if network is unreachable

2021-03-19 Thread Carl Meyer
Change by Carl Meyer : -- keywords: +patch pull_requests: +23697 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24937 ___ Python tracker ___

[issue43487] Rename __unicode__ methods to __str__ in 2to3 conversion

2021-03-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43484] valid datetimes can become invalid if the timezone is changed

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: That it allows creating the datetime instance looks like a bug to me, i.e. a time before 0001-01-01 00:00 UTC is invalid. What am I misunderstanding? -- nosy: +eryksun ___ Python tracker

[issue43494] Minor changes to Objects/lnotab_notes.txt

2021-03-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Skip, if you do not make a backport, you can close this. -- ___ Python tracker ___ ___

[issue43518] textwrap.shorten does not always respect word boundaries

2021-03-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Verified in 3.10.0a6 that change is at 3 !s. I agree that is is a bug relative to the doc. The issue is that 'world!!!' is 8 chars, and by default, wrap splits that into 'w' and 'orld!!!' and add ' w' to 'hello'. >>> sh('hello world!!!', width=7) ['hello

[issue43484] valid datetimes can become invalid if the timezone is changed

2021-03-19 Thread mike bayer
mike bayer added the comment: > I don't really know why it would be a "security vulnerability", but presumably a library could either convert their datetimes to UTC as soon as they get them from the user if they want to use them as UTC in the future, or they could simply refuse to accept

[issue43564] ftp tests in test_urllib2net fail instead of skipping on unreachable network

2021-03-19 Thread Carl Meyer
Change by Carl Meyer : -- keywords: +patch pull_requests: +23699 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24938 ___ Python tracker ___

[issue43481] PyEval_EvalCode() namespace issue not observed in Python 2.7.

2021-03-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I cannot reproduce in Python with either 3.8 or 3.10. (Please try with latter if you can.) I thought the issue might possibly be passing two different dicts, which results in the code being executed as if in a class statement, but it is not. code = '''

[issue43484] valid datetimes can become invalid if the timezone is changed

2021-03-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: This tracker is for patching CPython, including the docs. Questions for discussion should be posted to python-list. Perhaps such a discussion would lead to a concrete change proposal. In the meanwhile, I think that this should be closed as 'not a bug'

[issue43490] IDLE freezes at random

2021-03-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: How are you starting IDLE? How are you using the turtle module? What does "can't get the window open" mean exactly? Does the menu item Shell => Restart Shell work? -- nosy: +terry.reedy ___ Python tracker

[issue43504] Site linked in docs, effbot.org, down

2021-03-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> needs patch title: effbot.org down -> Site linked in docs, effbot.org, down versions: +Python 3.10, Python 3.8, Python 3.9 ___ Python

[issue43563] Use dedicated opcodes to speed up calls/attribute lookups with super() as receiver

2021-03-19 Thread Vladimir Matveev
Change by Vladimir Matveev : -- keywords: +patch pull_requests: +23696 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24936 ___ Python tracker

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: > But it is not what I want for now. I want to ignore UTF-8 mode > when `encoding="locale"` is specified. > This is almost "only in Windows" issue, and users can use > `encoding="mbcs"` in Windows-only script. Why is it being specified that the current LC_CTYPE

[issue43494] Minor changes to Objects/lnotab_notes.txt

2021-03-19 Thread Skip Montanaro
Skip Montanaro added the comment: Closing, per Terry's comment. -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43562] test_ssl.NetworkedTests.test_timeout_connect_ex fails if network is unreachable

2021-03-19 Thread Carl Meyer
New submission from Carl Meyer : In general it seems the CPython test suite takes care to not fail if the network is unreachable, but `test_timeout_connect_ex` fails because the result code of the connection is checked without any exception being raised that would reach

[issue43563] Use dedicated opcodes to speed up calls/attribute lookups with super() as receiver

2021-03-19 Thread Vladimir Matveev
New submission from Vladimir Matveev : Calling methods and lookup up attributes when receiver is `super()` has extra cost comparing to regular attribute lookup. It mainly comes from the need to allocate and initialize the instance of the `super` which for zero argument case also include

[issue43563] Use dedicated opcodes to speed up calls/attribute lookups with super() as receiver

2021-03-19 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43564] some tests in test_urllib2net fail instead of skipping on unreachable network

2021-03-19 Thread Carl Meyer
New submission from Carl Meyer : In general it seems the CPython test suite takes care to skip instead of failing networked tests when the network is unavailable (c.f. `support.transient_internet` test helper). In this case of the 5 FTP tests in `test_urllib2net` (that is, `test_ftp`,

[issue43564] ftp tests in test_urllib2net fail instead of skipping on unreachable network

2021-03-19 Thread Carl Meyer
Change by Carl Meyer : -- title: some tests in test_urllib2net fail instead of skipping on unreachable network -> ftp tests in test_urllib2net fail instead of skipping on unreachable network ___ Python tracker

[issue43564] ftp tests in test_urllib2net fail instead of skipping on unreachable network

2021-03-19 Thread Carl Meyer
Carl Meyer added the comment: Created a PR that fixes this by being more consistent in how urllib wraps network errors. If there are backward-compatibility concerns with this change, another option could be some really ugly regex-matching code in `test.support.transient_internet`.

[issue43550] pip.exe is missing from the NuGet package

2021-03-19 Thread Steve Dower
Steve Dower added the comment: Unfortunately not, because we don't know where it will be installed to, and that executable embeds the full path to its matching python.exe. I suggest running "python.exe -m pip" instead. -- ___ Python tracker

[issue43555] Location of SyntaxError with new parser missing (after continuation character)

2021-03-19 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +23700 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24939 ___ Python tracker

[issue43554] email: encoded headers lose their quoting when refolded

2021-03-19 Thread Emil Styrke
New submission from Emil Styrke : When a header with an encoded (QP or Base64) display_name is refolded, it may lose (some of) its encoding. If it then contains illegal "atext" tokens, an invalid header will result. For example, `From: =?utf-8?Q?a=2C=20123456789012345678901234567890123456?=

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 10:17, STINNER Victor wrote: > > New submission from STINNER Victor : > > I propose to add two new functions: > > * locale.get_locale_encoding(): it's exactly the same than > locale.getpreferredencoding(False). > > * locale.get_current_locale_encoding(): always get the current

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +23693 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24931 ___ Python tracker ___

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-19 Thread Christian Heimes
Christian Heimes added the comment: I'm leaving the ticket open as a reminder for me to update whatsnew. -- components: +Documentation ___ Python tracker ___

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread STINNER Victor
New submission from STINNER Victor : I propose to add two new functions: * locale.get_locale_encoding(): it's exactly the same than locale.getpreferredencoding(False). * locale.get_current_locale_encoding(): always get the current locale encoding. Read the ANSI code page on Windows, or

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-19 Thread Christian Heimes
Christian Heimes added the comment: New changeset 32eba61ea431c76f15a910c0a4eded7f5f8b9b34 by Christian Heimes in branch 'master': bpo-43466: Add --with-openssl-rpath configure option (GH-24820) https://github.com/python/cpython/commit/32eba61ea431c76f15a910c0a4eded7f5f8b9b34 --

[issue43553] [sqlite3] Improve test coverage

2021-03-19 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Attached patch improves the code coverage of the sqlite3 module. I've used llvm-cov for coverage measurement. I'll create a PR for this, if you're fine with this, Berker/Serhiy. Filename RegionsMissed Regions Cover

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: I created this issue while reviewing the implementation of the PEP 597: PR 19481. Copy of my comments on the PR related to this issue. _locale.get_locale_encoding() calls _Py_GetLocaleEncoding() which returns UTF-8 if the Python UTF-8 Mode is enabled.

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: I created PR 24931 to add locale.get_current_locale_encoding(). I tried to clarified the differences between the "current locale encoding" and the "locale encoding". Maybe we should rename the "locale encoding" to the "Python locale encoding", since it's

[issue43244] Move PyArena C API to the internal C API

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 28ad12f8fe889a741661eb99daacebd9243cc1ba by Victor Stinner in branch 'master': bpo-43244: Remove symtable.h header file (GH-24910) https://github.com/python/cpython/commit/28ad12f8fe889a741661eb99daacebd9243cc1ba --

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 12:05, STINNER Victor wrote: > I'm not sure what to do with locale.getdefaultlocale(). Should we deprecate > it? I never used this function. How is it used? For which purpose? > > I undertand that in 2000, locale.getdefaultlocale() was interesting to avoid > calling

[issue43556] fix attr names for ast.expr and ast.stmt

2021-03-19 Thread Samwyse
New submission from Samwyse : In Doc/library/ast.rst, the lineno and end_col attributes are repeated; the second set should have 'end_' prefixed to them. Also, there's a minor indentation error in the RST file. # diff ast.rst ast.rst~ 78c78 < col_offset --- >

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-19 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: FYI, thread started on https://discuss.python.org/t/what-to-do-with-unsafe-macros/7771?u=erlendaasland -- ___ Python tracker ___

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 12:35, Eryk Sun wrote: > > Eryk Sun added the comment: > >> Read the ANSI code page on Windows, > > I don't see why the Windows implementation is inconsistent with POSIX here. > If it were changed to be consistent, the default encoding at startup would > remain the same, since

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 12:26, STINNER Victor wrote: > > STINNER Victor added the comment: > > Recently, I spent some days to document properly encodings used by Python. Thanks for documenting this. I would prefer to leave the locale module to really just an interface to the lib C locale logic and not

[issue43492] Upgrade to SQLite 3.35.2 in macOS and Windows

2021-03-19 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: SQLite 3.35.3 is upcoming: https://sqlite.org/forum/forumpost/6e2b05ad62?t=h Seems like we'll have to wait a little bit for 3.35 to stabilise. -- ___ Python tracker

  1   2   >