[issue36466] Adding a way to strip annotations from compiled bytecode

2019-03-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Also note that functools.singledispatch depends on type annotations being present.¹턒² ¹ https://docs.python.org/3/library/functools.html#functools.singledispatch ² https://forum.dabeaz.com/t/singledispatch-and-the-visitor-pattern/395 --

[issue36490] Modernize function signature format in Archiving section of shutil doc

2019-03-30 Thread C.A.M. Gerlach
New submission from C.A.M. Gerlach : In the process of updating the documentation for another issue, I noticed that unlike the rest of the shutil doc (and the Python docs in general, not to mention those of virtually every Python package), all the functions in the [Archiving operations

[issue36085] Enable better DLL resolution

2019-03-30 Thread Steve Dower
Steve Dower added the comment: Thanks, David. I looked at the log quickly and it's what I expected, so I'll merge the PR and start advertising the change. Thanks everyone! -- ___ Python tracker

[issue36085] Enable better DLL resolution

2019-03-30 Thread Steve Dower
Steve Dower added the comment: New changeset 79da388a4016e24c4258dcc62cd0fa9dde0acb5b by Steve Dower in branch 'master': bpo-36085: Add installer check for KB2533625 (GH-12636) https://github.com/python/cpython/commit/79da388a4016e24c4258dcc62cd0fa9dde0acb5b --

[issue36085] Enable better DLL resolution

2019-03-30 Thread David Bolen
David Bolen added the comment: Ok, I've verified that on a Win7 system with SP1 but without KB2533625 I get the expected block screen at startup. On my worker (SP1 with KB2533625) it proceeds to the regular installation main dialog. I'm attaching a copy of the install log in the blocking

[issue36085] Enable better DLL resolution

2019-03-30 Thread Steve Dower
Steve Dower added the comment: > any chance at a 32-bit version of the installer Done (on the PR). Thanks! -- ___ Python tracker ___

[issue36085] Enable better DLL resolution

2019-03-30 Thread David Bolen
David Bolen added the comment: I can help with a Win7 test of the installer, but my currently available systems are all 32-bit - any chance at a 32-bit version of the installer? -- ___ Python tracker

[issue36485] Add a way to clear all caches

2019-03-30 Thread Michael Foord
Michael Foord added the comment: Tests codify knowledge about the system under test, so it doesn't matter that the test suite has to know how to clear caches. It's specifically a good thing that the test writer knows which caches exist and need clearing, and how to do it. The harder thing

[issue36293] Nonblocking read sys.stdin raises error

2019-03-30 Thread Martin Panter
Change by Martin Panter : -- resolution: -> duplicate ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36293] Nonblocking read sys.stdin raises error

2019-03-30 Thread Martin Panter
Martin Panter added the comment: I wasn’t sure about closing it, in case Cyker came back with more details. E.g. what was the use case? Were they mislead by the documentation? Do they just think the error should be different, or do they think there should be no error in this case? But I

[issue36480] .strip() unexpected output on Windows

2019-03-30 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36480] .strip() unexpected output on Windows

2019-03-30 Thread 78
78 <78alphadevi...@gmail.com> added the comment: I have read the documentation. It didn't function near what I thought it did. I've never heard it stripping front and back characters in tutorials. I solely admit I was wrong in assuming its function. On Sat, Mar 30, 2019, 3:35 PM Eric V. Smith

[issue36485] Add a way to clear all caches

2019-03-30 Thread Michael Foord
Michael Foord added the comment: > On 30 Mar 2019, at 23:48, Michael Foord wrote: > > > Michael Foord added the comment: > > An auto-magic cache clearing mechanism is really tempting. I tend to agree > with Raymond though, if code needs and progress a cache clearing mechanism it >

[issue36085] Enable better DLL resolution

