[issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple

2020-01-31 Thread hai shi
hai shi added the comment: I am not sure disallowing tuple metavars would break backup compatibility or not~ -- nosy: +shihai1991 versions: +Python 3.5 -Python 3.3 ___ Python tracker

[issue39496] Inelegant loops in Modules/_sqlite/cursor.c

2020-01-31 Thread Vedran Čačić
Vedran Čačić added the comment: It seems you haven't read carefully what I've written. This way some compilers might emit warnings. Please read https://stackoverflow.com/questions/5476759/compiler-warning-suggest-parentheses-around-assignment-used-as-truth-value --

[issue39496] Inelegant loops in Modules/_sqlite/cursor.c

2020-01-31 Thread Alex Henrie
Alex Henrie added the comment: You're right, that's even better. I forgot that the equals operator also returns the variable's new value. I just updated my pull request :-) -- ___ Python tracker

[issue39391] Run-dependent Pydoc output for functions default parameters

2020-01-31 Thread Peter O.
Peter O. added the comment: Is this bug tracker the correct place to "ask the pydoc developers to add an option to improve [the Pydoc] output", in the sense that the option doesn't write out object IDs? If not, where is the correct place to do so? --

[issue39496] Inelegant loops in Modules/_sqlite/cursor.c

2020-01-31 Thread Vedran Čačić
Vedran Čačić added the comment: You mean, something like while ((row = pysqlite_cursor_iternext(self))) { PyList_Append(list, row); Py_DECREF(row); } ? It's interesting that now we have walrus in Python, we see the opportunities for it in other languages. (In

[issue39515] pathlib won't strip "\n" in path

2020-01-31 Thread 徐彻
New submission from 徐彻 : Pathlib won't strip "\n" in path. Of course, "\n" should exist in a legal path. For example: >>>a=pathlib.Path(pathlib.Path("C:/Program Files/\n"),"./JetBrains/\n") >>>a WindowsPath('C:/Program Files/\n/JetBrains/\n') -- components: Library (Lib) messages:

[issue39514] http://sphinx.pocoo.org/

2020-01-31 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. The link has already been fixed in https://github.com/python/python-docs-theme/commit/fc9f203dd79587c8aed2b822cf7401518cd65bb5 I think it will be fixed once the new version of the theme is released. We can discuss the details over at

[issue29249] Pathlib glob ** bug

2020-01-31 Thread Isaac Muse
Isaac Muse added the comment: I think the idea of adding a globmatch function is a decent idea. That is what I did in a library I wrote to get more out of glob than what Python offered out of the box: https://facelessuser.github.io/wcmatch/pathlib/#purepathglobmatch. Specifically the

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-01-31 Thread STINNER Victor
STINNER Victor added the comment: PR 18301 is a WIP showing my intent. I'm not sure if it would be possible to land such change right now in Python. It has different drawbacks described in my previous messages. I don't know the impact on performance neither. --

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-01-31 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17678 pull_request: https://github.com/python/cpython/pull/18301 ___ Python tracker ___

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-01-31 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4d96b4635aeff1b8ad41d41422ce808ce0b971c8 by Victor Stinner in branch 'master': bpo-39511: PyThreadState_Clear() calls on_delete (GH-18296) https://github.com/python/cpython/commit/4d96b4635aeff1b8ad41d41422ce808ce0b971c8 --

[issue39484] time_ns() and time() cannot be compared on windows

2020-01-31 Thread Larry Hastings
Larry Hastings added the comment: (Oh, wow, Victor, you wrote all that while I was writing my reply. ;-) -- ___ Python tracker ___

[issue39484] time_ns() and time() cannot be compared on windows

2020-01-31 Thread Larry Hastings
Larry Hastings added the comment: I don't think this is fixable, because it's not exactly a bug. The problem is we're running out of bits. In converting the time around, we've lost some precision. So the times that come out of time.time() and time.time_ns() should not be considered

[issue39484] time_ns() and time() cannot be compared on windows

2020-01-31 Thread STINNER Victor
STINNER Victor added the comment: By the way, I wrote an article about the history on how Python rounds time... https://vstinner.github.io/pytime.html I also wrote two articles about nanoseconds in Python: * https://vstinner.github.io/python37-pep-564-nanoseconds.html *

[issue39484] time_ns() and time() cannot be compared on windows

2020-01-31 Thread STINNER Victor
STINNER Victor added the comment: Another way to understand the problem: nanosecond (int) => seconds (float) => nanoseconds (int) roundtrip looses precison. >>> a=1580301619906185300 >>> a/1e9*1e9 1.5803016199061852e+18 >>> b=int(a/1e9*1e9) >>> b 1580301619906185216 >>> a - b 84 The best

[issue39484] time_ns() and time() cannot be compared on windows

2020-01-31 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-39277 which is similar issue. I proposed a fix which uses nextafter(): https://github.com/python/cpython/pull/17933 -- ___ Python tracker

[issue39484] time_ns() and time() cannot be compared on windows

2020-01-31 Thread STINNER Victor
STINNER Victor added the comment: >>> a / 10**9 <= b False Try to use a/1e9 <= b. -- The C code to get the system clock is the same for time.time() and time.time_ns(). It's only the conversion of the result which is different: static PyObject * time_time(PyObject *self, PyObject

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-01-31 Thread STINNER Victor
STINNER Victor added the comment: > Would it not suffice to just make the singletons "immortal"? The problem is to make Py_INCREF/Py_DECREF efficient. Last time someone tried to use an atomic variable for ob_refcnt, it was 20% slower if I recall correctly. If many threads start to update

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-01-31 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7dc140126e918cc7c6e65aea321b7255f0020798 by Victor Stinner in branch 'master': bpo-39511: Fix multiprocessing semlock_acquire() (GH-18298) https://github.com/python/cpython/commit/7dc140126e918cc7c6e65aea321b7255f0020798 --

[issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently

2020-01-31 Thread Brett Cannon
Change by Brett Cannon : -- assignee: brett.cannon -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently

2020-01-31 Thread Brett Cannon
Brett Cannon added the comment: So I tried making pathlib.PurePath handle "." more like ".." and tests started failing all over the place in test_pathlib, which means it would be a change in semantics and could start silently breaking people as most of the checks are for specific

[issue39509] Update HTTP status code to follow IANA

2020-01-31 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39484] time_ns() and time() cannot be compared on windows

2020-01-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16651] Find out what stdlib modules lack a pure Python implementation

2020-01-31 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39514] http://sphinx.pocoo.org/

2020-01-31 Thread Carlos ESTEVES
New submission from Carlos ESTEVES : Hi, "Sphinx" link is break on webpage: https://docs.python.org/3/ See: http://sphinx.pocoo.org/;>Sphinx Thank You -- assignee: docs@python components: Documentation messages: 361135 nosy: cesteves, docs@python priority: normal severity: normal

[issue29249] Pathlib glob ** bug

2020-01-31 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39507] http library missing HTTP status code 418 "I'm a teapot"

2020-01-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: https://en.wikipedia.org/wiki/Hyper_Text_Coffee_Pot_Control_Protocol#Save_418_movement -- nosy: +rhettinger ___ Python tracker ___

[issue39484] time_ns() and time() cannot be compared on windows

2020-01-31 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +larry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39484] time_ns() and time() cannot be compared on windows

2020-01-31 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39480] referendum reference is needlessly annoying

2020-01-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: I concur with Steven and Raymond. The 2016 Brexit votes were Leave 17.4 million and Remain 16.1 million. No resemblence to the hypothetical example. I think that this should be closed as 'not a bug'. -- nosy: +terry.reedy

[issue37224] test__xxsubinterpreters fails randomly

2020-01-31 Thread miss-islington
miss-islington added the comment: New changeset f03a8f8d5001963ad5b5b28dbd95497e9cc15596 by Kyle Stanley in branch 'master': bpo-37224: Improve test__xxsubinterpreters.DestroyTests (GH-18058) https://github.com/python/cpython/commit/f03a8f8d5001963ad5b5b28dbd95497e9cc15596 -- nosy:

[issue26789] Please do not log during shutdown

2020-01-31 Thread Sandeep
Sandeep added the comment: I did import aiohttp and called function sys.is_finalizing() just before logging.basicConfig but still the same error. Has logging.basicConfig worked in past ? If yes what additional package I need to add Thanks -- nosy: +Sandeep

[issue39391] Run-dependent Pydoc output for functions default parameters

2020-01-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: repr(f2) is not 'non-deterministic'. If one runs it again for the same function object, one gets the same answer. It only changes when one starts over and creates a new function object with the same name but (usually) different id. I think it appropriate

[issue39513] NameError: name 'open' is not defined

2020-01-31 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue26789 -- nosy: +vinay.sajip, xtreak status: pending -> open ___ Python tracker ___

[issue39350] Remove deprecated fractions.gcd()

2020-01-31 Thread Miro Hrončok
Miro Hrončok added the comment: Naively implementing this code, I'd use isinstance(numerator, int) over type(numerator) is int. Is that strict type check really needed? I could not find anywhere whether numerator and denominator of numbers.Rational need to be numbers.Integral. I would expect

[issue39513] NameError: name 'open' is not defined

2020-01-31 Thread Sandeep
New submission from Sandeep : Hi I wrote a python script which gets file from other server and it works fine till the time I don't introduces logging feature to it. Please advice how to fix below This is the code I am using for logging ' import logging

[issue39513] NameError: name 'open' is not defined

2020-01-31 Thread Sandeep
Change by Sandeep : -- components: Library (Lib) nosy: Sandeep priority: normal severity: normal status: open title: NameError: name 'open' is not defined type: crash versions: Python 3.6 ___ Python tracker

[issue39512] expat parser not xml 1.1 (breaks xmlrpclib) - still

2020-01-31 Thread Malte Forkel
New submission from Malte Forkel : xmlrpc uses expat, which is not XML 1.1 compliant. Therefore, when transferring text, some characters which a valid according to the XML-RPC specification (http://xmlrpc.com/spec.md) will trigger expat to raise xml.parsers.expat.ExpatError: not well-formed

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

2020-01-31 Thread Ram Rachum
Ram Rachum added the comment: Hi guys, Can we please have a decision on whether we want to move forward with this issue or not? I have a patch in the PR, and I'll be happy to continue working on it, or close this issue if that's the decision. Thanks, Ram. --

[issue39503] [security][CVE-2020-8492] Denial of service in urllib.request.AbstractBasicAuthHandler

2020-01-31 Thread Anselmo Melo
Change by Anselmo Melo : -- nosy: +Anselmo Melo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-01-31 Thread Jeremy Kloth
Jeremy Kloth added the comment: Would it not suffice to just make the singletons "immortal"? Without affecting the hotpaths that are Py_INCREF and Py_DECREF, changing _Py_Dealloc to test for objects with a "special" destructor could be used: destructor dealloc = Py_TYPE(op)->tp_dealloc;

[issue39468] Improved the site module's permission handling while writing .python_history

2020-01-31 Thread Aurora
Change by Aurora : -- title: .python_history write permission improvements -> Improved the site module's permission handling while writing .python_history ___ Python tracker

[issue39468] Improved the site module's permission handling while writing .python_history

2020-01-31 Thread Aurora
Change by Aurora : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39468] .python_history write permission improvements

2020-01-31 Thread Aurora
Change by Aurora : -- pull_requests: -17675 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39468] .python_history write permission improvements

2020-01-31 Thread Aurora
Change by Aurora : -- pull_requests: +17677 pull_request: https://github.com/python/cpython/pull/18299 ___ Python tracker ___ ___

[issue39468] .python_history write permission improvements

2020-01-31 Thread Aurora
Change by Aurora : -- pull_requests: -17589 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39468] .python_history write permission improvements

2020-01-31 Thread Aurora
Change by Aurora : -- pull_requests: -17674 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39468] .python_history write permission improvements

2020-01-31 Thread Aurora
Change by Aurora : -- pull_requests: +17675 pull_request: https://github.com/python/cpython/pull/39468 ___ Python tracker ___ ___

[issue39468] .python_history write permission improvements

2020-01-31 Thread Aurora
Change by Aurora : -- pull_requests: +17674 pull_request: https://github.com/python/cpython/pull/18299 ___ Python tracker ___ ___

[issue39455] Update the documentation for the linecache module

2020-01-31 Thread Aurora
Change by Aurora : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-01-31 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +eric.snow, nanjekyejoannah, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39314] (readline) Autofill the closing parenthesis during auto-completion for functions which accept no arguments at all

2020-01-31 Thread Aurora
Change by Aurora : -- title: Autofill the closing paraenthesis during auto-completion for functions which accept no arguments at all -> (readline) Autofill the closing parenthesis during auto-completion for functions which accept no arguments at all

[issue39455] Update the documentation for the linecache module

2020-01-31 Thread Aurora
Change by Aurora : -- title: Update the documentation for linecache module -> Update the documentation for the linecache module ___ Python tracker ___

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-01-31 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17673 pull_request: https://github.com/python/cpython/pull/18298 ___ Python tracker ___

[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2020-01-31 Thread hai shi
Change by hai shi : -- pull_requests: +17672 pull_request: https://github.com/python/cpython/pull/18297 ___ Python tracker ___ ___

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-01-31 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17671 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18296 ___ Python tracker ___

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-01-31 Thread STINNER Victor
New submission from STINNER Victor : The long-term goal of the PEP 554 is to run two Python interpreters in parallel. To achieve this goal, no object must be shared between two interpreters. See for example my article "Pass the Python thread state explicitly" which gives a longer rationale:

[issue18233] SSLSocket.getpeercertchain()

2020-01-31 Thread Kent Watsen
Kent Watsen added the comment: I agree that having both would be best, but there is a world of difference between a must-have (peer_cert_chain) and what seems to be a nice-to-have (authed_peer_cert_chain). My request for clarification was not that I don't understand bags, etc. (see my

[issue39510] use-after-free in BufferedReader.readinto()

2020-01-31 Thread Philipp Gesang
Change by Philipp Gesang : -- keywords: +patch pull_requests: +17669 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18295 ___ Python tracker ___

[issue39510] use-after-free in BufferedReader.readinto()

2020-01-31 Thread Philipp Gesang
New submission from Philipp Gesang : reader = open ("/dev/zero", "rb") _void = reader.read (42) reader.close () reader.readinto (bytearray (42)) ### BANG! Bisected to commit dc469454ec. PR on Github to follow. -- messages: 361119 nosy: phg priority: normal severity:

[issue39509] Update HTTP status code to follow IANA

2020-01-31 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +17668 pull_request: https://github.com/python/cpython/pull/18294 ___ Python tracker ___

[issue39509] Update HTTP status code to follow IANA

2020-01-31 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: -17667 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39502] test_zipfile fails on AIX due to time.localtime

2020-01-31 Thread Michael Felt
Michael Felt added the comment: p.s., I manually added #18282 to the test, and the results are the same as without - using 64-bit. Will rebuild the 32-bit and try test again. -- ___ Python tracker

[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2020-01-31 Thread hai shi
hai shi added the comment: Steven, Thank you for your quick comment. sure, i will keep this bpo stay in `closed` status until enlist the support of core developers. -- ___ Python tracker

[issue39509] Update HTTP status code to follow IANA

2020-01-31 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +17667 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18293 ___ Python tracker ___

[issue39502] test_zipfile fails on AIX due to time.localtime

2020-01-31 Thread Michael Felt
Michael Felt added the comment: OK. There have been some comments/questions re: PR18282. a) my PR is missing that PR, seems we just missed each other. b) when using my patch I took a suggestion from issue39460 to test again: root@x065:[/home/python/python3-3.9]./python -m test -v

[issue39509] Update HTTP status code to follow IANA

2020-01-31 Thread Dong-hee Na
Dong-hee Na added the comment: See the docs that we follow IANA https://docs.python.org/3/library/http.html?highlight=iana#http-status-codes -- ___ Python tracker ___

