[issue36791] sum() relies on C signed overflow behaviour

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

[issue36791] sum() relies on C signed overflow behaviour

2019-05-03 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : sum() assumes that an arithmetic operation on signed longs will wrap modulo 2**(bits_in_long) on overflow. However, signed overflow causes undefined behaviour according to the C standards (e.g., C99 6.5, para. 5), and gcc is known to assume that

[issue36656] Allow os.symlink(src, target, force=True) to prevent race conditions

2019-05-03 Thread Tom Hale
Tom Hale added the comment: Yes, but by default (because of difficulty) people won't check for this case: 1. I delete existing symlink in order to recreate it 2. Attacker watching symlink finds it deleted and recreates it 3. I try to create symlink, and an unexpected exception is raised

A nice collection of often useful awesome Python frameworks

2019-05-03 Thread heshanfu
A nice collection of often useful awesome Python frameworks, libraries and software. https://pythonawesome.com/ -- https://mail.python.org/mailman/listinfo/python-list

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252

2019-05-03 Thread STINNER Victor
STINNER Victor added the comment: cp65001 is *not* utf-8: Microsoft decided to handle surrogates differently for some reasons. -- ___ Python tracker ___

[issue36774] f-strings: Add a !d conversion for ease of debugging

2019-05-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Steven: We shouldn't block this immediately useful feature from going > in for f-strings on waiting for some much broader first class access > to expressions feature. !d would be practical today. I hear you, and after giving it much more thought I

android development

2019-05-03 Thread togethercomltd
please i want some insight on how to build a file recovery application for android. how do i start aboutit? -- https://mail.python.org/mailman/listinfo/python-list

[issue34155] email.utils.parseaddr mistakenly parse an email

2019-05-03 Thread Windson Yang
Windson Yang added the comment: Frome the answer from Alnitak (https://stackoverflow.com/questions/12355858/how-many-symbol-can-be-in-an-email-address). Maybe we should raise an error when the address has multiple @ in it. -- ___ Python tracker

[issue33777] dummy_threading: .is_alive method returns True after execution has completed

2019-05-03 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: I also see inconsistent behaviorbetween the enumerate() functions in threading and dummy_threading: Python 3.7.3 (default, May 1 2019, 00:00:47) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more

[issue33777] dummy_threading: .is_alive method returns True after execution has completed

2019-05-03 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: This behavior still exists in 3.7.3: Python 3.7.3 (default, May 1 2019, 00:00:47) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from dummy_threading import Thread >>> def f():

[issue34155] email.utils.parseaddr mistakenly parse an email

2019-05-03 Thread jpic
jpic added the comment: The pull request has been updated to mimic net/mail's behavior rather than trying to workaround user input. Before: >>> email.message_from_string('From: a...@malicious.org@important.com', policy=email.policy.default)['from'].addresses (Address(display_name='',

Re: Populating a timetable with subjects

2019-05-03 Thread DL Neil
On 4/05/19 11:51 AM, Cameron Simpson wrote: On 01May2019 19:22, britt...@gmail.com wrote: We have to populate a timetable with subjects. What would be the best approach? That's a pretty open ended question. Often a constraint on generating timetables involves ensuring that no 2 subjects use

[issue36790] test_asyncio fails with application verifier!

2019-05-03 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +asvetlov, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36790] test_asyncio fails with application verifier!

2019-05-03 Thread Alexander Riccio
Alexander Riccio added the comment: Hmm, proceeding a bit further pointed to finish_recv in windows_events.py -- Added file: https://bugs.python.org/file48299/python_invalid_handle.PNG ___ Python tracker

[issue36790] test_asyncio fails with application verifier!

2019-05-03 Thread Alexander Riccio
New submission from Alexander Riccio : I compiled PCBuild Debug x64 from an updated clone of upstream, and when running the testsuite under Application Verifier with handle verification, the test triggers an invalid handle access by passing an invalid overlapped handle to CancelIoEx with

[issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes

2019-05-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: This is right for 99.99% cases: utf8 doesn't encode any character except explicit zero with zero bytes. UTF-16 for example encodes 'a' as b'\xff\xfea\x00' -- nosy: +asvetlov ___ Python tracker

Re: Errorcode when running scripts in PyCharm

2019-05-03 Thread Cameron Simpson
Two further things: 1: A keyboard macro of mine mangled my reply. Where I had: http://www.cskk.ezoshosting.com/cs/ you just want "\h", i.e. "C:\Users\hampu\..". Apologies. 2: If your command prompt is already in your "lab4" folder you don't need the full file path. You can just say

[issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes

2019-05-03 Thread mbiggs
New submission from mbiggs : In the Unicode HOWTO: http://docs.python.org/3.3/howto/unicode.html It says the following: "UTF-8 has several convenient properties: (...) 2. A Unicode string is turned into a sequence of bytes containing no embedded zero bytes. This avoids byte-ordering issues,

Re: Errorcode when running scripts in PyCharm

2019-05-03 Thread Cameron Simpson
On 02May2019 04:35, Hampus Sjödin wrote: Den torsdag 2 maj 2019 kl. 13:31:29 UTC+2 skrev DL Neil: On 2/05/19 11:05 PM, Hampus Sjödin wrote: > Hey guys, so I've managed to ruin PyCharm for myself.. I just finished my first script in PyCharm and I tried renaming the file, so I closed PyCharm to

[issue34155] email.utils.parseaddr mistakenly parse an email

2019-05-03 Thread jpic
jpic added the comment: I haven't found this specific case in an RFC, but checked Go's net/mail library behavior and it just considers it broken: $ cat mail.go package main import "fmt" import "net/mail" func main() { fmt.Println(({}).Parse("a...@example.com"))

Re: Populating a timetable with subjects

2019-05-03 Thread Cameron Simpson
On 01May2019 19:22, britt...@gmail.com wrote: We have to populate a timetable with subjects. What would be the best approach? That's a pretty open ended question. Often a constraint on generating timetables involves ensuring that no 2 subjects use the same timeslot if a student might need

Re: Configuration confusion = Friday Filosofical Finking

2019-05-03 Thread Cameron Simpson
On 04May2019 09:02, DL Neil wrote: When configuring an application, which mechanisms do you [not] use for setting particular operating-parameters, and/or do you *only* utilise a particular method to initialise certain categories of configuration-data? [...] I don't conventions with have

[issue36788] Add clamp() function to builtins

2019-05-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: I doubt this is important enough to go into builtins, the only practical use-case I know of for this function is with numbers, so this could go in the math module. But putting that aside, there are some other problems: - it isn't clear that clamp() is

[issue36787] Python3 regresison: String formatting of None object

2019-05-03 Thread Eric V. Smith
Eric V. Smith added the comment: This behavior isn't going to change. As Zach says, if you want to convert any value to a string, use !s. We want to fail as soon as possible: if a class (such as NoneType) doesn't implement __format__, then trying to format an instance with a format spec

[issue36788] Add clamp() function to builtins

2019-05-03 Thread TheComet
TheComet added the comment: I have implemented it on my branch here: https://github.com/TheComet/cpython/blob/fix-issue-36788/Python/bltinmodule.c It still needs further testing and I haven't leak checked it properly. -- ___ Python tracker

[issue36788] Add clamp() function to builtins

2019-05-03 Thread TheComet
New submission from TheComet : It would be nice to have a clamp() builtin in addition to min() and max() so one can type e.g. "clamp(value, 2, 5)" instead of having to type "min(max(value, 5), 2)". -- components: Library (Lib) messages: 341358 nosy: TheComet priority: normal

[issue34155] email.utils.parseaddr mistakenly parse an email

2019-05-03 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +12994 stage: -> patch review ___ Python tracker ___ ___

Configuration confusion = Friday Filosofical Finking

2019-05-03 Thread DL Neil
When configuring an application, which mechanisms do you [not] use for setting particular operating-parameters, and/or do you *only* utilise a particular method to initialise certain categories of configuration-data? Apologies: as they say in football, this is a game of two halves... 1 In

Re: Where is getstatusoutput() in subprocess module?

2019-05-03 Thread MRAB
On 2019-05-03 20:41, Grant Edwards wrote: I'm trying to update a python2 app to make it python3 compatible. It uses commands.getstatusoutput(), which according to https://docs.python.org/2/library/commands.html#commands.getstatusoutput ... getstatusoutput() and getoutput() have been moved to

[issue36787] Python3 regresison: String formatting of None object

2019-05-03 Thread Zachary Ware
Zachary Ware added the comment: You can use `!s` to be sure that the object is a string: >>> '{!s:^10}'.format(None) ' None ' I think it's unlikely the behavior of NoneType.__format__ will be changed, but I'm adding Eric Smith to make that determination as the maintainer of str.format.

Re: Where is getstatusoutput() in subprocess module?

2019-05-03 Thread Grant Edwards
On 2019-05-03, Grant Edwards wrote: > I'm trying to update a python2 app to make it python3 compatible. It > uses commands.getstatusoutput(), which according to > > https://docs.python.org/2/library/commands.html#commands.getstatusoutput > > ... getstatusoutput() and getoutput() have been moved

[issue36787] Python3 regresison: String formatting of None object

2019-05-03 Thread Gawain Bolton
Gawain Bolton added the comment: Note: I have a patch which fixes this. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36787] Python3 regresison: String formatting of None object

2019-05-03 Thread Gawain Bolton
New submission from Gawain Bolton : Python 2.7.16 (default, Apr 6 2019, 01:42:57) [GCC 8.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print('{:^10}'.format(None)) None However this

Re: Checking network input processing by Python for a multi-threaded server

2019-05-03 Thread Markus Elfring
> I suggested UDP as a TEST, not for the end use... I can understand such a suggestion. Can it distract from other software surprises? > If UDP gives you the results you expect, it most likely means there is a > problem There is a questionable software behaviour still waiting for a

Where is getstatusoutput() in subprocess module?

2019-05-03 Thread Grant Edwards
I'm trying to update a python2 app to make it python3 compatible. It uses commands.getstatusoutput(), which according to https://docs.python.org/2/library/commands.html#commands.getstatusoutput ... getstatusoutput() and getoutput() have been moved to the subprocess module. Where are they? --

[issue36758] configured libdir not correctly passed to Python executable

2019-05-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: I can reproduce the problem. The Makefile uses LIBDIR as set by configure to install the libraries and this is not consistent with Modules/getpath.c that finds the locations of the libraries (see the detailed comments at the top of the source file) without

[issue14440] Close background process if IDLE closes abnormally.

2019-05-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: outdated -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue32309] Implement asyncio.run_in_executor shortcut

2019-05-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: In Python 3.7 loop.run_in_executor() is the only user-faced method that requires a loop. asyncio.ThreadPool() sounds great. Maybe thread group can provide better api. But for Python 3.8 adding `run_in_executor` top-level function looks the only easy and

[issue36786] "make install" should run compileall in parallel

2019-05-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +12993 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue35148] cannot activate a venv environment on a Swiss German windows

2019-05-03 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> venv activate.bat reset codepage fails on windows 10 ___ Python tracker

[issue28238] In xml.etree.ElementTree findall() can't search all elements in a namespace

2019-05-03 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue28238] In xml.etree.ElementTree findall() can't search all elements in a namespace

2019-05-03 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 47541689ccea79dfcb055c6be5800b13fcb6bdd2 by Stefan Behnel in branch 'master': bpo-28238: Implement "{*}tag" and "{ns}*" wildcard tag selection support for ElementPath, and extend the surrounding tests and docs. (GH-12997)

[issue36785] Implement PEP 574

2019-05-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- assignee: -> pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36785] Implement PEP 574

2019-05-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +12992 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue36786] "make install" should run compileall in parallel

2019-05-03 Thread Antoine Pitrou
New submission from Antoine Pitrou : Title says it all. Currently, "make install" will bytecode-compile Python sources sequentially even though compileall supports doing it in parallel. -- components: Build messages: 341350 nosy: pitrou priority: normal severity: normal stage: needs

[issue36785] Implement PEP 574

2019-05-03 Thread Antoine Pitrou
New submission from Antoine Pitrou : Now that PEP 574 (Pickle protocol 5 with out-of-band data) has been accepted, it should be implemented. -- components: Extension Modules, Library (Lib) messages: 341349 nosy: ncoghlan, pitrou priority: normal severity: normal stage: needs patch

[issue33882] doc Mention breakpoint() in debugger-related FAQ

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

[issue33882] doc Mention breakpoint() in debugger-related FAQ

2019-05-03 Thread Éric Araujo
Éric Araujo added the comment: New changeset cf48e55f7f7718482fa712552f0cbc0aea1c826f by Éric Araujo (Andre Delfino) in branch 'master': bpo-33882: mention breakpoint() in debugger-related FAQ (GH-7759) https://github.com/python/cpython/commit/cf48e55f7f7718482fa712552f0cbc0aea1c826f

[issue27409] List socket.SO_*, SCM_*, MSG_*, IPPROTO_* symbols

2019-05-03 Thread Zachary Ware
Change by Zachary Ware : -- Removed message: https://bugs.python.org/msg341325 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue17667] Windows: build with "build_pgo.bat -2" fails to optimize python.dll

2019-05-03 Thread Zachary Ware
Change by Zachary Ware : Removed file: https://bugs.python.org/file48296/27409.pdf ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36783] No documentation for _FromXandFold C API functions

2019-05-03 Thread Paul Ganssle
Paul Ganssle added the comment: This ticket should be reserved for the mentored sprint. -- assignee: docs@python -> Mariatta ___ Python tracker ___