2019-03-30 Thread Steve Dower
Steve Dower added the comment: New changeset ac19d9652799412404aef6b357a01057df34e005 by Steve Dower in branch 'master': bpo-36085: Add additional load flag to ensure DLL loads successfully (GH-12633) https://github.com/python/cpython/commit/ac19d9652799412404aef6b357a01057df34e005

[issue36485] Add a way to clear all caches

2019-03-30 Thread Michael Foord
Michael Foord added the comment: An auto-magic cache clearing mechanism is really tempting. I tend to agree with Raymond though, if code needs and progress a cache clearing mechanism it should be treated and accessible. They're are probably some problematic caches still within unittest

[issue36085] Enable better DLL resolution

2019-03-30 Thread Steve Dower
Steve Dower added the comment: I attached a build of the updated installer to PR 12636 (it's too big to attach here) in case anyone can help me test. It should block right at the start if you don't have the update, or else it'll go to the usual screen. The message just says "install SP1 and

[issue35403] support application/wasm in mimetypes and http.server

2019-03-30 Thread Martin Panter
Change by Martin Panter : -- superseder: -> http.server module sets incorrect mimetype for WebAssembly files ___ Python tracker ___

[issue35403] support application/wasm in mimetypes and http.server

2019-03-30 Thread Martin Panter
Martin Panter added the comment: According to Issue 34758, this was already added to 3.8’s “mimetypes”. -- nosy: +martin.panter resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue36467] IDLE to help with invisible characters

2019-03-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: The isprintable() method on str objects may be of help. -- ___ Python tracker ___ ___

[issue36466] Adding a way to strip annotations from compiled bytecode

2019-03-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for a command-line option decouples this from eliminating docstrings. The latter generally has no semantic effect, but the former might. Ideally, we don't want to break non-typing uses of annotations. One example below uses annotations for argument

[issue36485] Add a way to clear all caches

2019-03-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Not sure that I agree there is a testing need to clear all caches regardless of what they do. Test code should explicitly state whether it relies on a particular cache being cleared at some particular point in time. Also, the concept of "need to clear

[issue36480] .strip() unexpected output on Windows

2019-03-30 Thread Eric V. Smith
Eric V. Smith added the comment: I cannot run that example on my computer. Please reduce this to a single line of code, with no imports, that calls .strip() and shows your problem. Ideally you will just use constants, and not computed strings. Something like: >>>

[issue36480] .strip() unexpected output on Windows

2019-03-30 Thread 78
78 <78alphadevi...@gmail.com> added the comment: import binascii import os import re import sys import hashlib import json import codecs import threading import datetime from multiprocessing.pool import ThreadPool try: import PySimpleGUI_Custom as sg except: import PySimpleGUI as sg

[issue36085] Enable better DLL resolution

2019-03-30 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +12568 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-03-30 Thread jt
jt added the comment: Thank you so much for making it happen <3 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-03-30 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-03-30 Thread Steve Dower
Steve Dower added the comment: New changeset 3e78c7c30553baf72b7eb6fe3384d88fff549906 by Steve Dower (Miss Islington (bot)) in branch '3.7': bpo-36010: Add venv to the nuget distribution (GH-12367) https://github.com/python/cpython/commit/3e78c7c30553baf72b7eb6fe3384d88fff549906 --

[issue36085] Enable better DLL resolution

2019-03-30 Thread Steve Dower
Steve Dower added the comment: Thanks for the info, David! I guess the update isn't part of SP1. I'll add a check to the installer and update the note in What's New. Eryk - my thought on CWD was that the new process was not starting in the correct directory, which can sometimes happen. I

[issue36489] add filename_extension_map and/or content-types_map dict(s) to mimetypes

2019-03-30 Thread Daniel Black
New submission from Daniel Black : In https://bugs.python.org/issue36460 (which should be probably be disregarded until AMP is in RFC) I discovered that the types_map dictionary within the mimetypes module is a key: str to key: str (1:1) relationship. The reality is that many filename

[issue36085] Enable better DLL resolution