[issue39508] no module curses error although i downloaded the module - windows 10

2020-01-31 Thread haim
Change by haim : Added file: https://bugs.python.org/file48875/p203.PNG ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39509] Update HTTP status code to follow IANA

2020-01-31 Thread Dong-hee Na
New submission from Dong-hee Na : status code 103 and 425 is missing. https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml -- components: Library (Lib) messages: 361114 nosy: corona10, martin.panter priority: normal severity: normal status: open title: Update

[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2020-01-31 Thread Steven D'Aprano
Steven D'Aprano added the comment: Please remember that not all Python programmers come from a C background where `++n` is a pre-increment operator. Then may have a OOP background where the unary `+` and `-` operators can do anything they like. Making `--obj` or `++obj` a syntax error is a

[issue39508] no module curses error although i downloaded the module - windows 10

2020-01-31 Thread haim
New submission from haim : hi, when i run my code its get error that ModuleNotFoundError: No module named '_curses' altough i download windoows curses 2.1.0 library i add a pictures thanx -- files: p204.PNG messages: 361112 nosy: haim986 priority: normal severity: normal status: open

[issue39350] Remove deprecated fractions.gcd()

2020-01-31 Thread Mark Dickinson
Mark Dickinson added the comment: The relevant piece of Python code from fractions.py looks like this: if type(numerator) is int is type(denominator): # *very* normal case g = math.gcd(numerator, denominator) if denominator < 0: g = -g else:

[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2020-01-31 Thread hai shi
hai shi added the comment: A discussion was initiated in https://discuss.python.org/t/why-compiler-doesnt-support-in-de-crement-operation-should-we-support-it/2181. And most of user tend not to support this in(de)crement operation. -- ___ Python

[issue39279] Don't allow non-Ascii digits in platform.py

2020-01-31 Thread Ram Rachum
Ram Rachum added the comment: Hey Victor, adding you here. This ticket is a continuation of the thread on the Python security mailing list. I see that there isn't a consensus here for changing from \d to [0-9]. Can you make a decision on whether to go ahead with this issue or not? Otherwise

[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2020-01-31 Thread hai shi
Change by hai shi : -- pull_requests: +17666 pull_request: https://github.com/python/cpython/pull/18292 ___ Python tracker ___ ___

[issue39507] http library missing HTTP status code 418 "I'm a teapot"

2020-01-31 Thread Dong-hee Na
Dong-hee Na added the comment: IMHO, Although this status code is also listed on the MDN guide, IANA left 418 as the unassigned code. ref0: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status ref1: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml --

[issue39350] Remove deprecated fractions.gcd()

2020-01-31 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39507] http library missing HTTP status code 418 "I'm a teapot"

2020-01-31 Thread Ross Rhodes
Change by Ross Rhodes : -- keywords: +patch pull_requests: +17665 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18291 ___ Python tracker ___

[issue39507] http library missing HTTP status code 418 "I'm a teapot"

2020-01-31 Thread Dong-hee Na
Dong-hee Na added the comment: I add martin.panter to review this issue as the core developer. -- nosy: +corona10, martin.panter ___ Python tracker ___

[issue12731] python lib re uses obsolete sense of \w in full violation of UTS#18 RL1.2a

2020-01-31 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: docs@python -> components: +Unicode -Documentation nosy: +benjamin.peterson, lemburg, serhiy.storchaka ___ Python tracker ___

[issue39507] http library missing HTTP status code 418 "I'm a teapot"

2020-01-31 Thread Ross Rhodes
New submission from Ross Rhodes : http library missing HTTP status code 418 "I'm a teapot". -- messages: 361106 nosy: trrhodes priority: normal severity: normal status: open title: http library missing HTTP status code 418 "I'm a teapot" ___ Python

[issue12731] python lib re uses obsolete sense of \w in full violation of UTS#18 RL1.2a

2020-01-31 Thread Henry S. Thompson
Henry S. Thompson added the comment: [One year and 2 days later... :-[ Is this fixed in 3.9? If not, the Versions list above should be updated. The failure of lower() to preserve 'alpha-ness' is a serious bug, it causes significant failures in e.g. Turkish NLP, and it's _not_ just a

[issue39350] Remove deprecated fractions.gcd()

2020-01-31 Thread Miro Hrončok
Miro Hrončok added the comment: Reproducer: class myint(int): def __mul__(self, other): return type(self)(int(self)*int(other)) @property def numerator(self): return type(self)(super().numerator) @property def denominator(self): return

[issue39350] Remove deprecated fractions.gcd()

2020-01-31 Thread Miro Hrončok
Miro Hrončok added the comment: I believe there is a regression here. numpy fails to build with Python 3.9.0a3. TestMatmul.test_matmul_object _ self = def test_matmul_object(self): import fractions f =

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-31 Thread Vedran Čačić
Vedran Čačić added the comment: And yeah, I managed to leave out 2. Speaking about "often implemented wrong"... :-)) -- ___ Python tracker ___

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-31 Thread Vedran Čačić
Vedran Čačić added the comment: is_prime that's always correct is probably not the right thing to go into math. Besides, now we have isqrt, it's just n>1 and n&1 and all(n%d for d in range(3,isqrt(n)+1,2)) -- yes, it's damn slow, but so is everything else you want to be absolutely

[issue21622] ctypes.util incorrectly fails for libraries without DT_SONAME

2020-01-31 Thread Natanael Copa
Change by Natanael Copa : -- nosy: +ncopa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39505] redundant ‘/’ in $env:VIRTUAL_ENV when use venv in powershell

2020-01-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39483] Proposial add loop parametr to run in asyncio

2020-01-31 Thread Андрей Казанцев
Андрей Казанцев added the comment: Where can I find issue which you are discussing for this thread? -- resolution: rejected -> status: closed -> open ___ Python tracker ___

[issue39506] operator |= on sets does not behave like the update method

2020-01-31 Thread Ammar Askar
Ammar Askar added the comment: Take a look at https://docs.python.org/3/faq/programming.html#why-am-i-getting-an-unboundlocalerror-when-the-variable-has-a-value What's happening is that because `a |= x` is treated as an assignment, i.e `a = a | x`. The compiler treats it as a local

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-31 Thread STINNER Victor
STINNER Victor added the comment: I dislike the idea of adding a is_prime() function in Python since users will likely stress Python with huge numbers and then complain that Python is too slow. Correct is_prime() is very slow for large numbers, and statistically approach is not 100%

[issue39506] operator |= on sets does not behave like the update method

2020-01-31 Thread Gabriele Tornetta
New submission from Gabriele Tornetta : def outer(): a=set() def inner(): a |= set(["A"]) inner() return a print(outer()) Traceback (most recent call last): File "main.py", line 8, in print(outer()) File "main.py", line 5, in outer inner() File "main.py", line 4, in

[issue39483] Proposial add loop parametr to run in asyncio

2020-01-31 Thread Andrew Svetlov
Andrew Svetlov added the comment: Explicit error is better than error-prone design. Think that we will deprecate asyncio.get_event_loop() and the loop instantiation on-demand in the main thread. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue39505] redundant ‘/’ in $env:VIRTUAL_ENV when use venv in powershell

2020-01-31 Thread Fuzheng Duan
Change by Fuzheng Duan : -- keywords: +patch pull_requests: +17663 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18290 ___ Python tracker ___

[issue18233] SSLSocket.getpeercertchain()

2020-01-31 Thread Nathaniel Smith
Nathaniel Smith added the comment: I'm not sure I agree about assuming that users will be able to work around these issues... I mean, nothing personal, I'm sure you're well-informed and maybe your code would work fine, but if you don't understand my example then how can you be entirely

[issue39505] redundant ‘/’ in $env:VIRTUAL_ENV when use venv in powershell

2020-01-31 Thread Fuzheng Duan
New submission from Fuzheng Duan : When windows users use "python -m venv ENV_DIR", a python virtual environment will be created in ENV_DIR. Powershell users use ENV_DIR\Scripts\Activate.ps1 to activate virtual environment. In powershell, a environment variable, "$env:VIRTUAL_ENV", is set and