[issue39227] OverflowError in len(range(2**63))

2020-01-05 Thread Mark Dickinson
Mark Dickinson added the comment: (See also #21444) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39227] OverflowError in len(range(2**63))

2020-01-05 Thread Mark Dickinson
Mark Dickinson added the comment: Duplicate of #12159? -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list

[issue38623] Python documentation should mention how to find site-packages

2020-01-05 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17278 pull_request: https://github.com/python/cpython/pull/17858 ___ Python tracker ___

[issue38623] Python documentation should mention how to find site-packages

2020-01-05 Thread Inada Naoki
Inada Naoki added the comment: There is a document about it in Doc/library/site.rst already. I'm not sure this should be documented in the tutorial. -- nosy: +inada.naoki ___ Python tracker

[issue38597] C Extension import limit

2020-01-05 Thread Stefan Behnel
Stefan Behnel added the comment: Cython doesn't interfere with the C compiler setup in any way, that's left to distutils/setuptools (and the user). -- ___ Python tracker ___

[issue39229] library/functions.rst causes translated builds to fail

2020-01-05 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +mdk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38623] Python documentation should mention how to find site-packages

2020-01-05 Thread Vinay Keerthi
Vinay Keerthi added the comment: Just chiming in my opinion, the site-packages directory is also dependent on venv, correct? So would explaining where it is at a global install level be much use? Or do you mean explaining where site-packages is even for a venv? I could take this up, if

[issue39229] library/functions.rst causes translated builds to fail

2020-01-05 Thread Rafael Fontenelle
Change by Rafael Fontenelle : -- keywords: +patch pull_requests: +17277 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17857 ___ Python tracker

[issue39229] library/functions.rst causes translated builds to fail

2020-01-05 Thread Rafael Fontenelle
New submission from Rafael Fontenelle : Documentation file library/functions.rst has a syntax issue that when building documentation with warnings as errors, the following message appears: cpython/Doc/library/functions.rst:: WARNING: inconsistent term references in translated message.

[issue39228] traceback.FrameSummary does not handle exceptions from `repr()`

2020-01-05 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +17276 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17855 ___ Python tracker ___

[issue39228] traceback.FrameSummary does not handle exceptions from `repr()`