2019-03-30 Thread David Bolen
David Bolen added the comment: I just wanted to acknowledge that this was breaking on my Windows 7 builder (with a bad DLL load parameter in both pythoninfo and test steps). It looks like I was missing the required KB2533625 (the machine is mostly a virgin SP1 install), so I've installed

[issue36085] Enable better DLL resolution

2019-03-30 Thread Eryk Sun
Eryk Sun added the comment: WinDLL('./_sqlite3.dll') succeeds, which just delays the call to GetFullPathNameW to the CDLL constructor, so I don't see how the working directory is a factor. The difference I see is the lack of the LOAD_LIBRARY_SEARCH_DEFAULT_DIRS flag. Try including the

[issue36488] os.sendfile() on BSD and macOS does not return bytes sent on EINTR

2019-03-30 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- title: os.sendfile() on BSD OSs and macOS does not return bytes sent on EINTR -> os.sendfile() on BSD and macOS does not return bytes sent on EINTR ___ Python tracker

[issue36488] os.sendfile() on BSD OSs and macOS does not return bytes sent on EINTR

2019-03-30 Thread Ned Deily
Change by Ned Deily : -- title: BSD/OSX: os.sendfile() does not return bytes sent on EINTR -> os.sendfile() on BSD OSs and macOS does not return bytes sent on EINTR versions: -Python 3.6 ___ Python tracker

[issue30661] Support tarfile.PAX_FORMAT in shutil.make_archive

2019-03-30 Thread C.A.M. Gerlach
C.A.M. Gerlach added the comment: I opened a PR to implement both those changes, and also added some minor related clarifications and fixes to the format section of the tarfile docs. > how tarfile.Tarfile behaves if you tell it to open a PAX_FORMAT archive using > GNU_FORMAT or vice-versa

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2019-03-30 Thread mental
mental added the comment: Can this issue be closed? It's been inactive for a while and all it needs is a contributor to merge and close. Seems to me it's been resolved with PRs 117 and 120, the difference between them being 120 drops the inner brackets for the format usage (imo 120 should

[issue36085] Enable better DLL resolution

2019-03-30 Thread Steve Dower
Steve Dower added the comment: Guess the link in the devguide needs fixing... I'm out for the next few hours but will give it a go when I'm back. -- ___ Python tracker ___

[issue36268] Change default tar format to modern POSIX 2001 (pax) for better portability/interop, support and standards conformance

2019-03-30 Thread C.A.M. Gerlach
Change by C.A.M. Gerlach : -- pull_requests: +12567 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30661] Support tarfile.PAX_FORMAT in shutil.make_archive

2019-03-30 Thread C.A.M. Gerlach
Change by C.A.M. Gerlach : -- pull_requests: +12566 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue36466] Adding a way to strip annotations from compiled bytecode

2019-03-30 Thread Guido van Rossum
Guido van Rossum added the comment: +1 from me. Looking for a better way to enable this from the command line. Our alternative would be to maintain a local patch, since this definitely helps us. On Sat, Mar 30, 2019 at 12:04 AM Raymond Hettinger wrote: > > Raymond Hettinger added the

[issue36488] BSD/OSX: os.sendfile() does not return bytes sent on EINTR

2019-03-30 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36488] BSD/OSX: os.sendfile() does not return bytes sent on EINTR

2019-03-30 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : >From "man sendfile" on both OSX and FreeBSD: <<[EINTR] A signal interrupted sendfile() before it could be completed. If specified, the number of bytes successfully sent will be returned in *len.>> Right now we catch EINTR and simply retry. Instead we

[issue36085] Enable better DLL resolution

