[issue36725] Reference leak regression with Python3.8a3

2019-05-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- stage: patch review -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36725] Reference leak regression with Python3.8a3

2019-05-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- pull_requests: -13139 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36871] Misleading error from unittest.mock's assert_has_calls

2019-05-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This is little tricky to fix since the call-matcher needs the signature and also the information over whether to add self or not for some cases. Similar open issues. https://bugs.python.org/issue27715 https://bugs.python.org/issue26752 An

[issue24758] unittest.mock.Mock's new "unsafe" feature needs a better error message

2019-05-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Closing this as resolved since PR was merged. Thanks Zackery for the PR. -- nosy: +xtreak resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: Yes please for this! The two usual versions are isqrt and nsqrt: isqrt(n) = largest integer ≤ √n nsqrt(n) = closest integer to √n although to be honest I'm not sure what use cases there are for nsqrt. -- nosy: +steven.daprano

[issue36822] Minor grammatical fix in glossary.rst

2019-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36822] Minor grammatical fix in glossary.rst

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 4f5febdf955240b6064bb5647dec084feaa98376 by Pablo Galindo (Sanyam Khurana) in branch '3.7': [3.7] bpo-36822: Fix minor grammatical error in glossary.rst (GH-13145). (GH-13260)

[issue36684] codecov.io code coverage has not updated since 2019-04-13

2019-05-11 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36684] codecov.io code coverage has not updated since 2019-04-13

2019-05-11 Thread Inada Naoki
Inada Naoki added the comment: New changeset 87068ed00927bdeaa2ae556e4241c16cf8a845eb by Inada Naoki (Gordon P. Hemsley) in branch 'master': bpo-36684: Split out gcc and test coverage builds (GH-13146) https://github.com/python/cpython/commit/87068ed00927bdeaa2ae556e4241c16cf8a845eb

[issue36822] Minor grammatical fix in glossary.rst

2019-05-11 Thread Sanyam Khurana
Change by Sanyam Khurana : -- pull_requests: +13170 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34152] performance of some list slice assignment margin cases can be improved

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I concur with Raymond and Serhiy: this patch covers very exotic cases and complicates the surrounding code. I'm closing this issue. Thanks, @sir-sigurd for the proposal -- resolution: -> rejected stage: patch review -> resolved status: open

[issue36777] unittest discover throws TypeError on empty packages

2019-05-11 Thread Gus Goulart
Change by Gus Goulart : -- keywords: +patch pull_requests: +13169 stage: -> patch review ___ Python tracker ___ ___

[issue36833] Add tests for Datetime C API Macros

2019-05-11 Thread Edison Abahurire
Edison Abahurire added the comment: I'm now working on this as pbo-36782 awaits merging. -- nosy: +anthony shaw ___ Python tracker ___

[issue36863] argparse doesn't like options in the middle of arguments

2019-05-11 Thread rhubarbdog x
rhubarbdog x added the comment: I've just done a test and from a command shell (bash or whatever) the following python script when ran produces the following $ python3 command.py 0ne thwo three files: ['0ne', 'thwo', 'three'] sensors 1 freq 1200 $ python3 command.py -s 5 0ne thwo three

[issue36892] "Modules" section in Tutorial contains incorrect description about __init__.py

2019-05-11 Thread Ezio Melotti
Ezio Melotti added the comment: I agree that implicit namespace packages don't deserve more than a footnote in that page. However, since I often have to answer questions about packages, I'm thinking that perhaps it would be better to expand that page and maybe have a page dedicated to

[issue36792] [Windows] time: crash on formatting time with de_DE locale

2019-05-11 Thread Jeremy Kloth
Jeremy Kloth added the comment: I have managed to setup a VM that can reproduce the error. Unfortunately, the error (heap corruption) is coming from within the UCRT. Attempting to work around that, I came across another error in the UCRT. Due to these errors in all available UCRT

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 26f55c29f2316648939ad12a9d3730a2118da2ea by Pablo Galindo in branch 'master': bpo-36817: Do not decrement reference for expr_text on fstring = parsing failure (GH-13256)

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +13168 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36892] "Modules" section in Tutorial contains incorrect description about __init__.py

2019-05-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: In my experience, beginners have enough trouble getting packages right without complicating the tutorial with a rarely-used advanced feature like namespace packages. I don't think this needs more than perhaps a footnote, if that. -- nosy:

[issue36886] Failed to construct CodeType on Python-3.8.0a4

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: After PR 13255 is merged, let's open a new issue for the notice in types.rst to keep the discussion isolated. -- ___ Python tracker

[issue36892] "Modules" section in Tutorial contains incorrect description about __init__.py

2019-05-11 Thread musou1500
New submission from musou1500 : "Modules" section in the tutorial says that https://docs.python.org/3/tutorial/modules.html "The __init__.py files are required to make Python treat directories containing the file as packages. " But, thanks to PEP 420, __init__.py is not required after Python

[issue36886] Failed to construct CodeType on Python-3.8.0a4

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >Understandable as well, just thinking that a CYA sentence in types.rst: >"These types are not supposed to be instantiated outside of CPython internals >and constructor signatures can vary between python versions. >And maybe the docstrings. I rarely

[issue36886] Failed to construct CodeType on Python-3.8.0a4

2019-05-11 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > There are other projects that have already added a fix for the new parameter > positionally. If we add it to be the last (that still will break the old > call) we would break them again. Understandable > The documentation never documented the

[issue36886] Failed to construct CodeType on Python-3.8.0a4

2019-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +13167 stage: resolved -> patch review ___ Python tracker ___

[issue36886] Failed to construct CodeType on Python-3.8.0a4

2019-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- title: problem with Types on Python-3.8.0a4 -> Failed to construct CodeType on Python-3.8.0a4 ___ Python tracker ___

[issue36886] problem with Types on Python-3.8.0a4

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: As a final note, notice that when keyword-only arguments were implemented, the parameter was not added at the end of the constructor: commit 4f72a78684bbfcdc43ceeabb240ceee54706c4b0 Author: Guido van Rossum Date: Fri Oct 27 23:31:49 2006 +

[issue36886] problem with Types on Python-3.8.0a4

2019-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36886] problem with Types on Python-3.8.0a4

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > and/or to CodeType docs to indicate the signature has changed in 3.8 ? The documentation never documented the arguments for the code type (probably on purpose), so not sure if adding a notice there will help much:

[issue36886] problem with Types on Python-3.8.0a4

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > If it is supposed to be stable can the `posonlyargcount` be moved to be the > last argument ? There are other projects that have already added a fix for the new parameter positionally. If we add it to be the last (that still will break the old

[issue27805] io.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2019-05-11 Thread Zackery Spytz
Change by Zackery Spytz : -- nosy: +ZackerySpytz versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6 ___ Python tracker ___

[issue27805] io.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2019-05-11 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +13166 stage: test needed -> patch review ___ Python tracker ___ ___

[issue36886] problem with Types on Python-3.8.0a4

2019-05-11 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: If types is not supposed to be stable, could a warning be added at top of https://docs.python.org/3/library/types.html that it should not be considered stable, and/or to CodeType docs to indicate the signature has changed in 3.8 ? If it is supposed to

[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-11 Thread anthony shaw
anthony shaw added the comment: Thanks Eryk that saved a lot of debugging. dgelessus - if you want to write a patch for CPython am happy to take you through this and get it over the line. Else: am Happy to write a test against the gc counter and a patch for this --

[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a)

2019-05-11 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +13165 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 5833e94d8615ea18b14e4830ecdb868aec81b378 by Pablo Galindo in branch 'master': bpo-36817: Fix reference leak for expr_text in f-string = parsing (GH-13249) https://github.com/python/cpython/commit/5833e94d8615ea18b14e4830ecdb868aec81b378

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue36891] Additional startup plugin for vendors

2019-05-11 Thread SilentGhost
SilentGhost added the comment: This is a larger issue then the PR might lead one to believe. Have you had discussion on python-ideas or in other forums about this? -- nosy: +SilentGhost, ncoghlan versions: +Python 3.8 -Python 3.7 ___ Python

[issue36891] Additional startup plugin for vendors

2019-05-11 Thread vx1920
New submission from vx1920 : Proposed modification in site.py allows "sitevendor" customization plugin in addition to existed "sitecustomize" and "usercustomuze". More info displayed when "python.exe -m site" typed from command line. Vendors of Python sites (like Anaconda) can place there

[issue36890] python-3.7.3-macosx10.6.pkg verification error on macOS 10.6 Snow Leopard

2019-05-11 Thread Ned Deily
Ned Deily added the comment: Thank you for the report. It appears that macOS installer packages produced on current versions of macOS can no longer be successfully opened by the macOS 10.6 (Snow Leopard) system installer. This used to work. Perhaps a certificate or something else has

[issue36822] Minor grammatical fix in glossary.rst

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 90fb04c1e23c0fddd438bd0f73e7c018cacef4bc by Pablo Galindo (Sanyam Khurana) in branch 'master': bpo-36822: Fix minor grammatical error in glossary.rst (GH-13145)

[issue34975] start_tls() difficult when using asyncio.start_server()

2019-05-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: I believe stream transport should be replaced. If you have time please do this change. Also please take a look at #36889 for merging StreamWriter and StreamReader. It can simplify the replacement strategy. Anyway, please keep your PR open at least. The plan

[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a)

2019-05-11 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +13163 stage: backport needed -> patch review ___ Python tracker ___ ___

[issue36890] python-3.7.3-macosx10.6.pkg verification error

2019-05-11 Thread Ned Deily
Change by Ned Deily : -- assignee: -> ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36890] python-3.7.3-macosx10.6.pkg verification error

2019-05-11 Thread S. J. Cunningham
New submission from S. J. Cunningham : I can't Install the latest python-3.7.3-macosx10.6.pkg on my 10.6.8 system. Error message says failure to verify. I posted on the forms as suggested (https://python-forum.io/Thread-Cannot-Install-python-3-7-3-macosx10-6-pkg) but have received no

[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-11 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset d8320ecb86da8df7c13d8bf8582507f736aa2924 by Ivan Levkivskyi (Michael J. Sullivan) in branch 'master': bpo-36878: Allow extra text after `# type: ignore` comments (GH-13238)

[issue36870] test_asyncio: test_drain_raises() fails randomly on Windows

2019-05-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- components: +asyncio nosy: +asvetlov, yselivanov ___ Python tracker ___ ___

[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-05-11 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +13162 stage: -> patch review ___ Python tracker ___ ___

[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-05-11 Thread Andrew Svetlov
New submission from Andrew Svetlov : The separation was a bad idea, sorry. Both classes are coupled too much. 1. Writer should know about the reader to make `drain()` work 2. Reader has no .close() method. The idea is: 1. Merge StreamReader and StreamWriter into just a Stream. 2. The Stream

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

2019-05-11 Thread Hrvoje Nikšić
Change by Hrvoje Nikšić : -- keywords: +patch pull_requests: +13161 stage: -> patch review ___ Python tracker ___ ___

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Opened PR13249 to fix the leak -- stage: patch review -> resolved ___ Python tracker ___

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +13160 stage: resolved -> patch review ___ Python tracker ___ ___

[issue35947] Update libffi_msvc to current version of libffi

2019-05-11 Thread STINNER Victor
STINNER Victor added the comment: I am talking about the commit whixh removed the directory. I am happy that someone succeeded to write it ;-) -- ___ Python tracker ___

[issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled

2019-05-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6236c9823ef3e8e2229b0598d3d8189adf5e00f2 by Victor Stinner (Xi Ruoyao) in branch 'master': bpo-36856: Handle possible overflow in faulthandler_stack_overflow (GH-13205)

[issue36888] Create a way to check that the parent process is alive for deamonized processes

2019-05-11 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +davin, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Commit 9a4135e939bc223f592045a38e0f927ba170da32 introduced a reference leak: https://buildbot.python.org/all/#/builders/80/builds/587/steps/3/logs/stdio Bisect results for test_future: 0:00:00 load avg: 10.04 [1/1] test_future beginning 9

[issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6

2019-05-11 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Hrvoje Nikšić, Thank you for the CLA, now, we need the opinion from Yury and their approval, I am not an expert of the asyncio. Thank you, -- ___ Python tracker

[issue34916] Add create_window_function() to sqlite3.Connection

2019-05-11 Thread Berker Peksag
Berker Peksag added the comment: Issue 35360 will cover updating our Windows and macOS installers. I'm retargeting this issue to add a create_window_function() method to the Connection object. I already have a WIP branch and am going to submit a PR later this weekend. -- assignee:

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: > Could you please add this in the documentation? Yes, definitely! -- ___ Python tracker ___

[issue36876] Global C variables are a problem.

2019-05-11 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36866] Certificate verification errors in urllib.request become URLError

2019-05-11 Thread Christian Heimes
Christian Heimes added the comment: Update: 3.6 and earlier raised SSLError for untrusted or expired certs. Only hostname mismatch was not wrapped into URLError. -- ___ Python tracker

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I'd spell that as `1 + isqrt(n - 1)`. Could you please add this in the documentation? -- ___ Python tracker ___

[issue36868] New behavior of OpenSSL hostname verification not exposed, incorrectly documented

2019-05-11 Thread Christian Heimes
Christian Heimes added the comment: The entry in whatsnew is a documentation bug. Initially I wanted to expose host_flags and wrote the whatnew entry for it. Later we decided against the flag and an only implemented the hostname_checks_common_name switch

[issue36867] Make semaphore_tracker track other system resources

2019-05-11 Thread Pierre Glaser
Pierre Glaser added the comment: Shared memory segments are now tracked by the brand new resource_tracker! Thanks Antoine for the review. Does anyone have an opinion on introducing a public API for users to make the resource_tracker track resources of their choice? What We have in mind is: -

[issue36868] New behavior of OpenSSL hostname verification not exposed, incorrectly documented

2019-05-11 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +13159 stage: -> patch review ___ Python tracker ___ ___

[issue36888] Create a way to check that the parent process is alive for deamonized processes

2019-05-11 Thread Thomas Moreau
Change by Thomas Moreau : -- keywords: +patch pull_requests: +13158 stage: -> patch review ___ Python tracker ___ ___

[issue36888] Create a way to check that the parent process is alive for deamonized processes

2019-05-11 Thread Thomas Moreau
New submission from Thomas Moreau : In the std lib, the semaphore_tracker and the Manager rely on daemonized processes that are launched with server like loops. The cleaning of such processes is made complicated by the fact that there is no cannonical way to check that the parent process is

[issue36866] Certificate verification errors in urllib.request become URLError

2019-05-11 Thread Christian Heimes
Christian Heimes added the comment: Starting with 3.7, all OpenSSL and certificate-related exceptions are derived from SSLError. SSLError is a subclass of OSError. For backwards compatibility, SSLCertVerificationError is both a subclass of SSLError and ValueError. >>> ssl.CertificateError

[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-11 Thread Russell Keith-Magee
Change by Russell Keith-Magee : -- nosy: +freakboy3742 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36837] Make il8n tools available from `python -m`

2019-05-11 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Scratch what I said in https://bugs.python.org/issue36837?@ok_message=msg%20342005%20created%0Aissue%2036837%20message_count%2C%20messages%20edited%20ok&@template=item#msg342005 GNU msgfmt does extract the charset correctly. (My previous test failed to

[issue36751] Changes in the inspect module for PEP 570

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Opened PR 13245 to un-deprecate getfullargspec. -- ___ Python tracker ___ ___

[issue36751] Changes in the inspect module for PEP 570

2019-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +13157 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-11 Thread paul j3
paul j3 added the comment: Let me back off on that last suggestion. The problems described here and in https://bugs.python.org/issue17050 only apply to a positional. We could just add a note to the documentation to the effect. This nargs is best used as an optional as illustrated,

[issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6

2019-05-11 Thread Hrvoje Nikšić
Hrvoje Nikšić added the comment: @matrixise I've signed the CLA in the meantime, and it's now confirmed by https://check-python-cla.herokuapp.com/ Thanks for the pointer. -- ___ Python tracker

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: > for the smallest int `a` satisfying `a * a >= n` I'd spell that as `1 + isqrt(n - 1)`. I'd prefer to keep things simple and just add the one building block, rather than adding multiple variants. -- ___ Python

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: Some more discussion of possible algorithms and variations here: https://github.com/mdickinson/snippets/blob/master/notebooks/Integer%20square%20roots.ipynb (not sure why the LaTeX isn't all rendering properly at the bottom in the GitHub view; it's fine in

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What do you think about adding two integer square root functions -- for the largest int `a` satisfying `a * a <= n` and for the smallest int `a` satisfying `a * a >= n`? The latter case is also often encounter in practice. For example, this is the size of

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am wondering whether int(sqrt(float(n))) can be used as a good initial approximation. -- ___ Python tracker ___

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: > I am wondering whether int(sqrt(float(n))) can be used as a good initial > approximation. It can, but I'd prefer to avoid floating-point arithmetic (we don't have any guarantees about the accuracy of sqrt, so you'd always need a check and a fallback for

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: FTR (not for Serhiy, but for others reading this), here's the previous discussion of the possibility of adding an imath module. https://mail.python.org/pipermail/python-ideas/2018-July/051917.html While I'm happy for this to go in either math or a new

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: +1, but I propose to add it to the new imath module and move also factorial() and gcd() to it. New binomial() or comb() function (issue35431) should be added in imath too. -- nosy: +serhiy.storchaka ___ Python

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +13156 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue36887] Add integer square root, math.isqrt

2019-05-11 Thread Mark Dickinson
New submission from Mark Dickinson : The integer square root[1] is a common number-theoretic primitive, useful for example in primality testing. This is something I've had to code up myself multiple times, and is also something that's quite easy to get wrong, or implement in a way that's

[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-11 Thread Eryk Sun
Eryk Sun added the comment: This is due to an oversight in _CallPythonObject in Modules/_ctypes/callbacks.c. The setfunc protocol is to return None if there's no object to keep alive. This isn't applicable to py_object (i.e. O_set in Modules/_ctypes/cfield.c). So the problem is the

[issue36827] Overriding __new__ method with itself changes behaviour of the class

2019-05-11 Thread Alexey Muranov
Alexey Muranov added the comment: I see that I am not the only one who got bitten by this unexpected behaviour (though the others might have not realised it). There is a question ["Creating a singleton in Python"][1] on StackOverflow which was posted in 2011 and by now has the total of 737

[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-05-11 Thread Stefan Hölzl
Stefan Hölzl added the comment: Here is a complete example. Please consider this is a very simple example just to demonstrate what would be possible with my proposed changes. In the following example you can see two things: * saving informations about the context in which a workload was

[issue36886] problem with Types on Python-3.8.0a4

2019-05-11 Thread SilentGhost
SilentGhost added the comment: This is a consequence of PEP 570 that implements positional-only arguments (see issue 36540). Those projects would have to update their code. Good that there are already open bugs for both projects. -- components: +Interpreter Core -Windows nosy:

[issue36886] problem with Types on Python-3.8.0a4

2019-05-11 Thread Big Stone
New submission from Big Stone : remark: I get a similar error from two packages, when experimenting with Python-3.8.0a4 on Windows import asyncio await asyncio.sleep(0) --- TypeError

[issue36879] bug with round() and "numpy floats"

2019-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: BTW, there are various issues already open in the NumPy bug tracker, for example https://github.com/numpy/numpy/issues/11557 I propose closing this as "third party". -- ___ Python tracker

[issue36879] bug with round() and "numpy floats"

2019-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: > Maybe we should add something in the docs regarding the no-restriction point. IMO, the docs are clear enough (and also long enough) already here. Just as with most other magic methods, classes from third-party packages can return whatever they like. It

[issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain

2019-05-11 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: I got it to build PythonLauncher using clang and everything else using gcc 8.3.0 by making a few configure script and makefile changes. Unfortunately, "make install" still fails because a python script that requires the unbuilt _scproxy module crashes.

[issue36879] bug with round() and "numpy floats"

2019-05-11 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36759] datetime: astimezone() results in OSError: [Errno 22] Invalid argument

2019-05-11 Thread SilentGhost
Change by SilentGhost : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-05-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: Sorry, but in the provided snippet I see a class with an interface which looks close to executor. There is no clear relationship with standard executors (e.g. is it inherited from ThreadExecutor?). Proposed `future_factory` is also absent. Please, provide

[issue36884] DeprecationWarning in test_asyncio.test_pep492.StreamReaderTests.test_readline

2019-05-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: Nice catch! -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue36884] DeprecationWarning in test_asyncio.test_pep492.StreamReaderTests.test_readline

2019-05-11 Thread miss-islington
miss-islington added the comment: New changeset 79972f1fad5247ade34ef98ad987162a9a78401d by Miss Islington (bot) (Xtreak) in branch 'master': bpo-36884: Fix DeprecationWarning in test_asyncio StreamReader instantiation (GH-13243)

[issue36884] DeprecationWarning in test_asyncio.test_pep492.StreamReaderTests.test_readline

2019-05-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Looking at the commit where similar tests were fixed I think passing _asyncio_internal=True fixes the issue so I have created a PR with the same. -- stage: patch review -> ___ Python tracker

[issue36884] DeprecationWarning in test_asyncio.test_pep492.StreamReaderTests.test_readline

2019-05-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +13155 stage: -> patch review ___ Python tracker ___ ___

[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-11 Thread anthony shaw
anthony shaw added the comment: In the stack it's calling none_dealloc() which should never happen. Assume this is being triggered by ctypes PyCFuncPtr_call. The stacktrace I'm getting comes after the double decref so it's not showing the root cause. Someone who knows ctypes better might be

[issue36885] Make makeunicode.py script more readable

2019-05-11 Thread Stefan Behnel
Change by Stefan Behnel : -- title: Clean up makeunicode.py script -> Make makeunicode.py script more readable ___ Python tracker ___

  1   2   >