[issue46856] datetime.max conversion

2022-02-25 Thread Joris Geysens
Joris Geysens added the comment: a ValueError is raised : ValueError: year 1 is out of range on dt = datetime.fromtimestamp(ts, tz=timezone.utc) or dt = datetime.utcfromtimestamp(ts) -- ___ Python tracker

[issue26175] Fully implement IOBase abstract on SpooledTemporaryFile

2022-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Éric, you might use git log or git blame to see who that is active has patched the relevant file in the last few years. -- ___ Python tracker ___

[issue46843] PersistentTaskGroup API

2022-02-25 Thread Joongi Kim
Joongi Kim added the comment: > And just a question: I'm just curious about what happens if belonging tasks > see the cancellation raised from their inner tasks. Sibling tasks should not > be cancelled, and the outer task group should not be cancelled, unless the > task group itself has req

[issue26175] Fully implement IOBase abstract on SpooledTemporaryFile

2022-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Also, which of the two patches. Irit, you just patched Temp file doc, can you look at the PR code? -- nosy: +iritkatriel ___ Python tracker

[issue46853] Python interpreter can get code from memory, it is not secure.

2022-02-25 Thread Brett Cannon
Brett Cannon added the comment: This is by design and thus not a security hole or bug. Also, for any future security issues, please disclose them responsibly by following the instructions at https://www.python.org/dev/security/ . -- nosy: +brett.cannon resolution: -> not a bug stage

[issue46843] PersistentTaskGroup API

2022-02-25 Thread Joongi Kim
Joongi Kim added the comment: Short summary: PersistentTaskGroup shares the followings from TaskGroup: - It uses WeakSet to keep track of child tasks. - After exiting the async context manager scope (or the shutdown procedure), it ensures that all tasks are complete or cancelled. PersistentT

[issue37426] getpass.getpass not working with on windows when ctrl+v is used to enter the string

2022-02-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: -terry.reedy versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue46810] Make multiprocessing.connection.Client support ipv6

2022-02-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +davin, pitrou title: multiprocessing.connection.Client doesn't support ipv6 -> Make multiprocessing.connection.Client support ipv6 ___ Python tracker

[issue46816] Remove declarations for non-__STDC__ compilers

2022-02-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue46833] Windows installer is unclear and has redundant settings

2022-02-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: Installer Wizard is unclear and has redundant settings -> Windows installer is unclear and has redundant settings ___ Python tracker ___ _

[issue46838] Parameters and arguments parser syntax error improvments

2022-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: With two exceptions, nice suggestions if feasible. >>> def foo(*args=None): pass SyntaxError: * argument cannot have default value >>> def foo(**kwargs=None): pass SyntaxError: ** argument cannot have default value Good. >>> foo(*args=[0]) SyntaxError: cann

[issue46858] mmap constructor resets the file pointer on Windows

2022-02-25 Thread benrg
New submission from benrg : On Windows, `mmap.mmap(f.fileno(), ...)` has the undocumented side effect of setting f's file pointer to 0. The responsible code in mmapmodule is this: /* Win9x appears to need us seeked to zero */ lseek(fileno, 0, SEEK_SET); Win9x is no longer supported,

[issue46845] dict: Use smaller entry for Unicode-key only dict.

2022-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: CPython, at least, allows users to insert non-string keys in namespace dicts that are conceptually string-key only. >>> globals()[0] = 'zero' >>> globals()[0] 'zero' >>> vars() {'__name__': '__main__', ..., 0: 'zero'} [This is for consenting adults only, as

[issue46855] printing a string with strange characters loops forever

2022-02-25 Thread svilen dobrev
svilen dobrev added the comment: aha. ctrl-s also closes it. seems kind-of ( ctrl-q - ctrl-s ) https://en.wikipedia.org/wiki/Software_flow_control thanks, closing this. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Py

[issue46849] Memory problems detected using Valgrind

2022-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: It is possible that some core developer may get regular valgrind reports, but I would not know who. I am pretty sure that you should run it at least on the latest release of the 'main' branch, 3.11.0a5, and perhaps even better, the current tip. There might

[issue46854] Failed to compile static python3.7.12

2022-02-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue46856] datetime.max conversion

2022-02-25 Thread Joris Geysens
Joris Geysens added the comment: I see this in the python source code being tested (datetimetester.py), so I guess it is a rounding problem : # maximum timestamp: set seconds to zero to avoid rounding issues max_dt = self.theclass.max.replace(tzinfo=timezone.utc,

[issue46856] datetime.max conversion

2022-02-25 Thread Eric V. Smith
Eric V. Smith added the comment: Probably so. You could step through the code to make sure that's what's going on. -- ___ Python tracker ___ _

[issue46838] Parameters and arguments parser syntax error improvments