2019-03-30 Thread Zachary Ware
Zachary Ware added the comment: Try https://buildbot.python.org/all/#/builders?tags=%2Bcustom instead :) You can trigger a build by pushing to the `buildbot-custom` branch and if need be I can grant you SSH or RDP access to that worker, just let me know. --

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-03-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +12565 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-03-30 Thread Steve Dower
Steve Dower added the comment: New changeset e724152796a5a41544f52054506c6c2248242a5d by Steve Dower (Paul Moore) in branch 'master': bpo-36010: Add venv to the nuget distribution (GH-12367) https://github.com/python/cpython/commit/e724152796a5a41544f52054506c6c2248242a5d --

[issue36384] ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2019-03-30 Thread Eric V. Smith
Eric V. Smith added the comment: I think it should be 3.8 only, and the docs should be updated. Apologies for not catching that earlier: I searched via Google, which was a mistake. -- ___ Python tracker

[issue36384] ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2019-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also the article "Ping and FTP Resolve IP Address with Leading Zero as Octal" (https://web.archive.org/web/20061206211851/http://support.microsoft.com/kb/115388). This is still true in Windows 10. So it is safer to reject IPv4 addresses with leading

[issue36157] Document PyInterpreterState_Main().

2019-03-30 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: I will work on this in a separate PR. I opened #issue36487 (https://bugs.python.org/issue36487) to track this. -- ___ Python tracker ___

[issue36085] Enable better DLL resolution

2019-03-30 Thread Steve Dower
Steve Dower added the comment: Pushed a potential fix, assuming there's something weird going on with relying on cwd rather than full paths (I know there's some weirdness here when paths get too long, for example). Zach - this is one of your buildbots. Can we trigger a run from my branch?

[issue36487] Make C-API docs clear about what the "main" interpreter is

2019-03-30 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- assignee: -> nanjekyejoannah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36487] Make C-API docs clear about what the "main" interpreter is

2019-03-30 Thread Joannah Nanjekye
New submission from Joannah Nanjekye : Following up a discussion on a PR here : https://github.com/python/cpython/pull/12238, There is need to make sure the C-API docs are clear about what the "main" interpreter is. -- messages: 339207 nosy: nanjekyejoannah priority: normal severity:

[issue36085] Enable better DLL resolution

2019-03-30 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +12564 stage: commit review -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue36384] ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2019-03-30 Thread Ned Deily
Ned Deily added the comment: ipaddress is behaving as documented: "The following constitutes a valid IPv4 address: A string in decimal-dot notation, consisting of four decimal integers in the inclusive range 0–255, separated by dots (e.g. 192.168.0.1). Each integer represents an octet

[issue36384] ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2019-03-30 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36384] ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2019-03-30 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ned.deily status: pending -> open ___ Python tracker ___ ___ Python-bugs-list

[issue36384] ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2019-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: I've merged the change for Python 3.8 (thanks Joel!). I'm not sure whether to classify it as an enhancement or as an interoperability bug fix, though, so I've put the status to pending and added Ned to the nosy list to get his thoughts as the Python 3.7 RM.

[issue36384] ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2019-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset e653d4d8e820a7a004ad399530af0135b45db27a by Nick Coghlan (Joel Croteau) in branch 'master': bpo-36384: Remove check for leading zeroes in IPv4 addresses (GH-12577) https://github.com/python/cpython/commit/e653d4d8e820a7a004ad399530af0135b45db27a

[issue36486] Bugs and inconsistencies in unicodedata

2019-03-30 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36486] Bugs and inconsistencies in unicodedata

2019-03-30 Thread David Corbett
New submission from David Corbett : In `unicodedata`, the functions `lookup` and `name` have some bugs and inconsistencies. `lookup` matches case-insensitively, except for the algorithmic names of Hangul syllables and CJK unified ideographs, which must be in all caps. The documentation does

[issue36085] Enable better DLL resolution

2019-03-30 Thread Steve Dower
Steve Dower added the comment: Acknowledging the buildbot failure at https://buildbot.python.org/all/#builders/12/builds/2181 I'll try and take a look today. Apparently Windows 8 has a slightly different understanding of the flags used in ctypes tests? -- nosy: +pablogsal, vstinner