[issue35947] Update libffi_msvc to current version of libffi

2019-05-03 Thread Paul Monson
Change by Paul Monson : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue36782] Add tests for the datetime C API

2019-05-03 Thread Paul Ganssle
Paul Ganssle added the comment: This ticket should be reserved for the mentored sprint. -- assignee: -> Mariatta nosy: +Mariatta ___ Python tracker ___

[issue36509] Add iot layout for windows iot containers

2019-05-03 Thread Paul Monson
Change by Paul Monson : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue24638] asyncio "loop argument must agree with future" error message could be improved

2019-05-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 4737b923df6fbdb9e2bf3fdccea2112270556e0a by Andrew Svetlov (Zackery Spytz) in branch 'master': bpo-24638: Improve the error message in asyncio.ensure_future() (#12848)

[issue36613] asyncio._wait() don't remove callback in case of exception

2019-05-03 Thread miss-islington
miss-islington added the comment: New changeset 769ac7e7b809dfc60abd0d7e6f020c6ffe06a6c0 by Miss Islington (bot) in branch '3.7': bpo-36613: call remove_done_callback if exception (GH-12800) https://github.com/python/cpython/commit/769ac7e7b809dfc60abd0d7e6f020c6ffe06a6c0 --

[issue24638] asyncio "loop argument must agree with future" error message could be improved

2019-05-03 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36613] asyncio._wait() don't remove callback in case of exception

2019-05-03 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 ___ Python tracker ___

[issue36613] asyncio._wait() don't remove callback in case of exception

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

[issue36613] asyncio._wait() don't remove callback in case of exception

2019-05-03 Thread miss-islington
miss-islington added the comment: New changeset c1964e9e2177eabe821f3e4243be8b99e0d2d542 by Miss Islington (bot) (gescheit) in branch 'master': bpo-36613: call remove_done_callback if exception (GH-12800) https://github.com/python/cpython/commit/c1964e9e2177eabe821f3e4243be8b99e0d2d542

tix.FileSelectBox causes crash: was A newbie question about using tix

2019-05-03 Thread David Sumbler
On Wed, 2019-05-01 at 19:11 +0100, MRAB wrote: > On 2019-05-01 17:44, David Sumbler wrote: > > > > On Tue, 2019-04-30 at 20:46 +0100, MRAB wrote: ... > > > For some reason, tix widgets don't work with normal tkinter > widgets, > > > so > > > you can't put a tix FileSelectBox on a

[issue36341] bind() on AF_UNIX socket may fail in tests run as non-root

2019-05-03 Thread miss-islington
miss-islington added the comment: New changeset 4461d704e23a13dfbe78ea3020e4cbeff4b68dc2 by Miss Islington (bot) (xdegaye) in branch 'master': bpo-36341: Fix tests calling bind() on AF_UNIX sockets (GH-12399) https://github.com/python/cpython/commit/4461d704e23a13dfbe78ea3020e4cbeff4b68dc2

[issue36341] bind() on AF_UNIX socket may fail in tests run as non-root

2019-05-03 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-05-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: What is your use case? -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing

[issue34214] Pylint recusion stack overflow abort

2019-05-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: What seems to be happening is a recursion error while handling a recursion error. Essentially >>> def f(): ... try: ... f() ... except: ... f() ... >>> f() Fatal Python error: Cannot recover from stack overflow. So unless I'm

[issue36777] unittest discover throws TypeError on empty packages

2019-05-03 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I opened issue36784 for reference leak in the initial report along with a reproducer that is reproducible on master branch without my changes. -- ___ Python tracker

[issue36784] __import__ with empty folder after importlib.invalidate_caches causes reference leak

2019-05-03 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : I originally hit upon this with issue36777 where I have used support.script_helper.make_script which calls importlib.invalidate_caches and then trying to use __import__ on an empty folder causes reference leak. I tried 3.8 to 3.5 and it exists on

[issue36783] No documentation for _FromXandFold C API functions

2019-05-03 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +Mariatta, cheryl.sabella ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36783] No documentation for _FromXandFold C API functions

2019-05-03 Thread Paul Ganssle
New submission from Paul Ganssle : In Python 3.6, Time_FromTimeAndFold and PyDateTime_FromDateAndTimeAndFold were added as part of the PEP 495 implementation, but no documentation was added for the C API portions of this change: https://docs.python.org/3.7/c-api/datetime.html The functions

[issue36782] Add tests for the datetime C API

2019-05-03 Thread Paul Ganssle
New submission from Paul Ganssle : A decent fraction of the datetime C API has no tests. If we had tests, we could have prevented bpo #36025, which was a regression in the FromTimestamp method. I would like to open this issue to suggest the addition of tests for the full interface, to