2022-02-25 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +29713 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31590 ___ Python tracker __

[issue46845] dict: Use smaller entry for Unicode-key only dict.

2022-02-25 Thread Inada Naoki
Inada Naoki added the comment: > > > Do you propose to > 1. Only use StringKeyDicts when non-string keys are not possible? (Where > would this be?) > 2. Switch to a normal dict when a non-string key is added? (But likely > not switch back when the last non-string key is removed.) > 3. Depreca

[issue46816] Remove declarations for non-__STDC__ compilers

2022-02-25 Thread STINNER Victor
STINNER Victor added the comment: It should be fine :-D Thanks. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46816] Remove declarations for non-__STDC__ compilers

2022-02-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4060111f9dc44682f9d7bdafb4e7dacb96706ad3 by Oleg Iarygin in branch 'main': bpo-46816: Remove declarations for non-__STDC__ compilers (GH-31466) https://github.com/python/cpython/commit/4060111f9dc44682f9d7bdafb4e7dacb96706ad3 -- _

[issue46859] NameError: free variable 'outer' referenced before assignment in enclosing scope

2022-02-25 Thread Norman Fung
New submission from Norman Fung : In reference to ticket (which was fix for Python 3.9 or above) https://bugs.python.org/issue46672?@ok_message=msg%20413975%20created%0Aissue%2046672%20nosy_count%2C%20nosy%2C%20messages%2C%20message_count%20edited%20ok&@template=item I encountered this problem

[issue46841] Inline bytecode caches

2022-02-25 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +29714 pull_request: https://github.com/python/cpython/pull/31591 ___ Python tracker ___ ___

[issue45459] Limited API support for Py_buffer

2022-02-25 Thread STINNER Victor
STINNER Victor added the comment: I close again the issue, the C API should now be fine :-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46852] Remove the float.__setformat__() method

2022-02-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5ab745fc51e159ead28b523414e52f0bcc1ef353 by Victor Stinner in branch 'main': bpo-46852: Remove the float.__set_format__() method (GH-31585) https://github.com/python/cpython/commit/5ab745fc51e159ead28b523414e52f0bcc1ef353 -- _

[issue46852] Remove the float.__setformat__() method

2022-02-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29715 pull_request: https://github.com/python/cpython/pull/31592 ___ Python tracker ___ __

[issue46860] `--with-suffix` not respected on case-insensitive file systems

2022-02-25 Thread Brett Cannon
New submission from Brett Cannon : If you use `--with-suffix` on a case-insensitive file system it is ultimately ignored and forced to `.exe`. PR incoming. -- assignee: brett.cannon components: Build messages: 414051 nosy: brett.cannon priority: normal severity: normal status: open ti

[issue46860] `--with-suffix` not respected on case-insensitive file systems

2022-02-25 Thread Brett Cannon
Change by Brett Cannon : -- keywords: +patch pull_requests: +29716 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31593 ___ Python tracker ___ ___

[issue46838] Parameters and arguments parser syntax error improvments

2022-02-25 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue46838] Parameters and arguments parser syntax error improvments

2022-02-25 Thread Andrej Klychin
Andrej Klychin added the comment: @terry.reedy, I based that error message on current >>> foo(**{}, *()) SyntaxError: iterable argument unpacking follows keyword argument unpacking and >>> foo(__debug__=True) SyntaxError: cannot assign to __debug__ but the final error message could be anythin

[issue46748] Python.h includes stdbool.h

2022-02-25 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 2c228a7b8f89e9ed8d390370abd771d4993b79d8 by Petr Viktorin in > branch 'main': > bpo-46748: Don't import in public headers (GH-31553) It seems like this change broke ctypes on some architectures like s390x: https://buildbot.python.org/all/#/b

[issue46854] Failed to compile static python3.7.12

2022-02-25 Thread aprpp
aprpp <916495...@qq.com> added the comment: I have signed the contributor agreement -- ___ Python tracker ___ ___ Python-bugs-list

[issue46859] NameError: free variable 'outer' referenced before assignment in enclosing scope

2022-02-25 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: 3.8 is only receiving security fixes now. Please upgrade. If you cannot upgrade, I suggest manually applying the patch from https://github.com/python/cpython/pull/31441/files to your installation of Python. -- nosy: +Jelle Zijlstra resolution: -> o

[issue46857] Python leaks one reference at exit on Windows

2022-02-25 Thread Jeremy Kloth
Jeremy Kloth added the comment: Good news, the difference on Windows was easy enough to find, bad news total refs are now negative! --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -3647,8 +3647,7 @@ _PyBuiltins_AddExceptions(PyObject *bltinmod) #define INIT_ALIAS(NAME, TYPE) \

[issue46857] Python leaks one reference at exit on Windows

2022-02-25 Thread Jeremy Kloth
Jeremy Kloth added the comment: Note that an allocated block is still leaking. Strange as well, when using dump_refs, the total refs are much more negative (-12 linux, -13 Windows) -- ___ Python tracker __

[issue46857] Python leaks one reference at exit on Windows

2022-02-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29717 pull_request: https://github.com/python/cpython/pull/31594 ___ Python tracker ___ __

[issue46857] Python leaks one reference at exit on Windows

2022-02-25 Thread STINNER Victor
STINNER Victor added the comment: > Good news, the difference on Windows was easy enough to find, bad news total > refs are now negative! Oh wow. How did you find this leak? Did you read all C files and check for code specific to Windows? How did you proceed? Well spotted! > #define INIT_

[issue46854] Failed to compile static python3.7.12

2022-02-25 Thread Ned Deily
Ned Deily added the comment: Successfully building a statically-linked version of Python depends greatly on the environment in which you are trying to build it and is really beyond the scope of this bug tracker. You don't say on which OS platform and version you are attempting this so it is

[issue46854] Failed to compile static python3.7.12

2022-02-25 Thread aprpp
Change by aprpp <916495...@qq.com>: -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46857] Python leaks one reference at exit on Windows

2022-02-25 Thread Jeremy Kloth
Jeremy Kloth added the comment: > Oh wow. How did you find this leak? Did you read all C files and check for > code specific to Windows? How did you proceed? Well spotted! Initially, I modified Py_INCREF to dump the object (addr & tp_name) on initial inc (ob_refcnt == 1) and Py_DECREF to dump

[issue46854] Failed to compile static python3.7.12

2022-02-25 Thread aprpp
aprpp <916495...@qq.com> added the comment: The platform i build python3.7.12 on is Ubuntu18.04, I would like to know how the modules I fail to build, like _ctypes, should be added in Modules/Setup. The steps for my build are: 1.tar -zxvf Python-3.7.12.tgz && cd Python-3.7.12 2.edit Modules/Set

[issue46857] Python leaks one reference at exit on Windows

2022-02-25 Thread Jeremy Kloth
Jeremy Kloth added the comment: > ./configure --enabled-shared --with-py-debug --with-trace-refs (that's what I get for typing from memory): ./configure --enable-shared --with-pydebug --with-trace-refs > > I proposed GH-31594 to fix this macro. > > Even using that change, I still have negativ

[issue46854] Failed to compile static python3.7.12

2022-02-25 Thread aprpp
aprpp <916495...@qq.com> added the comment: As shown in the attachment, how should I add the definition of module _ctypes to Modules/Setup? Modules like _ctypes are not given in Modules/Setup.dist, I really don't know what they depend on -- Added file: https://bugs.python.org/file5064

[issue46861] os.environ forces variable names to upper case on Windows

2022-02-25 Thread benrg
New submission from benrg : The Windows functions that deal with environment variables are case-insensitive and case-preserving, like most Windows file systems. Many environment variables are conventionally written in all caps, but others aren't, such as `ProgramData`, `PSModulePath`, and `wi

[issue46854] Failed to compile static python3.7.12

2022-02-25 Thread Ned Deily
Ned Deily added the comment: Sorry, I'll repeat: "Successfully building a statically-linked version of Python depends greatly on the environment in which you are trying to build it and is really beyond the scope of this bug tracker." Note, a quick web search found this page which should give

[issue46854] Failed to compile static python3.7.12

2022-02-25 Thread Ned Deily
Ned Deily added the comment: P.S. One other suggestion: try building a non-static version of Python 3.7 first, i.e. without modifying Modules/Setup, and, once you get that working, it should be easier to examine the output from the build and copy those paths that setup.py found into your Mod

[issue45735] Promise the long-time truth that `args=list` works

2022-02-25 Thread Tim Peters
Tim Peters added the comment: New changeset e466faa9df9a1bd377d9725de5484471bc4af8d0 by Charlie Zhao in branch 'main': bpo-45735: Promise the long-time truth that `args=list` works (GH-30982) https://github.com/python/cpython/commit/e466faa9df9a1bd377d9725de5484471bc4af8d0 -- _

[issue46862] subprocess makes environment blocks with duplicate keys on Windows

2022-02-25 Thread benrg
New submission from benrg : On Windows, if one writes env = os.environ.copy() env['http_proxy'] = 'whatever' or either of the documented equivalents ({**os.environ, ...} or (os.environ | {...})), and passes the resulting environment to subprocess.run or subprocess.Popen, the spawned

[issue46854] Failed to compile static python3.7.12

2022-02-25 Thread aprpp
aprpp <916495...@qq.com> added the comment: I'm really sorry, I would like to know what environment is the official recommendation for static python3.7 compilation? What are the steps and commands for compilation officially required? Because the static python3.7 is very important to me, it ha

[issue46859] NameError: free variable 'outer' referenced before assignment in enclosing scope

2022-02-25 Thread Norman Fung
Norman Fung added the comment: Thanks Jelle, let me try upgrade first. Norman On Sat, Feb 26, 2022 at 9:27 AM Jelle Zijlstra wrote: > > Jelle Zijlstra added the comment: > > 3.8 is only receiving security fixes now. Please upgrade. If you cannot > upgrade, I suggest manually applying the p

[issue46858] mmap constructor resets the file pointer on Windows

2022-02-25 Thread Eryk Sun
Eryk Sun added the comment: The resize() method also modifies the file pointer. Instead of fixing that oversight, I think it should directly set the file's FileEndOfFileInfo and FileAllocationInfo. For example: // resize the file if (!SetFileInformationByHandle(

[issue46863] Python 3.10 OpenSSL Configuration Issues

2022-02-25 Thread Adam Pinckard
New submission from Adam Pinckard : Python 3.10 does not appear to respecting the OpenSSL configuration within linux. Testing completed using Pyenv on both Ubuntu 20.04.4 and Centos-8. Note PEP 644 which requires OpenSSL >= 1.1.1 is released in Python 3.10. We operate behind a corporate proxy

[issue46854] Failed to compile static python3.7.12

2022-02-25 Thread Ned Deily
Ned Deily added the comment: “I would like to know what environment is the official recommendation for static python3.7 compilation.” There is no official recommendation. As I’ve mentioned, we normally do not build with modified Modules/Setup configurations when developing and releasing Pyth

[issue46862] subprocess makes environment blocks with duplicate keys on Windows

2022-02-25 Thread Eryk Sun
Eryk Sun added the comment: This should be handled in _winapi.CreateProcess(). An environment block is technically required to be sorted. (Ages ago this was a MUST requirement for getting and setting variables to work correctly, since the implementation depended on the sort order, but I thin

[issue43702] [Windows] correctly sort and remove duplicates in _winapi getenvironment()

2022-02-25 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.11 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue46862] subprocess makes environment blocks with duplicate keys on Windows

2022-02-25 Thread Eryk Sun
Eryk Sun added the comment: I suggest closing this issue as a duplicate of bpo-43702. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue45991] Improve ambiguous docstrings in pkgutil

2022-02-25 Thread Barney Gale
Barney Gale added the comment: Should pkgutil call os.fspath() in this case? -- nosy: +barneygale ___ Python tracker ___ ___ Python

[issue46859] NameError: free variable 'outer' referenced before assignment in enclosing scope

2022-02-25 Thread Andrew Svetlov
Andrew Svetlov added the comment: Also, fix is 1 week old. There are no python releases with the fix included yet. On Sat, Feb 26, 2022, 06:58 Norman Fung wrote: > > Norman Fung added the comment: > > Thanks Jelle, let me try upgrade first. > > Norman > > On Sat, Feb 26, 2022 at 9:27 AM Jel

[issue28824] os.environ should preserve the case of the OS keys ?

2022-02-25 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue46861] os.environ forces variable names to upper case on Windows

2022-02-25 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> os.environ should preserve the case of the OS keys ? ___ Python tracker ___

[issue46712] Share global string identifiers in deepfreeze

2022-02-25 Thread Kumar Aditya
Change by Kumar Aditya : -- pull_requests: +29718 pull_request: https://github.com/python/cpython/pull/31596 ___ Python tracker ___

[issue46859] NameError: free variable 'outer' referenced before assignment in enclosing scope

2022-02-25 Thread Norman Fung
Norman Fung added the comment: Thanks Andrew for heads up. *1. My laptop (Windows 10) *with no changes runs happily with no error from here. python 3.8.5 asyncio 3.4.3 2. *My Windows VM (AWS EC2)* is where the whole mess is happening. I *upgraded *from Python 3.8.5 to 3.9.7. Asynio st

[issue46430] intern strings in deepfrozen modules

2022-02-25 Thread Kumar Aditya
Change by Kumar Aditya : -- pull_requests: +29719 pull_request: https://github.com/python/cpython/pull/31596 ___ Python tracker ___

[issue46859] NameError: free variable 'outer' referenced before assignment in enclosing scope

2022-02-25 Thread Norman Fung
Norman Fung added the comment: Also, i reverted back to python 3.8.5 and overwrote task.py as recommended. I think that version we dont already have "GenericAlias". import asyncio File "C:\ProgramData\Anaconda3\lib\asyncio\__init__.py", line 8, in from .base_events import * File "

[issue44011] Borrow asyncio ssl implementation from uvloop

2022-02-25 Thread Kumar Aditya
Change by Kumar Aditya : -- pull_requests: +29720 pull_request: https://github.com/python/cpython/pull/31597 ___ Python tracker ___

<    1   2