[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-17 Thread David Caro
David Caro added the comment: > David, which issue number is this? It's issue41295, pr #21473 -- ___ Python tracker ___ ___

[issue41320] async process closing after event loop closed

2020-07-17 Thread Kuang-che Wu
New submission from Kuang-che Wu : (following code is attached as well) import asyncio import time workaround = False async def slow_proc(): proc = await asyncio.create_subprocess_exec('sleep', '10', stdout=asyncio.subprocess.PIPE) try: return await proc.stdout.read() except

[issue39959] Bug on multiprocessing.shared_memory

2020-07-17 Thread Vinay Sharma
Vinay Sharma added the comment: Hi, shared_memory has lot of issues which are mainly being caused due to resource tracking. Initially resource tracking was implemented to keep track of semaphores only, but for some reason resource tracker also started to keep track of shared_memory. This

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2020-07-17 Thread Vinay Sharma
Change by Vinay Sharma : -- pull_requests: +20652 pull_request: https://github.com/python/cpython/pull/21516 ___ Python tracker ___

[issue41195] Interface to OpenSSL's security level

2020-07-17 Thread miss-islington
miss-islington added the comment: New changeset 8e836bb21ce73f0794fd769db5883c29680dfe47 by matthewhughes934 in branch 'master': bpo-41195: Add getter for Openssl security level (GH-21282) https://github.com/python/cpython/commit/8e836bb21ce73f0794fd769db5883c29680dfe47 -- nosy:

[issue41316] tarfile: Do not write full path in FNAME field

2020-07-17 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39959] Bug on multiprocessing.shared_memory

2020-07-17 Thread Vinay Sharma
Vinay Sharma added the comment: @rauanargyn , persist flag won't be good idea because it cannot be supported for windows easily, since windows uses a reference counting mechanism to keep track of shared memory and frees it as soon as all the processes using it are done. --

[issue40816] Add missed AsyncContextDecorator to contextlib

2020-07-17 Thread John Belmonte
John Belmonte added the comment: Thank you heckad! I'm in need of a decorating asynccontextmanager, and glad that an implementation is in the works that I can copy from in the meantime. I hope Yuri reviews the PR before long. -- nosy: +John Belmonte

[issue41316] tarfile: Do not write full path in FNAME field

2020-07-17 Thread Artem Bulgakov
Artem Bulgakov added the comment: Hi. My PR doesn't remove the possibility to add tree into tar file. It only fixes header for GZIP compression. Any data after this header is not affected. You can test it by creating two archives with the same data but one with my patch and the second

[issue41323] Perform "peephole" optimization directly on control-flow graph.

2020-07-17 Thread Mark Shannon
New submission from Mark Shannon : Currently we perform various bytecode improvements as a pass on the code objects after generating the code object. This requires parsing the bytecode to find instructions, recreating the CFG, and rewriting the line number table. If we perform the

[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Stefan Krah
New submission from Stefan Krah : This adds a minimal decimal capsule API. As can be seen from the patch, adding anything to decimal while doing it properly is quite labor and testing intensive, so the intent is to *keep* the API minimal! That said, some functions are really necessary: 1)

[issue41322] unittest: Generator test methods will always be marked as passed

2020-07-17 Thread Alexander Hungenberg
Alexander Hungenberg added the comment: I would also strongly vote for raising an error if the test method is a generator - not even silently turn it into a list. It would be straight forward to implement various checks (like the ones you mentioned for generators, coroutines, ...) - and