[issue19495] context manager for measuring duration of blocks of code

2019-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: I think Caleb's "sample_before_and_after" idea hints that this may be an idea that could benefit from the ExitStack treatment where contextlib provides a building block that handles the interaction with the context management machinery, with the documentation

[issue24214] UTF-8 incremental decoder doesn't support surrogatepass correctly

2019-03-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36434] Zipfile breaks if signalled during write()

2019-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report Andriy. 3.5 and 3.6 take only security bug fixes. -- versions: -Python 3.5, Python 3.6, Python 3.9 ___ Python tracker

[issue36434] Zipfile breaks if signalled during write()

2019-03-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue24214] UTF-8 incremental decoder doesn't support surrogatepass correctly

2019-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bd48280cb66544827952ca91e326cbb178c8c461 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-24214: Fixed the UTF-8 incremental decoder. (GH-12603) (GH-12627)

[issue36434] Zipfile breaks if signalled during write()

2019-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4724ba9b57c45ce4bca3c828f2ed8dcff3800a0c by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-36434: Properly handle writing errors in ZIP files. (GH-12559) (GH-12628)

[issue34602] python3 resource.setrlimit strange behaviour under macOS

2019-03-30 Thread Chih-Hsuan Yen
Chih-Hsuan Yen added the comment: I guess Inada Naoki was to say https://bugs.python.org/issue36432 in the last comment. -- nosy: +yan12125 ___ Python tracker ___

[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-03-30 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- nosy: +yan12125 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36483] Missing line in documentation example

2019-03-30 Thread Luis Muñoz
Luis Muñoz added the comment: My bad. Sorry for the inconvenience. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36236] Python crash on macOS when CWD is invalid

2019-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for sorting this out, Victor! -- resolution: -> fixed ___ Python tracker ___ ___

[issue14934] generator objects can clear their weakrefs before being resurrected

2019-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: If I recall correctly, it's the generator destructor that handles throwing in ``GeneratorExit`` to get the generator to terminate. So this code can resurrect a generator as it's being collected by the GC: def resurrecting(resurrected): self =

[issue16961] No regression tests for -E and individual environment vars

2019-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: Victor Stinner added a great many regression tests in this area for Python 3.7+ -- ___ Python tracker ___

[issue30661] Support tarfile.PAX_FORMAT in shutil.make_archive

2019-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: Aye, I agree that changing the default resolves the feature request here. I've recategorised this as a documentation issue, as the initial PR only changed the `tarfile` documentation, so the impact on `shutil` isn't obvious. So the changes needed will be: *