[issue36782] Add tests for the datetime C API

2019-05-03 Thread Eric N. Vander Weele
Change by Eric N. Vander Weele : -- nosy: +ericvw ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34214] Pylint recusion stack overflow abort

2019-05-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: FYI: this one-liner installs the crashing versions: pip3 install git+https://github.com/nickdrozd/astroid.git@crash git+https://github.com/nickdrozd/pylint.git@crash -- nosy: +jdemeyer ___ Python tracker

[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-05-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Perhaps the datamodel docs can be clarified to note that callers are allowed > to omit the third argument That's not true in general, only when __get__ is a slot wrapper (i.e. for classes implemented in C). When __get__ is a Python function, nothing

[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-05-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Personally, I have always found "instance" and "owner" very confusing names for these arguments. If you want to change the documentation, I would recommend changing those names too. Better names would be "obj" and "cls" or something like that. --

[issue34848] range.index only takes one argument when it's documented as taking the usual 3

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

[issue36774] f-strings: Add a !d conversion for ease of debugging

2019-05-03 Thread Eric V. Smith
Eric V. Smith added the comment: != would be my preference, but it can't work. f'{0!=1}' is already legal. I'm not crazy about !!. I think that will be too confusing. -- ___ Python tracker

[issue36774] f-strings: Add a !d conversion for ease of debugging

2019-05-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This conversion is very special. For all other conversions {value:!c:format_spec} is equivalent to format(conv(value), format_spec), but not this conversion. It is also specific for f-strings, and is not particularly useful in format strings. Would not

[issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors

2019-05-03 Thread SilentGhost
Change by SilentGhost : -- nosy: +bquinlan, pitrou type: -> behavior versions: -Python 3.9 ___ Python tracker ___ ___

[issue36781] Optimize sum() for bools

2019-05-03 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : To count the number of items that satisfy certain condition you can use either sum(1 for x in data if pred(x)) or sum(pred(x) for x in data) where pred(x) is a boolean expression. The latter case is shorter but slower. There are two causes for

[issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors

2019-05-03 Thread Hrvoje Nikšić
New submission from Hrvoje Nikšić : At interpreter shutdown, Python waits for all pending futures of all executors to finish. There seems to be no way to disable the wait for pools that have been explicitly shut down with pool.shutdown(wait=False). The attached script demonstrates the issue.

[issue36774] f-strings: Add a !d conversion for ease of debugging

2019-05-03 Thread Eric V. Smith
Eric V. Smith added the comment: The most recent version of the patch implements the conditional repr/format behavior. I'm pretty happy with it. Other than docs, I think this is done. I'm going to discuss it with a few more people at PyCon, then commit it. There's a slight optimization I'm

[issue27682] wsgiref BaseHandler / SimpleHandler can raise additional errors when handling an error

2019-05-03 Thread wkoot
Change by wkoot : -- nosy: +wkoot ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35070] test_posix fails on macOS 10.14 Mojave

2019-05-03 Thread Dave Page
Dave Page added the comment: The submitted patch from websurfer5 resolves the issue for me. -- ___ Python tracker ___ ___

Re: Checking network input processing by Python for a multi-threaded server

2019-05-03 Thread Markus Elfring
> In any multi-threaded application, you must be carefull when > accessing (and especially modifying) shared (e.g. "global") objects. > In general, you will need locks to synchronize the access. I agree to this general view. > Appending to a list (and some other elementary operations > on

[issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage

2019-05-03 Thread SilentGhost
Change by SilentGhost : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: -> test needed type: -> behavior versions: +Python 3.7, Python 3.8 ___ Python tracker

[issue17667] Windows: build with "build_pgo.bat -2" fails to optimize python.dll

2019-05-03 Thread Martha Simons
Change by Martha Simons : Added file: https://bugs.python.org/file48296/27409.pdf ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2019-05-03 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252

2019-05-03 Thread Inada Naoki
Inada Naoki added the comment: @Victor It seems you added cp65001 as Windows-only encoding in bpo-13216. How do you think about removing cp65001 encoding, and add 'cp65001' -> 'utf_8' alias which is available on all platforms? -- nosy: +vstinner

[issue27409] List socket.SO_*, SCM_*, MSG_*, IPPROTO_* symbols

2019-05-03 Thread Martha Simons
Martha Simons added the comment: That patch was never updated nor comitted, but it sounds like this kind of addition might be https://goo.gl/LhppLn acceptable. -- nosy: +Martha Simons ___ Python tracker