[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Stefan Krah
Stefan Krah added the comment: Adding Daniele Varrazzo, in case this is useful for the PostgreSQL adapter. -- nosy: +piro ___ Python tracker ___

[issue39584] multiprocessing.shared_memory: MacOS crashes by running attached Python code

2020-07-17 Thread Vinay Sharma
Vinay Sharma added the comment: Hi, I tried replicating this by truncating normal files but that doesn't crash. The above mentioned call of ftruncate only crashes for when the file descriptor passed points to a shared memory segment. And only, multiprocessing.shared_memory is currently

[issue41241] Unnecessary Type casting in 'if condition'

2020-07-17 Thread wyz23x2
Change by wyz23x2 : -- pull_requests: -20654 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Stefan Krah
Change by Stefan Krah : -- keywords: +patch pull_requests: +20656 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21519 ___ Python tracker

[issue41241] Unnecessary Type casting in 'if condition'

2020-07-17 Thread wyz23x2
Change by wyz23x2 : -- pull_requests: +20655 pull_request: https://github.com/python/cpython/pull/21518 ___ Python tracker ___ ___

[issue41321] Calculate timestamp is wrong in datetime.datetime

2020-07-17 Thread dh4931
New submission from dh4931 : like so datetime.datetime(1986, 5, 4, 7, 13, 22).timestamp() - datetime.datetime(1986, 5, 4, 0, 0, 0).timestamp() the result is 22402.0, the result is wrong. but on May 2nd datetime.datetime(1986, 5, 2, 7, 13, 22).timestamp() - datetime.datetime(1986, 5, 2, 0, 0,

[issue41297] Remove doctest import from heapq

2020-07-17 Thread Ronald Oussoren
Ronald Oussoren added the comment: I have no opinion on the proposed change. The "disruption" alex c talks about is that this imports gets seen by modulegraph (and hence pyinstaller and py2app), which will then include doctest and all its dependencies in standalone bundles even though

[issue41321] Calculate timestamp is wrong in datetime.datetime

2020-07-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I cannot reproduce the report on 3.8 and master. Both of the instances return 26002 which is 7 hours, 13 minutes and 22 seconds. Can you please attach a script that I can run to reproduce the difference? python3 Python 3.8.0 (v3.8.0:fa919fdf25,

[issue41311] Add a function to get a random sample from an iterable (reservoir sampling)

2020-07-17 Thread Oscar Benjamin
Oscar Benjamin added the comment: All good points :) Here's an implementation with those changes and that shuffles but gives the option to preserve order. It also handles the case W=1.0 which can happen at the first step with probability 1 - (1 - 2**53)**k. Attempting to preserve order

[issue38656] mimetypes for python 3.7.5 fails to detect matroska video

2020-07-17 Thread David K. Hess
David K. Hess added the comment: @michael-lazar a documentation change seems the path of least resistance given the complicated history of this module. +1 from me. -- ___ Python tracker

[issue41321] Calculate timestamp is wrong in datetime.datetime

2020-07-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Serhiy, you are right. I wrote below script that could explain the difference. # ../backups/bpo41321.py import datetime import zoneinfo for tz in zoneinfo.available_timezones(): diff = datetime.datetime(1986, 5, 4, 7, 13, 22,

[issue41300] IDLE: add missing import io in iomenu.py

2020-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: Problem also reported on #41319 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41322] unittest: Generator test methods will always be marked as passed

2020-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would raser raise error if the test method returns something suspicious, like generator or coroutine. Or maybe if it returns anything except None. -- nosy: +serhiy.storchaka ___ Python tracker

[issue25538] Traceback from __exit__ method is misleading

2020-07-17 Thread Tadhg McDonald-Jensen
Tadhg McDonald-Jensen added the comment: This is doable, the feature that decides which line is shown in the traceback is the `lnotab` structure in the relevant code object, the structure is described here (https://github.com/python/cpython/blob/3.8/Objects/lnotab_notes.txt) and it

[issue41319] IDLE 3.8 can not save and run this file

2020-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: Already fixed. I have asked the fix go in 3.8.5 on Monday. -- ___ Python tracker ___ ___

[issue41319] IDLE 3.8 can not save and run this file

2020-07-17 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: add missing import io in iomenu.py ___ Python tracker

[issue25538] Traceback from __exit__ method is misleading

2020-07-17 Thread Tadhg McDonald-Jensen
Tadhg McDonald-Jensen added the comment: uploaded `with_traceback_fixed+async.py` because I forgot to include async with in my first code. -- Added file: https://bugs.python.org/file49323/with_traceback_fixed+async.py ___ Python tracker

[issue41323] Perform "peephole" optimization directly on control-flow graph.

2020-07-17 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +20653 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21517 ___ Python tracker

[issue41300] IDLE: add missing import io in iomenu.py

2020-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: #41319 should be closed as a duplicate, but site will not currently allow me to do so. -- ___ Python tracker ___

[issue22194] access to cdecimal / libmpdec API

2020-07-17 Thread Stefan Krah
Stefan Krah added the comment: Closing in favor of #41324, which adds just the most important functions. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add a minimal decimal capsule API ___ Python tracker

[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Stefan Krah
Change by Stefan Krah : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41322] unittest: Generator test methods will always be marked as passed

2020-07-17 Thread Alexander Hungenberg
New submission from Alexander Hungenberg : The following testcase will always be marked as passed: from unittest import TestCase class BuggyTestCase(TestCase): def test_generator(self): self.assertTrue(False) yield None It happened to us that someone accidentally made

[issue41322] unittest: Generator test methods will always be marked as passed

2020-07-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: https://github.com/python/cpython/blob/8e836bb21ce73f0794fd769db5883c29680dfe47/Lib/unittest/case.py#L548 . _callTestMethod just calls the test method and doesn't check for the method to be a generator function to be iterated through. In Python 3.8

[issue41322] unittest: Generator test methods will always be marked as passed

2020-07-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This is a duplicate of issue15551 and as per discussion in the thread my approach is incoherent with design of unittest to execute generators. I propose closing this as duplicate with same resolution as not fixed unless there is a change required

[issue40941] Merge generator.gi_running and frame executing flag into single frame state

2020-07-17 Thread Mark Shannon
Mark Shannon added the comment: New changeset cb9879b948a19c9434316f8ab6aba9c4601a8173 by Mark Shannon in branch 'master': bpo-40941: Unify implicit and explicit state in the frame and generator objects into a single value. (GH-20803)

[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Stefan Krah
Change by Stefan Krah : -- assignee: skrah components: Extension Modules nosy: skrah priority: normal severity: normal stage: needs patch status: open title: Add a minimal decimal capsule API versions: Python 3.10 ___ Python tracker

[issue41241] Unnecessary Type casting in 'if condition'

2020-07-17 Thread wyz23x2
Change by wyz23x2 : -- nosy: +wyz23x2 nosy_count: 3.0 -> 4.0 pull_requests: +20654 pull_request: https://github.com/python/cpython/pull/21518 ___ Python tracker ___

[issue41319] IDLE 3.8 can not save and run this file

2020-07-17 Thread wyz23x2
Change by wyz23x2 : -- nosy: -wyz23x2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41319] IDLE 3.8 can not save and run this file

2020-07-17 Thread wyz23x2
wyz23x2 added the comment: Is bpo-41300 related? It talks about non-ASCII in IDLE. -- nosy: +wyz23x2 ___ Python tracker ___ ___

[issue41321] Calculate timestamp is wrong in datetime.datetime

2020-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It depends on timezone. I guess there was a switch to daylight saving time at that time and place. -- nosy: +belopolsky, lemburg, p-ganssle, serhiy.storchaka ___ Python tracker

[issue41241] Unnecessary Type casting in 'if condition'

2020-07-17 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Wansoo, welcome to Python! Changes that are purely cosmetic but do not change the underlying meaning of the code are usually refused as they create unwanted code churn. You will find some info about this and all the other aspects of contributing to Python

[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Stefan Krah
Stefan Krah added the comment: Also as a note for Mark and Raymond: This API is for exact conversions and avoids the use of the context except for raising ConversionSyntax. I'll add documentation once Antoine has tried it out for his use case. --

[issue41024] doc: Explicitly mention use of 'enum.Enum' as a valid container for 'choices' argument of 'argparse.ArgumentParser.add_argument'

2020-07-17 Thread Vincent Férotin
Vincent Férotin added the comment: Explicitly add Raymond Hettinger to nosy list, as he reviewed the corresponding PR. -- nosy: +rhettinger ___ Python tracker ___

[issue41304] [CVE-2020-15801] python 38 embed ignore python38._pth file on windows

2020-07-17 Thread Steve Dower
Steve Dower added the comment: This is now assigned CVE-2020-15801 -- title: python 38 embed ignore python38._pth file on windows -> [CVE-2020-15801] python 38 embed ignore python38._pth file on windows ___ Python tracker

[issue39280] Don't allow datetime parsing to accept non-Ascii digits

2020-07-17 Thread Ram Rachum
Change by Ram Rachum : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue41024] doc: Explicitly mention use of 'enum.Enum' as a valid container for 'choices' argument of 'argparse.ArgumentParser.add_argument'

2020-07-17 Thread Vincent Férotin
Vincent Férotin added the comment: Unless I am mistaken, merged pull-request was not backported from master to other potential branches (3.5 -> 3.9 included). There was a message from GitHub 'miss-islington' bot (https://github.com/python/cpython/pull/20964#issuecomment-646991186) saying,

[issue41304] [CVE-2020-15801] python 38 embed ignore python38._pth file on windows

2020-07-17 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +20658 pull_request: https://github.com/python/cpython/pull/21521 ___ Python tracker ___

[issue41304] [CVE-2020-15801] python 38 embed ignore python38._pth file on windows

2020-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +20659 pull_request: https://github.com/python/cpython/pull/21522 ___ Python tracker ___

[issue41304] [CVE-2020-15801] python 38 embed ignore python38._pth file on windows

2020-07-17 Thread Steve Dower
Steve Dower added the comment: New changeset a16ac4e43c8ed15bf2fca52df3a0a5de26ad2705 by Miss Islington (bot) in branch '3.9': bpo-41304: Update NEWS to include CVE-2020-15801 reference (GH-21521) https://github.com/python/cpython/commit/a16ac4e43c8ed15bf2fca52df3a0a5de26ad2705 --

[issue41304] [CVE-2020-15801] python 38 embed ignore python38._pth file on windows

2020-07-17 Thread Steve Dower
Steve Dower added the comment: New changeset 79ed1a53fa44a1b74e3c24c9d5f698abd9610921 by Miss Islington (bot) in branch '3.8': bpo-41304: Update NEWS to include CVE-2020-15801 reference (GH-21521) https://github.com/python/cpython/commit/79ed1a53fa44a1b74e3c24c9d5f698abd9610921 --

[issue41315] Add mathematical functions as wrappers to decimal.Decimal methods

2020-07-17 Thread Jean Abou Samra
Jean Abou Samra added the comment: I would argue that given a function, from math import * def naive_calc_pi(n=100): u = sqrt(8) v = 4 for _ in range(n): v = 2*u*v/(u + v) u = sqrt(u*v) return u when you realize that floats have limited precision (happened to

[issue41304] [CVE-2020-15801] python 38 embed ignore python38._pth file on windows

2020-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +20660 pull_request: https://github.com/python/cpython/pull/21524 ___ Python tracker ___

[issue41325] Document addition of `mock.call_args.args` and `mock.call_args.kwargs` in 3.8

2020-07-17 Thread Jordan Speicher
New submission from Jordan Speicher : `args` and `kwargs` were added to unittest `mock.call_args` in https://bugs.python.org/issue21269 however documentation was not updated to state that this was added in python 3.8 -- assignee: docs@python components: Documentation messages: 373839

[issue21625] Make help() beginner helpful when no PAGER or LESS variable

2020-07-17 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 7.0 -> 8.0 pull_requests: +20657 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21520 ___ Python tracker

[issue41304] [CVE-2020-15801] python 38 embed ignore python38._pth file on windows

2020-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +20661 pull_request: https://github.com/python/cpython/pull/21523 ___ Python tracker ___

[issue41317] sock_accept() does not remove server socket reader on cancellation

2020-07-17 Thread Alex Grönholm
Alex Grönholm added the comment: This bug is the same as https://bugs.python.org/issue30064 except for sock_accept(). -- ___ Python tracker ___

[issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart

2020-07-17 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: I agree with @Victor. I removed the easy tag on this easy -- nosy: +nanjekyejoannah ___ Python tracker ___

[issue41327] Windows Store "stub" Python executables give confusing behaviour

2020-07-17 Thread Paul Moore
Paul Moore added the comment: See, for example, https://github.com/pypa/packaging-problems/issues/379 as an illustration of the user (and project maintainer!) confusion this causes. -- ___ Python tracker

[issue41327] Windows Store "stub" Python executables give confusing behaviour

2020-07-17 Thread Paul Moore
New submission from Paul Moore : First of all, I do know that this is an issue with the Windows Store distribution, rather than the python.org one. But (a) I don't know where to report a bug against the Store implementation except here, and (b) it's arguably a case of the Windows

[issue41327] Windows Store "stub" Python executables give confusing behaviour

2020-07-17 Thread Brett Cannon
Brett Cannon added the comment: Closing as "third-party" as those stubs are controlled by Microsoft Windows and has nothing to do with us as a project beyond that they install the Windows Store copy that Steve uploads (although this is all feedback to Steve who has connections on the

[issue41329] IDLE not saving .py files

2020-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: In calling this a duplicate, and suggesting the fix above, I am assuming that a) you are using the new 3.8.4 and b) you have a non-ascii character in the .py file or files you tested. Since several years ago, the is the only case of save failing that I

[issue41271] Add support for io_uring to cpython

2020-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think that the answer is maybe, eventually, and if so, an ioring module that any event framework can use and a separate asyncio module for its use with asyncio. I say maybe because the lwn article suggests that additions and revisions might continue for

[issue41311] Add a function to get a random sample from an iterable (reservoir sampling)

2020-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've put more thought into the proposal and am going to recommend against it. At its heart, this a CPython optimization to take advantage of list() being slower than a handful of islice() calls. It also gains a speed benefit by dropping the antibias

[issue41024] doc: Explicitly mention use of 'enum.Enum' as a valid container for 'choices' argument of 'argparse.ArgumentParser.add_argument'

2020-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 760552ceb8c5f5ca4f1bf13f47543b42b25e0b83 by Miss Islington (bot) in branch '3.9': bpo-41024: doc: Explicitly mention use of 'enum.Enum' as a valid container for '… (GH-20964) (GH-21527)

[issue41024] doc: Explicitly mention use of 'enum.Enum' as a valid container for 'choices' argument of 'argparse.ArgumentParser.add_argument'

2020-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the PR. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41271] Add support for io_uring to cpython

2020-07-17 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41329] IDLE not saving .py files

2020-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: Add 'import io' to the top of /Lib/idlelib/iomenu.py. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: add missing import io in iomenu.py ___ Python tracker

[issue41024] doc: Explicitly mention use of 'enum.Enum' as a valid container for 'choices' argument of 'argparse.ArgumentParser.add_argument'

2020-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +20663 status: pending -> open pull_request: https://github.com/python/cpython/pull/21527 ___ Python tracker ___

[issue41024] doc: Explicitly mention use of 'enum.Enum' as a valid container for 'choices' argument of 'argparse.ArgumentParser.add_argument'

2020-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: The backport failed for 3.9. I'll trigger it again. Don't see a need to go back to older versions. This is a minor informational note, not a bug. -- versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8

[issue41311] Add a function to get a random sample from an iterable (reservoir sampling)

2020-07-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41297] Remove doctest import from heapq

2020-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: If not, could modulegraph add a flag to drop imports commonly found in main sections: doctest, unittest, argparse, etc.? Asking the standard library to change seems like the tail wagging the dog — it only paints over the problem since third-party

[issue41311] Add a function to get a random sample from an iterable (reservoir sampling)

2020-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: More thoughts: * If sample_iter() were added, people would expect a choices_iter() as well. * Part of the reason that Set support was being dropped from sample() is that it was rarely used and that it was surprising that it was a O(n) operation instead

[issue41311] Add a function to get a random sample from an iterable (reservoir sampling)

2020-07-17 Thread Oscar Benjamin
Oscar Benjamin added the comment: > At its heart, this a CPython optimization to take advantage of list() being > slower than a handful of islice() calls. This comment suggest that you have missed the general motivation for reservoir sampling. Of course the stdlib can not satisfy all use

[issue41315] Add mathematical functions as wrappers to decimal.Decimal methods

2020-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I don't really buy into the use case. In my experience a nest of existing functions that are designed for floats will somewhere being using a float constant like 0.5, e, pi, or tau. So, just feeding in a decimal input isn't sufficient to get it to

[issue41323] Perform "peephole" optimization directly on control-flow graph.

2020-07-17 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41329] IDLE not saving .py files

2020-07-17 Thread Nick.Lupariello
New submission from Nick.Lupariello : IDLE will not save .py files. Neither Ctrl + S nor file -> Save file nor file -> Save file as function as intended and the .py file is not updated. This happens for both 32 bit and 64 bit distributions on multiple computers with 4 GB of ram running on a

[issue41326] Build failure in blurb-it repo: "Failed building wheel for yarl"

2020-07-17 Thread Mariatta
New submission from Mariatta : We're seeing travis CI build failure against the nightly Python build v3.10.0a0. Build log: https://travis-ci.org/github/python/blurb_it/jobs/707532881 Last few lines of the build log: In file included from

[issue41311] Add a function to get a random sample from an iterable (reservoir sampling)

2020-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Other implementations aren't directly comparable, but I thought I would check to see what others were doing: * Scikit-learn uses reservoir sampling but only when k / n > 0.99. Also, it requires a follow-on step to shuffle the selections. * numpy does

[issue41328] Hudson CI is not available anymore

2020-07-17 Thread Dmytro Litvinov
New submission from Dmytro Litvinov : In the documentation (https://docs.python.org/3.8/library/unittest.html) there is a mention of Hudson(http://hudson-ci.org/) as continuous integration system for tests. According to wikipedia(https://en.wikipedia.org/wiki/Hudson_(software)), Hudson

[issue41297] Remove doctest import from heapq

2020-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Ronald, can modulegraph be made smarter with respect to sections of code guarded by __name__ == '__main__'?That Python idiom is old and pervasive. -- ___ Python tracker

[issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart

2020-07-17 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- keywords: -easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41323] Perform "peephole" optimization directly on control-flow graph.

2020-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 This looks like a nice improvement. I've long wanted the optimizations to be moved upstream. At the time the peephole logic was first written, operating directly on the code object was the only option that kept optimizations separate from the core

[issue41311] Add a function to get a random sample from an iterable (reservoir sampling)

2020-07-17 Thread Tim Peters
Tim Peters added the comment: Julia's randsubseq() doesn't allow to specify the _size_ of the output desired. It picks each input element independently with probability p, and the output can be of any size from 0 through the input's size (with mean output length p*length(A)). Reservoir

[issue41327] Windows Store "stub" Python executables give confusing behaviour

2020-07-17 Thread Paul Moore
Paul Moore added the comment: I thought that might be the answer. But does anyone know where I can repost this as an issue against the Store distribution? I'm happy to report there if I can find out how... Hopefully Steve can point me in the right direction. --

[issue41322] unittest: Generator test methods will always be marked as passed

2020-07-17 Thread Zachary Ware
Zachary Ware added the comment: In the same vein as Serhiy's suggestion, I would like to see unittest raise a DeprecationWarning when a test method returns anything other than `None`, and eventually switch that to an error (probably TypeError or ValueError). -- nosy: +zach.ware

[issue41327] Windows Store "stub" Python executables give confusing behaviour

2020-07-17 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: FWIW, I tweeted about this a while ago (January) and IIRC Steve said there’s plan to change that. https://twitter.com/uranusjr/status/1212450480917340160 -- nosy: +uranusjr ___ Python tracker

[issue41325] Document addition of `mock.call_args.args` and `mock.call_args.kwargs` in 3.8

2020-07-17 Thread Jordan Speicher
Change by Jordan Speicher : -- keywords: +patch pull_requests: +20662 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21525 ___ Python tracker ___

[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: I probably won't try it out explicitly (it's basically cumbersome for us to test with non-release Pythons, because of our dependencies to Numpy and Cython), but reviewing the API should be enough anyway. -- ___

[issue41326] Build failure in blurb-it repo: "Failed building wheel for yarl"

2020-07-17 Thread Mariatta
Mariatta added the comment: Adding Victor Stinner to nosy -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing

[issue41319] IDLE 3.8 can not save and run this file

2020-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: 宋嘉腾 put 'import io' at the top of idlelib/iomenu.py -- ___ Python tracker ___ ___

[issue41220] add optional make_key argument to lru_cache

2020-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've left this open for a week to collect comments. I concur with Felipe that this should be the responsibility of the caller. And I concur with Jim that the use cases are likely too rare to warrant shoehorning in the extra functionality. For my part,

[issue41314] __future__ doc and PEP 563 conflict

2020-07-17 Thread wyz23x2
Change by wyz23x2 : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: The PEP was accepted apparently by Guido sometime after the second posting 21-Nov-2017. Guido added the annotations entry to __future__ on 1/26/2018 with the 'mandatory' version changed to 4.0, which means 'some indefinite undecided future version'. I

[issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments

2020-07-17 Thread Christoph Anton Mitterer
Change by Christoph Anton Mitterer : -- nosy: +calestyo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41311] Add a function to get a random sample from an iterable (reservoir sampling)

2020-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > This comment suggest that you have missed the general > motivation for reservoir sampling. Please don't get personal. I've devoted a good deal of time thinking about your proposal. Tim is also giving it an honest look. Please devote some time to

[issue41330] Inefficient error-handle for CJK encodings

2020-07-17 Thread Ma Lin
New submission from Ma Lin : CJK encode/decode functions only have three error-handler fast-paths: replace ignore strict See the code: [1][2] If use other built-in error-handlers, need to get the error-handler object, and call it with an Unicode Exception argument. See the code:

[issue41282] Deprecate and remove distutils

2020-07-17 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: -Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: