[issue36392] IPv4Interface Object has no attributte prefixlen

2021-12-04 Thread Andrei Kulakov
Andrei Kulakov added the comment: The docs for current bugfix releases (3.9+) have clear links from the Interface class attribute `network` to the Network class which lists the `prefixlen` attribute. I don't think it can be made clearer - there's two ways to find it - either searching for

[issue44735] Failed venv Activation With "&" In Folder Name

2021-12-04 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44540] venv: activate.bat fails for venv with special characters in PATH

2021-12-04 Thread Eryk Sun
Change by Eryk Sun : -- stage: -> needs patch versions: +Python 3.10, Python 3.11 ___ Python tracker ___ ___ Python-bugs-list

[issue44735] Failed venv Activation With "&" In Folder Name

2021-12-04 Thread Andrei Kulakov
Andrei Kulakov added the comment: Duplicate of https://bugs.python.org/issue44540 -- nosy: +andrei.avk superseder: -> venv: activate.bat fails for venv with special characters in PATH ___ Python tracker

[issue45984] Error messages for invalid string prefixes and potential attribute accesses

2021-12-04 Thread theeshallnotknowethme
Change by theeshallnotknowethme : -- resolution: -> rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45984] Error messages for invalid string prefixes and potential attribute accesses

2021-12-04 Thread theeshallnotknowethme
Change by theeshallnotknowethme : -- resolution: rejected -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45981] Get raw file name in bytes from ZipFile

2021-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: UTF-16 uses null bytes. I'm sure there are other encodings that do, too. But I don't know if these encodings are permitted or common in zip files. -- ___ Python tracker

[issue45981] Get raw file name in bytes from ZipFile

2021-12-04 Thread Devourer Station
Devourer Station added the comment: Null bytes appear in abnormal zip files. (I haven't seen any multibyte encoding that represents a character with null bytes) But non-utf8 encodings are common in normal zip files, as windows uses different encodings for different language settings. (On

[issue43418] FTPLib error when server returns byte message instead of string

2021-12-04 Thread Andrei Kulakov
Andrei Kulakov added the comment: Closing as third party. Cowrie overrides ftplib.FTP class and implements __init__ in a way that doesn't work properly with some other methods of `FTP` class. -- resolution: -> third party stage: -> resolved status: open -> closed

[issue45980] Why there isn't a “Python 2.2” for PyPI's classifiers?

2021-12-04 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a performance issue. Why did you flag it as performance? Python 2.2 and 2.1 are so out of date that I'm just going to close this and not even ask why you are bothering to write and publish code for Python 2.2 :-) -- nosy:

[issue43474] http.server.BaseHTTPRequestHandler end_header() fails

2021-12-04 Thread Andrei Kulakov
Andrei Kulakov added the comment: It seems like sending zero headers is not supported, because: - if using http/1.0 https://www.rfc-editor.org/rfc/rfc7230#section-6.1 -- Connection: close must be sent - if using http/1.1 --

[issue44534] unittest.mock.Mock.unsafe doc is garbled

2021-12-04 Thread Andrei Kulakov
Change by Andrei Kulakov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11 -Python 3.9 ___ Python tracker

[issue45934] python curses newterm implementation

2021-12-04 Thread Éric Araujo
Change by Éric Araujo : -- stage: -> needs patch versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___

[issue45984] Error messages for invalid string prefixes and potential attribute accesses

2021-12-04 Thread theeshallnotknowethme
theeshallnotknowethme added the comment: I actually didn't know bpo-45982 existed. -- ___ Python tracker ___ ___ Python-bugs-list

[issue45984] Error messages for invalid string prefixes and potential attribute accesses

2021-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: Since the two reported problems are unrelated, this should be two bug reports. The first one does seem like a duplicate, as Pablo mentions. I haven’t checked to see if the second one already has an issue. -- nosy: +eric.smith

[issue45984] Error messages for invalid string prefixes and potential attribute accesses

2021-12-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Actually, is not technically a duplicate of https://bugs.python.org/issue45982 but is related. -- resolution: duplicate -> rejected ___ Python tracker

[issue45906] Python github installation issue

2021-12-04 Thread Christian Heimes
Christian Heimes added the comment: Could you please provide your operating system / Linux distro and the steps and commands you used to download Python from GitHub. Please also attach config.log file. -- ___ Python tracker

[issue45984] Error messages for invalid string prefixes and potential attribute accesses

2021-12-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Duplicate of https://bugs.python.org/issue45982 -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue45984] Error messages for invalid string prefixes and potential attribute accesses

2021-12-04 Thread theeshallnotknowethme
Change by theeshallnotknowethme : -- keywords: +patch pull_requests: +28142 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29916 ___ Python tracker

[issue45984] Error messages for invalid string prefixes and potential attribute accesses

2021-12-04 Thread theeshallnotknowethme
New submission from theeshallnotknowethme : In the current version of CPython, this code: if datetime.now()strftime(...) != "19:50:00": return produces this error: File "", line 4 if datetime.now()strftime(...) != "19:50:00": return SyntaxError: invalid

[issue10483] http.server - what is executable on Windows

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

[issue45982] Bug in Error messages

2021-12-04 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg407685 ___ Python tracker ___ ___ Python-bugs-list

[issue45982] Bug in Error messages

2021-12-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: It doesn't happen anymore with the latest 3.10: >>> if datetime.now()strftime(...) != "19:50:00": pass File "", line 1 if datetime.now()strftime(...) != "19:50:00": pass SyntaxError: invalid syntax --

[issue45982] Bug in Error messages

2021-12-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: It doesn't happen anymore with the latest 3.10: >>> if datetime.now(),strftime(...) != "19:50:00": pass File "", line 1 if datetime.now(),strftime(...) != "19:50:00": pass ^ SyntaxError: invalid syntax --

[issue10483] http.server - what is executable on Windows

2021-12-04 Thread mike mcleod
Change by mike mcleod : -- keywords: +patch pull_requests: +28141 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29624 ___ Python tracker ___

[issue45975] Simplify some while-loops with walrus operator

2021-12-04 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45975] Simplify some while-loops with walrus operator

2021-12-04 Thread Nick Drozd
Nick Drozd added the comment: > Is there any measurable performance benefit from this? I wouldn't expect any performance changes either way. If it worked out to be slower, that would an unpleasant surprise and a good reason to reject this change. If it worked out to be faster, well, that

[issue45982] Bug in Error messages

2021-12-04 Thread Matt Wozniski
Matt Wozniski added the comment: > Syntactically, this could be many possible errors: missing comma, missing > period, missing parens, missing brackets, etc. Syntactically, it cannot be a missing comma. Adding the comma is a syntax error. $ python3 -c 'if datetime.now(),strftime(...) !=

[issue13236] unittest needs more flush calls

2021-12-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f42a06ba279c916fb67289e47f9bc60dc5dee4ee by Serhiy Storchaka in branch 'main': bpo-13236: Flush the output stream more often in unittest (GH-29864) https://github.com/python/cpython/commit/f42a06ba279c916fb67289e47f9bc60dc5dee4ee --

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The issue is no longer reproduced by the original test because of the cache for dict key tables. But it is not gone, and can be reproduced with modified test. There may be many similar bugs in the Python core end extensions. Adding incref/decref in

[issue45976] Random._randbelow() loses time by caching an attribute lookup

2021-12-04 Thread Andrew Lin
Andrew Lin added the comment: E[calls] reduces down to 2**k / n. I only just realized from working that out that it therefore doesn't quite vary linearly over [2**k, 2**(k+1)), although by what weight one wants to average I couldn't say. Personally if the change adversely impacts

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +28140 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29915 ___ Python tracker ___

[issue45976] Random._randbelow() loses time by caching an attribute lookup

2021-12-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Notes = Without Boundmethod --- LOAD FAST self LOAD METHOD getrandbits LOAD FAST k CALL_METHOD 1 Form Boundmethod LOAD FAST self LOAD ATTR getrandbits STORE FAST getrandbits Call Boundmethod

[issue45964] gdb test fails when packaging Python 3.10 for openSUSE/Linux

2021-12-04 Thread Matej Cepl
Matej Cepl added the comment: > Matej, does your build system perhaps strip off the shebang of Lib/pdb.py? > That would explain why you are getting the function on line 93. Yes, that’s it. Thank you. -- resolution: -> not a bug stage: -> resolved status: open -> closed

[issue45947] Place dict (and values) pointers at a fixed (negative) offset from the base of the object.

2021-12-04 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45983] PyType_Spec.name must remain valid after PyType_FromSpec

2021-12-04 Thread Ronald Oussoren
Ronald Oussoren added the comment: I just noticed this duplicates #45315, sorry about the noise. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> `PyType_FromSpec` does not copy the name ___ Python tracker

[issue45983] PyType_Spec.name must remain valid after PyType_FromSpec

2021-12-04 Thread Ronald Oussoren
New submission from Ronald Oussoren : The documentation for PyType_Spec and the related functions is not clear about the required lifetime of fields of PyType_Spec. In particular, PyType_Spec.name must remain valid for the entire lifetime of types created with PyType_FromSpec*. The

[issue45906] Python github installation issue

2021-12-04 Thread Éric Araujo
Change by Éric Araujo : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45975] Simplify some while-loops with walrus operator