[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2019-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: I think test_embed would be the right home for this, as there's an existing test case there for subinterpreter lifecycles and repeated init/finalize cycles:

[issue36485] Add a way to clear all caches

2019-03-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +12563 stage: -> patch review ___ Python tracker ___ ___

[issue36485] Add a way to clear all caches

2019-03-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Some modules have caches. There is a need to clear all tests before running tests. Brett proposed to add in all modules with caches a function with the standardized name which is responsible for clearing module related caches. [1] The proposed PR adds a

[issue36426] exec() issue when used inside function

2019-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: This is not a bug - to enable function level optimisations, the compiler must be able to see all local variable names at compile time. In Python 2.x the exec statement implementation included special code to allow even function local variables to be rebound,

[issue36484] Can't reorder TLS 1.3 ciphersuites

2019-03-30 Thread Eman Alashwali
New submission from Eman Alashwali : Wen using the SSL module, I need to be able to reorder the ciphersuites list in TLS 1.3. I was able to do this with python using SSLContext.set_ciphers(ciphers) when working with TLS 1.2. But this is not possible with TLS 1.3 ciphersuites. The need to

[issue36469] Stuck during interpreter exit, attempting to take the GIL

2019-03-30 Thread Remy Noel
Remy Noel added the comment: Thanks for the advicesand thorough analysis. I'll try to force threads shutdown from the cleanup callback but i'd like to dig to the root of this isssue if possible. This is what the thread 7 python backtrace looks like: (gdb) py-bt Traceback (most recent call

[issue35947] Update libffi_msvc to current version of libffi

2019-03-30 Thread Zackery Spytz
Change by Zackery Spytz : -- pull_requests: +12562 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36483] Missing line in documentation example

2019-03-30 Thread Martin Panter
Martin Panter added the comment: Did you read the bracketed paragraph directly below, or try running the code with your “break” statement? I expect it would stop at the first prime number (two). But the output continues with more prime numbers. -- nosy: +martin.panter resolution: ->

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

2019-03-30 Thread Martin Panter
Martin Panter added the comment: On Linux, Gnu’s “install” command is happy if the target directory already exists; it just changes the mode (-m) etc. So the race isn’t a big deal. This is like the race I described (theoretical at the time) at ,

[issue36483] Missing line in documentation example

2019-03-30 Thread Luis Muñoz
New submission from Luis Muñoz : Hi, https://docs.python.org/3/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops The example is missing a break at the end of the else statement. First time reporting here. If there is an error in formating or anything else

[issue36426] exec() issue when used inside function

2019-03-30 Thread Domen Jurkovič
Domen Jurkovič added the comment: Are there any workarounds - how can we use exec() and on-the-fly created variables? Also, why 'locals()['bar']' is seen by the interpretter, but not ony 'bar'? -- ___ Python tracker

[issue36466] Adding a way to strip annotations from compiled bytecode

2019-03-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: -0 At first blush, this seems reasonable. Like removing docstrings, it would make the bytecode more compact. That said, annotations can be used for more things than typing (they predate typing and could be used for anything). It's unclear whether

[issue36482] let struct's internal cache use FIFO policy

2019-03-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't know that FIFO makessense in the context of how the struct module is typically used. Also rebuilding structs in cheap so there is very little need for further optimization. As far as I can tell, no user has ever reported a performance issue

[issue22831] Use "with" to avoid possible fd leaks

2019-03-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue22831] Use "with" to avoid possible fd leaks

2019-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 172bb39452ae8b3ccdf5d1f23ead46f44200cd49 by Serhiy Storchaka in branch 'master': bpo-22831: Use "with" to avoid possible fd leaks in tools (part 2). (GH-10927) https://github.com/python/cpython/commit/172bb39452ae8b3ccdf5d1f23ead46f44200cd49

[issue22831] Use "with" to avoid possible fd leaks

2019-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset afbb7a371fb44edc731344eab5b474ad8f7b57d7 by Serhiy Storchaka in branch 'master': bpo-22831: Use "with" to avoid possible fd leaks in tools (part 1). (GH-10926) https://github.com/python/cpython/commit/afbb7a371fb44edc731344eab5b474ad8f7b57d7

[issue36434] Zipfile breaks if signalled during write()

2019-03-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +12561 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36434] Zipfile breaks if signalled during write()

2019-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2524fdefc9bb2a97b99319190aeb23703079ad4c by Serhiy Storchaka in branch 'master': bpo-36434: Properly handle writing errors in ZIP files. (GH-12559) https://github.com/python/cpython/commit/2524fdefc9bb2a97b99319190aeb23703079ad4c --

[issue24214] UTF-8 incremental decoder doesn't support surrogatepass correctly

2019-03-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +12560 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17110] sys.argv docs should explaining how to handle encoding issues

2019-03-30 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue24214] UTF-8 incremental decoder doesn't support surrogatepass correctly

2019-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7a465cb5ee7e298cae626ace1fc3e7d97df79f2e by Serhiy Storchaka in branch 'master': bpo-24214: Fixed the UTF-8 incremental decoder. (GH-12603) https://github.com/python/cpython/commit/7a465cb5ee7e298cae626ace1fc3e7d97df79f2e --