2020-01-05 Thread daniel hahler
New submission from daniel hahler : Exceptions within `__repr__` methods of captured locals (e.g. via the `capture_locals` argument of `TracebackException`) are not handled: ``` import traceback class CrashingRepr: def __repr__(self): raise RuntimeError("crash")

[issue38907] http.server (command) fails to bind dual-stack on Windows

2020-01-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +17275 pull_request: https://github.com/python/cpython/pull/17854 ___ Python tracker ___

[issue38907] http.server (command) fails to bind dual-stack on Windows

2020-01-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset ee94bdb0598f9bc47d6a49e58fffc97aa617be96 by Jason R. Coombs in branch 'master': bpo-38907: In http.server script, restore binding to IPv4 on Windows. (GH-17851) https://github.com/python/cpython/commit/ee94bdb0598f9bc47d6a49e58fffc97aa617be96

[issue30717] Add unicode grapheme cluster break algorithm

2020-01-05 Thread Manish
Manish added the comment: Oh, also, if y'all are fine with binding to Rust (through a C ABI) I'd love to help y'all use unicode-segmentation, which is much less work that pulling in ICU. Otherwise if y'all have implementation questions I can answer them. This spec is kinda tricky to

[issue30717] Add unicode grapheme cluster break algorithm

2020-01-05 Thread Manish
Manish added the comment: Hi, Unicodey person here, I'm involved in Unicode itself and also maintain an implementation of this particular spec[1]. So, firstly, > "a⃑".center(width=5, fillchar=".") If you're trying to do terminal width stuff, extended grapheme clusters *will not* solve

Dataset training using Kmeans

2020-01-05 Thread hanan lamaazi
Dear all, I'm actually using the K-means algorithm for clustering, and scikit-learn machine learning in python. when I want to print my "score_accuarcy" using this command >print(metrics.accuracy_score(y_test, y_pred)) I get the following error : "Classification metrics can't handle a mix

[issue39211] Change in http.server default IP behavior?

2020-01-05 Thread Shane
Shane added the comment: Based on my understanding, your fix should do it. -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue38597] C Extension import limit

2020-01-05 Thread Steve Dower
Steve Dower added the comment: I haven't looked into _why_ yet, but the first PYD I grabbed from the GitHub link above has had the CRT statically linked. This is not the default (or it should not be), because when we made it the default this exact issue occurred :) If somehow the default

[issue39227] OverflowError in len(range(2**63))

2020-01-05 Thread Zac Hatfield-Dodds
New submission from Zac Hatfield-Dodds : The value for `len` internally passes through an `ssize_t`, which means that it raises OverflowError for (very) large collections. This is admittedly only possible with collections such as `range` that do not store all their elements in memory, but it

[issue39211] Change in http.server default IP behavior?

2020-01-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: Other than addressing issue38907, is there anything else to be done here? In GH-17851, I've proposed a surgical fix to address the issue with IPv4 being unbound on Windows. -- ___ Python tracker

[issue38907] http.server (command) fails to bind dual-stack on Windows

2020-01-05 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +17272 pull_request: https://github.com/python/cpython/pull/17851 ___ Python tracker ___

[issue20215] socketserver.TCPServer can not listen IPv6 address

2020-01-05 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +17274 pull_request: https://github.com/python/cpython/pull/17851 ___ Python tracker ___

[issue25667] Supply dual-stack (IPv4/IPv6) socket bind routine

2020-01-05 Thread Jason R. Coombs
Change by Jason R. Coombs : -- keywords: +patch pull_requests: +17273 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17851 ___ Python tracker

[issue25872] multithreading traceback KeyError when modifying file

2020-01-05 Thread Michael Graczyk
Michael Graczyk added the comment: This issue still exists in Python 3. The repro just needs to be changed so that the threads are actually started. - map(lambda t: t.start(), threads) - map(lambda t: t.join(), threads) + [t.start() for t in threads] + [t.join() for t in threads] My fix is

[issue25872] multithreading traceback KeyError when modifying file

2020-01-05 Thread Cheryl Sabella
Cheryl Sabella added the comment: As @xtreak said, this looks like it was fixed for Python 3 and was only an issue for 2.7, so I'm closing the issue. -- nosy: +cheryl.sabella resolution: -> wont fix stage: patch review -> resolved status: open -> closed

[issue38623] Python documentation should mention how to find site-packages

2020-01-05 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +brett.cannon versions: -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___ ___

Re: Error in python installation - was Re: Python, Be Bold!

2020-01-05 Thread Michael Torrie
On 1/5/20 7:59 AM, Kishor Soni wrote: > After proceeding installation, few minutes later such error appears > "0x80072f7d - unspecified error" > A log file is generated and attached herewith I prefer to keep communication on the list. Where did you download the installer from? Python.org or

[issue39225] Python should warn when a global/local has the same name as a builtin

2020-01-05 Thread Eric V. Smith
Eric V. Smith added the comment: On the other hand, this would generate a lot of warnings for users of libraries, who aren't able to do anything about it. I've got tons of existing code that uses the names of builtins as locals, to no harm. And as builtins are added, new warnings would pop

[issue39226] venv does not include pythonXX.lib

2020-01-05 Thread Antonio Vázquez Blanco
New submission from Antonio Vázquez Blanco : I've tryed to install mod_wsgi using pip lately in a venv. This installation process fails with a message about a missing venv\scripts\libs\python38.lib file as reported in https://github.com/GrahamDumpleton/mod_wsgi/issues/506 It seems that this

[issue39130] Dict is reversable from v3.8 and should say that in the doc

2020-01-05 Thread miss-islington
miss-islington added the comment: New changeset 89947881ac36324148fab75190af453dc09fd862 by Miss Islington (bot) in branch '3.8': bpo-39130: Dict reversed was added in v3.8 so should say in the doc as well (GH-17694)

[issue39130] Dict is reversable from v3.8 and should say that in the doc

2020-01-05 Thread miss-islington
New submission from miss-islington : New changeset 94d9cfc4ed9dd3c4a3a359bc194b4dc3f6ba63eb by Miss Islington (bot) (Khalid Mammadov) in branch 'master': bpo-39130: Dict reversed was added in v3.8 so should say in the doc as well (GH-17694)

[issue39130] Dict is reversable from v3.8 and should say that in the doc

2020-01-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +17270 pull_request: https://github.com/python/cpython/pull/17848 ___ Python tracker ___

[issue39212] Show qualified function name when giving arguments error

2020-01-05 Thread Ram Rachum
Ram Rachum added the comment: Here is a short IPython session: In [1]: class Foo: ...: def __init__(self, x): ...: pass

[issue39225] Python should warn when a global/local has the same name as a builtin

2020-01-05 Thread Reuven Lerner
New submission from Reuven Lerner : Newcomers to Python are often frustrated and surprised when they define variables such as "sum" and "list", only to discover that they've masked access builtins of the same name. External code checkers do help, but those don't work in Jupyter or other

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Then I suggest to focus on optimizing real code. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

Announcing Numexpr 2.7.1

2020-01-05 Thread Robert McLeod
Hi everyone, This is a version bump to add support for Python 3.8 and NumPy 1.18. We are also removing support for Python 3.4. Project documentation is available at: http://numexpr.readthedocs.io/ Changes from 2.7.0 to 2.7.1 - Python 3.8 support has been added. -

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Even if there are cases, we need to prove that they are common enough I don't think cases for an extended slicing are common enough. In addition to stdlib, Django and flask (checked by Batuhan) I checked many popular 3rd party packages and there is

[issue33255] json.dumps has different behaviour if encoding='utf-8' or encoding='utf8'

2020-01-05 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39218] Assertion failure when calling statistics.variance() on a float32 Numpy array

2020-01-05 Thread Reed
Reed added the comment: Thank you all for the comments! Either using (x-c)*(x-c), or removing the assertion and changing the final line to `return (U, total)`, seem reasonable. I slightly prefer the latter case, due to Mark's comments about x*x being faster and simpler than x**2. But I am

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The optimization for constant indexes is handy for things like b'A'[0]. I do not know cases for constant slices of constant strings. Even if there are cases, we need to prove that they are common enough. The compiler does not perform all possible constant

[issue39211] Change in http.server default IP behavior?

2020-01-05 Thread Shane
Shane added the comment: Jason, thank you for the primer. > Nevertheless, when I tried the same thing on my Windows machine, I got a > different outcome. The server bound to [::0] but was unreachable on > http://127.0.0.1:8000. Perhaps it's an issue with IPv4 addresses in general for

[issue38907] http.server (command) fails to bind dual-stack on Windows

2020-01-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: In issue39211, I've done a good deal of investigation on this issue and confirmed your findings - on Windows, the server fails to bind dual stack on Windows, but instead binds IPV6ONLY. That needs to be fixed such that the default is to bind dual-stack.

[issue39211] Change in http.server default IP behavior?

2020-01-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: Indeed, if I apply this patch: ``` diff --git a/Lib/http/server.py b/Lib/http/server.py index 47a4fcf9a6..de995ae4b9 100644 --- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -1246,6 +1246,11 @@ def test(HandlerClass=BaseHTTPRequestHandler, """

[issue39211] Change in http.server default IP behavior?

2020-01-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: > It's the addition of flags=socket.AI_PASSIVE on Lib/http/server.py:1233 > that's causing this. Can you elaborate? What is it causing? I can see that flag was added in

[issue39221] Cross compiled python installed wrong version of lib2to3/Grammar pickle

2020-01-05 Thread Andrew Aladjev
Andrew Aladjev added the comment: For now I've created a workaround - just removed python version from pickle generator. For my current container it works perfect. -- keywords: +patch Added file: https://bugs.python.org/file48828/remove_python_version_from_pickle.patch

[issue39211] Change in http.server default IP behavior?

2020-01-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: First, a quick primer in IP: - Addresses are written as :::::::, but any single span of zeros can be written as ::, so `::` is all zeros and `::1` is the same as :::::::0001. - ::1 is the local

[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-01-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Yo be honest, this would add a lot of complexity as "from __future__ import annotations" is a compiler directive (CO_FUTURE_ANNOTATIONS) and bringing this to the AST level would be somehow disrupting. I would be -1 to disable AST optimizations in

[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-01-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Łukasz, should we disable AST optimizations in annotations if "from __future__ import annotations" is used? -- nosy: +pablogsal -BTaskaya ___ Python tracker

[issue39224] HTTPConnection.timeout None support

2020-01-05 Thread Daniel Farley
Change by Daniel Farley : -- keywords: +patch pull_requests: +17269 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17843 ___ Python tracker ___

[issue39221] Cross compiled python installed wrong version of lib2to3/Grammar pickle

2020-01-05 Thread Ned Deily
Change by Ned Deily : -- nosy: +doko ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39224] HTTPConnection.timeout None support

2020-01-05 Thread Daniel Farley
New submission from Daniel Farley : HTTPConnection's `timeout` argument is passed down to `socket.settimeout()` which supports `None` and puts the socket in blocking mode. This isn't documented on the `http.client` page. Otherwise it should not be allowed. -- assignee: docs@python

[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-01-05 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya -lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-01-05 Thread Batuhan
Change by Batuhan : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-01-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Batuhan
Batuhan added the comment: It looks like we have some usage for normal indexing (not this PR, the original optimization); cpython/cpython/Lib/base64.py:382 cpython/cpython/Lib/base64.py:382 cpython/cpython/Lib/base64.py:393 cpython/cpython/Lib/base64.py:397 cpython/cpython/Lib/pickle.py:306

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2020-01-05 Thread Giovanni Lombardo
Giovanni Lombardo added the comment: I propose the below fix: ``` def unbind(self, sequence, funcid=None): """Unbind for this widget for event SEQUENCE the function identified with FUNCID.""" bound = '' if funcid: self.deletecommand(funcid)

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The one in cpython/Tools/clinic/clinic.py:1185 is sort of an anti-pattern as it should be using '''\ Something something ''' instead of skipping the newline. -- ___ Python tracker

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I was reading the pull request and I have to say that I find using a switch instead of a very crowded "if" ward a bit more readable. I would be +0 on this case. -- ___ Python tracker

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Batuhan
Batuhan added the comment: I've scanned stdlib, django and flask and no usage so far. There is one in the test (which basically verifies behavior of slice) and one in the argument clinic which passes the newline for a multiline string. cpython/Tools/clinic/clinic.py:1185

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Batuhan
Batuhan added the comment: > Then I'd suggest removing the optimization for "abcde"[2], too. I've never > seen this in real code, and I can't come up with a scenario where it would be > performance critical. Remember, one of the goals for CPython is to be > reasonable readable, not

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Eric V. Smith
Eric V. Smith added the comment: Then I'd suggest removing the optimization for "abcde"[2], too. I've never seen this in real code, and I can't come up with a scenario where it would be performance critical. Remember, one of the goals for CPython is to be reasonable readable, not maximally

[issue39200] Fix inaccurate TypeError messages when calling with insufficient arguments

2020-01-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 4b66fa6ce9c37e70b55af220d0e07368319de803 by Pablo Galindo in branch 'master': bpo-39200: Correct the error message for range() empty constructor (GH-17813) https://github.com/python/cpython/commit/4b66fa6ce9c37e70b55af220d0e07368319de803

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-01-05 Thread Berker Peksag
Berker Peksag added the comment: > _markupbase.py is internal, so it should be safe to remove > ParserBase.error() and the code that calls it as suggested in #31844 Should I reopen https://github.com/python/cpython/pull/8562 then? -- ___ Python

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Batuhan
Batuhan added the comment: We already have a folding operation for Index access ("abcde"[2]) and there was a todo (left by @methane I guess) about supporting other slicings. I think this would look inconsistent if one is support and not the other one. --

[issue39174] unicodedata.normalize failing with NFD and NFKD for some characters in Python3

2020-01-05 Thread Lee Collins
Lee Collins added the comment: I did some more investigation by running cat on a file with the decomposed characters and saw that the output was composed. So, this does look like a problem with the Mac OS terminal. It can be resolved as 3rd party -- resolution: -> third party

[issue39152] Faulty override of tkinter.Misc.configure in tkinter.ttk.Scale.configure

2020-01-05 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 ___ Python tracker ___

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Specially because you need to do the mental calculation to know what the indexes are for the letters you want, and at that point you better write that string anyways, no? -- ___ Python tracker

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I am with Eric. Why would anyone write: "abcde"[2:4] Instead of just cd ? -- nosy: +pablogsal ___ Python tracker ___

[issue39152] Faulty override of tkinter.Misc.configure in tkinter.ttk.Scale.configure

2020-01-05 Thread miss-islington
miss-islington added the comment: New changeset 636a850ed81cf9b8feed523f277b1538bfc5230b by Miss Islington (bot) in branch '3.8': bpo-39152: add missing ttk.Scale.configure return value (GH-17815) https://github.com/python/cpython/commit/636a850ed81cf9b8feed523f277b1538bfc5230b --

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-01-05 Thread Ezio Melotti

Ezio Melotti  added the comment:

HTMLParser is supposed to follow the HTML5 standard, and never raise an error.

For the example in the first comment (""), the steps should be:

* 

[issue39211] Change in http.server default IP behavior?

2020-01-05 Thread SilentGhost
SilentGhost added the comment: It's the addition of flags=socket.AI_PASSIVE on Lib/http/server.py:1233 that's causing this. I think this also breaks for IPv4 sockets. -- components: +Library (Lib) keywords: +3.8regression nosy: +SilentGhost stage: -> needs patch

[issue39216] ast_opt.c -- missing posonlyargs?

2020-01-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks again for the fix and the investigation! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue39216] ast_opt.c -- missing posonlyargs?

2020-01-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +17268 pull_request: https://github.com/python/cpython/pull/17841 ___ Python tracker ___

[issue39152] Faulty override of tkinter.Misc.configure in tkinter.ttk.Scale.configure

2020-01-05 Thread miss-islington
miss-islington added the comment: New changeset 6234301bb56a9b388a1c3bf51169a2762ea09172 by Miss Islington (bot) in branch '3.7': bpo-39152: add missing ttk.Scale.configure return value (GH-17815) https://github.com/python/cpython/commit/6234301bb56a9b388a1c3bf51169a2762ea09172 --

[issue39152] Faulty override of tkinter.Misc.configure in tkinter.ttk.Scale.configure

2020-01-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +17267 pull_request: https://github.com/python/cpython/pull/17840 ___ Python tracker ___

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Eric V. Smith
Eric V. Smith added the comment: Does this occur often enough that it's worth the added code? -- nosy: +eric.smith ___ Python tracker ___

[issue39152] Faulty override of tkinter.Misc.configure in tkinter.ttk.Scale.configure

2020-01-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +17266 pull_request: https://github.com/python/cpython/pull/17839 ___ Python tracker ___

[issue39152] Faulty override of tkinter.Misc.configure in tkinter.ttk.Scale.configure

2020-01-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 5ea7bb25e3b192d6c49a49c9e3b316f8559602aa by Terry Jan Reedy in branch 'master': bpo-39152: add missing ttk.Scale.configure return value (GH-17815) https://github.com/python/cpython/commit/5ea7bb25e3b192d6c49a49c9e3b316f8559602aa --

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +17265 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17838 ___ Python tracker ___

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Batuhan
New submission from Batuhan : >>> def g(): "abcde"[2:4] ... >>> g.__code__.co_consts (None, 'abcde', 2, 4) to >>> def g(): "abcde"[2:4] ... >>> g.__code__.co_consts (None, 'cd') (I have a patch) -- components: Interpreter Core messages: 359350 nosy: BTaskaya priority: normal

[issue39211] Change in http.server default IP behavior?

2020-01-05 Thread Shane
Shane added the comment: A small update: Using the direct invocation: > python -m http.server 8000 Serving HTTP on :: port 8080 (http://[::]:8080/) ... Is NOT accessible at the following addresses: http://[::]:8080/ # most surprising, because this is where it tells you to go http://:8080/

[issue39222] unittest.mock.Mock.parent is broken or undocumented

2020-01-05 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39222] unittest.mock.Mock.parent is broken or undocumented

2020-01-05 Thread Florian Brucker
New submission from Florian Brucker : The "parent" attribute of unittest.mock.Mock is either broken or undocumented. For example, on Python 3.7.4: >>> from unittest.mock import Mock >>> m = Mock(x=1, parent=2) >>> m.x 1 >>> m.parent Traceback (most recent call last): File "", line 1, in

[issue39216] ast_opt.c -- missing posonlyargs?

2020-01-05 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +17264 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17837 ___ Python tracker ___

[issue36051] Drop the GIL during large bytes.join operations?

2020-01-05 Thread Bruce Merry
Bruce Merry added the comment: I ran the test on a Xeon machine (Skylake-XP) and it also looks like performance is only improved from 1MB up (somewhat to my surprise, given how poor single-threaded memcpy performance is on that machine). So I've updated the pull request with that threshold.

[issue37685] Fix equality checks for some types

2020-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +17263 pull_request: https://github.com/python/cpython/pull/17836 ___ Python tracker ___

[issue32856] Optimize the `for y in [x]` idiom in comprehensions

2020-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I want to merge PR 16814 if there are no objections. -- ___ Python tracker ___ ___

[issue39197] argparse: title and description for mutually exclusive arg groups

2020-01-05 Thread hai shi
hai shi added the comment: Do you have user case for it? _ArgumentGroup have the `title` attribute, so _MutuallyExclusiveGroup add same attribute is not a big probleam(if user really need it). -- nosy: +shihai1991 ___ Python tracker

[issue39221] Cross compiled python installed wrong version of lib2to3/Grammar pickle

2020-01-05 Thread Andrew Aladjev
Andrew Aladjev added the comment: This is build.log: https://gist.githubusercontent.com/andrew-aladev/f36e8e754278e4fad50ff13238326f7a/raw/245a72e8bd0fb3dc6e4185ec757b2d3ab59d5861/gistfile1.txt We can see that python installed "Grammar3.6.9.final.0.pickle" instead of

[issue39221] Cross compiled python installed wrong version of lib2to3/Grammar pickle

2020-01-05 Thread Andrew Aladjev
New submission from Andrew Aladjev : Please see the following gentoo bug https://bugs.gentoo.org/704816 https://github.com/python/cpython/blob/master/Lib/lib2to3/pgen2/driver.py#L110 > head + tail + ".".join(map(str, sys.version_info)) + ".pickle" I've tried "print(sys.version_info)" during

[issue39056] Issues with handling the -W option

2020-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39055] base64.b64decode() with validate=True does not raise for a trailing \n

2020-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39057] Issues with urllib.request.proxy_bypass_environment

2020-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-05 Thread hai shi
hai shi added the comment: One part of this issue is that all C extensions of the stdlib should be updated to implement the PEP 489 "Multi-phase extension module initialization". > I try to port _json extension module to multiphase initialization module, but > the baseline(using victor's

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-05 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +17262 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/17835 ___ Python tracker

[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-01-05 Thread Carl Friedrich Bolz-Tereick
New submission from Carl Friedrich Bolz-Tereick : PEP 563 interacts in weird ways with constant folding. running the following code: ``` from __future__ import annotations def f(a: 5 + 7) -> a ** 39: return 12 print(f.__annotations__) ``` I would expect this output: ``` {'a': '5 + 7',

Re: Python, Be Bold!

2020-01-05 Thread Abdur-Rahmaan Janhangeer
On Sun, 5 Jan 2020, 14:38 Marco Sulla, < mail.python@marco.sulla.e4ward.com> wrote: > > Sorry, I do not understand. > Probably do you mean: I install all the wheels in a machine identical > to the target I want (maybe using a VM, I don't know if Python support > cross-compiling). Then I copy

[issue39055] base64.b64decode() with validate=True does not raise for a trailing \n

2020-01-05 Thread miss-islington
miss-islington added the comment: New changeset 34aa3e71dc52c1a31336302905b9ac011a310412 by Miss Islington (bot) in branch '3.8': bpo-39055: Reject a trailing \n in base64.b64decode() with validate=True. (GH-17616)

[issue39056] Issues with handling the -W option

2020-01-05 Thread miss-islington
miss-islington added the comment: New changeset 43fbc70360b2a934ea809b2175d7e99031db2df3 by Miss Islington (bot) in branch '3.7': bpo-39056: Fix handling invalid warning category in the -W option. (GH-17618) https://github.com/python/cpython/commit/43fbc70360b2a934ea809b2175d7e99031db2df3

[issue39056] Issues with handling the -W option

2020-01-05 Thread miss-islington
miss-islington added the comment: New changeset e1caa49f68dd63b534774aebad0c240143e6fb5d by Miss Islington (bot) in branch '3.8': bpo-39056: Fix handling invalid warning category in the -W option. (GH-17618) https://github.com/python/cpython/commit/e1caa49f68dd63b534774aebad0c240143e6fb5d

  1   2   >