2021-12-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > As I mentioned in the PR, merging this can make future > backports to 3.6 and 3.7 more complicated. That's correct, but it is also true that we do very few of those and the likelihood of a conflict with one of these edits is low. --

[issue45934] python curses newterm implementation

2021-12-04 Thread Guido van Rossum
Guido van Rossum added the comment: This does not apply to Windows (we don’t support curses there). -- components: +Library (Lib) -C API, Windows ___ Python tracker ___

[issue45934] python curses newterm implementation

2021-12-04 Thread Guido van Rossum
New submission from Guido van Rossum : Since this is an enhancement, it should only target 3.11.-- --Guido (mobile) -- ___ Python tracker ___

[issue45982] Bug in Error messages

2021-12-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I concur with Eric: the purpose of the error message is a suggestion based in the most likely cause. Also we have recently refined this so I will trigger in less uncommon situations. -- resolution: -> not a bug stage: -> resolved status:

[issue45982] Bug in Error messages

2021-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: Syntactically, this could be many possible errors: missing comma, missing period, missing parens, missing brackets, etc. A human can figure it out based on semantics, but based purely on syntax, I think this error message is good enough. --

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-04 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45982] Bug in Error messages

2021-12-04 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31148] Can we get an MSI installer for something past 3.4.4?

2021-12-04 Thread Zachary Ware
Change by Zachary Ware : -- Removed message: https://bugs.python.org/msg407658 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue31148] Can we get an MSI installer for something past 3.4.4?

2021-12-04 Thread Zachary Ware
Change by Zachary Ware : -- Removed message: https://bugs.python.org/msg407637 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45982] Bug in Error messages

2021-12-04 Thread UnknownLITE
New submission from UnknownLITE : A dot is missing between `now()` and `strftime` but it is suggesting that most probably a comma is missing. -- components: Interpreter Core files: Screenshot 2021-12-04 202054.png messages: 407670 nosy: UnknownLITE priority: normal severity: normal

[issue45981] Get raw file name in bytes from ZipFile

2021-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: You would also need to decide what to do with these lines, just before the os.sep test: # Terminate the file name at the first null byte. Null bytes in file # names are used as tricks by viruses in archives. null_byte =

[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-12-04 Thread Christian Heimes
Christian Heimes added the comment: New changeset 64be8d369b7e3878078dbef466804ae8be49c1cf by Christian Heimes in branch 'main': bpo-45847: Update whatsnew and add place holder entries for missing extensions (GH-29914)

[issue45980] Why there isn't a “Python 2.2” for PyPI's classifiers?

2021-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: What's the use case for this? Can wheels even be installed in 2.2? I think it's safe to assume the classifiers are not present because they're outdated. I think https://github.com/pypa/pypi-support/issues would be the best place to report this, since it's

[issue45981] Get raw file name in bytes from ZipFile

2021-12-04 Thread Devourer Station
Devourer Station added the comment: In file Lib/zipfile.py: 1357> flags = centdir[5] 1358> if flags & 0x800: 1359># UTF-8 file names extension 1360>filename = filename.decode('utf-8') 1361> else: 1362># Historical ZIP filename encoding 1363>filename = filename.decode('cp437')

[issue45981] Get raw file name in bytes from ZipFile

2021-12-04 Thread Devourer Station
New submission from Devourer Station : It's quite annoying that ZipFile corrupts the filename by simply replacing '\\' with '/', not providing the raw file name in bytes to us. -- components: Library (Lib) messages: 407665 nosy: accelerator0099 priority: normal severity: normal

[issue45980] Why there isn't a “Python 2.2” for PyPI's classifiers?

2021-12-04 Thread chen-y0y0
chen-y0y0 added the comment: And NOT ONLY Python 2.2, there aren't also Python 2.1 or earlier version. -- ___ Python tracker ___

[issue45980] Why there isn't a “Python 2.2” for PyPI's classifiers?

2021-12-04 Thread chen-y0y0
New submission from chen-y0y0 : The output: Upload failed (400): Invalid value for classifiers. Error: Classifier ' Programming Language :: Python :: 2.2' is not a valid classifier. error: Upload failed (400): Invalid value for classifiers. Error: Classifier ' Programming Language :: Python ::

[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-12-04 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +28139 pull_request: https://github.com/python/cpython/pull/29914 ___ Python tracker ___

[issue45823] python stopped working

2021-12-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: The reproducer is absent, closing -- nosy: +asvetlov resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue45934] python curses newterm implementation

2021-12-04 Thread Julius Hamilton
Change by Julius Hamilton : -- nosy: +Guido.van.Rossum, juliushamilton100 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45979] Fix Tkinter tests with old Tk

2021-12-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +epaine ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45979] Fix Tkinter tests with old Tk

2021-12-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +28138 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29913 ___ Python tracker

[issue45979] Fix Tkinter tests with old Tk

2021-12-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Some recently added tests are not compatible with old Tk versions. I have build all 8.5 and 8.6 versions and build and test Tkinter against them. The proposed PR makes tests passes on Tk versions 8.5.4 to 8.5.19 and 8.6.0 to 8.6.12. There are some

[issue45978] deepfreeze opaquely fails on Windows when building from Visual Studio

2021-12-04 Thread Christian Heimes
Christian Heimes added the comment: Main requires a recent version of Python in order to bootstrap the build process. I just re-introduced _bootstrap_python for configure & make builds in bpo-45950. Could somebody with a Windows system re-add _bootstrap_python to Windows build process?

[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-04 Thread Ram Rachum
Ram Rachum added the comment: Okay, works for me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31148] Can we get an MSI installer for something past 3.4.4?

2021-12-04 Thread David Jack
David Jack added the comment: Thank you for the information. That will definitely be helpful. https://pcoptimizerpro.com/ -- ___ Python tracker ___

[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-04 Thread Irit Katriel
Irit Katriel added the comment: Exception message text is not part of the api. The type is. -- ___ Python tracker ___ ___

[issue45978] deepfreeze opaquely fails on Windows when building from Visual Studio

2021-12-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: Actually, it seems $(PythonForBuild) is already used everywhere, it's just that $(PythonForBuild) is giving the empty string when VS uses it. On the other hand, PCBuild/build.bat sets $(PythonForBuild) by calling out to find_python.bat, and that works

[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-04 Thread Ram Rachum
Ram Rachum added the comment: This might work here, but you'd need to be sure there isn't any important code that looks at the IncompleteRead exception and expects the data to be in its message. Also I hope that various tools like IDEs would learn quickly that they need to display the note

[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-12-04 Thread Christian Heimes
Christian Heimes added the comment: New changeset 4045392e0e3446362841b3336497cb6eeccfcd23 by Christian Heimes in branch 'main': bpo-45847: Port _ctypes partly to PY_STDLIB_MOD (GH-29747) https://github.com/python/cpython/commit/4045392e0e3446362841b3336497cb6eeccfcd23 --

[issue45978] deepfreeze opaquely fails on Windows when building from Visual Studio

2021-12-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: Sure enough, if I go to "Choose Default Apps by File Type" in Windows settings and associate ".py" --> "Notepad", then Visual studio keeps opening Notepad windows during build. Can the Visual Studio build configurations be made to run python scripts as

[issue45695] Out-of-tree builds are not tested.

2021-12-04 Thread Christian Heimes
Christian Heimes added the comment: New changeset cee07b162843694e8166ad8715162d4d5886b50f by Christian Heimes in branch 'main': bpo-45695: Test out-of-tree builds on GHA (GH-29904) https://github.com/python/cpython/commit/cee07b162843694e8166ad8715162d4d5886b50f --

[issue28953] Use `raise from` when raising new IncompleteRead

2021-12-04 Thread Irit Katriel
Irit Katriel added the comment: It’s meant for thing you want to add to the msg after the exception was created. The PR here seems to create a new exception of the same type in order to chain it with an additional msg. I’m suggesting that it might be sufficient to attach a note to the

[issue45978] deepfreeze opaquely fails on Windows when building from Visual Studio

2021-12-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: I think I've been getting similar issues for a little while that I've been able to work around until now. If I git checkout 3.10 and then hit the "Local Windows Debugger" button, I get this: Build started... 1>-- Build started: Project: pythoncore,

[issue45975] Simplify some while-loops with walrus operator

2021-12-04 Thread Irit Katriel
Irit Katriel added the comment: As I mentioned in the PR, merging this can make future backports to 3.6 and 3.7 more complicated. -- nosy: +iritkatriel ___ Python tracker

[issue45978] deepfreeze opaquely fails on Windows when building from Visual Studio

2021-12-04 Thread Dennis Sweeney
New submission from Dennis Sweeney : I'd love to know if there is something I'm doing wrong, but with recent deepfreeze changes, my Visual Studio 2019 setup has been having trouble build things. It seems PCBuild/build.bat works perfectly and all tests pass and everything, but using the GUI

[issue37198] _parse_localename fail to parse 'en_IL'

2021-12-04 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue40467] subprocess: replacement shell on windows with executable="..." arg

2021-12-04 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.11 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40467] subprocess: replacement shell on windows with executable="..." arg

2021-12-04 Thread Eryk Sun
Eryk Sun added the comment: > it might be nice if it's possible to give some sort of useful > warning/error when this happens -- perhaps say that specifying > both shell=True and executable="..." isn't supported on Windows? The `shell` parameter is documented as follows for Windows: On