[issue39865] getattr silences an unrelated AttributeError

2020-04-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Am going to mark this as closed for the reasons listed above. If another coredev wants to champion this, feel free to resurrect the issue. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue28002] ast.unparse can't roundtrip some f-strings

2020-04-15 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue40286] Add getrandbytes() method to random.Random

2020-04-15 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue40276] Make member objects inspectable.

2020-04-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: What should this return? >>> class A: ... __slots__ = ['x', 'y', 'z'] ... >>> class B(A): ... __slots__ = ['g','i'] ... >>> B.x.offset -- nosy: +pablogsal ___ Python tracker

[issue40282] random.getrandbits(0) should succeed

2020-04-15 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +18887 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19539 ___ Python tracker __

[issue40287] SpooledTemporaryFile.seek returns None

2020-04-15 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch nosy: +inada.naoki nosy_count: 1.0 -> 2.0 pull_requests: +1 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19540 ___ Python tracker __

[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-04-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: The incompatibility mentioned in msg366473 is probably fixable by treating the PyObject header the same as the GC head structure. With some care this could mostly maintain binary compatibility by inserting some unused fields in PyObject_HEAD instead of the

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: Something else that probably needs attention with the TypeSpec API is subclassing type in an extension when that subclass adds fields to the type object. I use this in PyObjC to (dynamically) create types that have some additional data. I could probably w

[issue40286] Add getrandbytes() method to random.Random

2020-04-15 Thread Vedran Čačić
Vedran Čačić added the comment: > I suggest just random.bytes(n), the same as numpy. The problem with this is that people who `from random import *` (some schools insist on this, probably because most functions they need already start with `rand`) will shadow builtin `bytes`. Not that those s

[issue40292] Memory leak when defining a new class inside a loop

2020-04-15 Thread pavlos kallis
New submission from pavlos kallis : Running the script, memory starts to leak and garbage count increases. Running the same script in python 2.7 does not cause the memory leak. -- components: C API files: memory_leak.py messages: 366495 nosy: pavlos kallis priority: normal severity: no

[issue40276] Make member objects inspectable.

2020-04-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Good point. I'll withdraw this. -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue40286] Add getrandbytes() method to random.Random

2020-04-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Do you have another name suggestion that doesn't have a parallelism problem with the existing name? The names getrandbytes() and getrandbits() suggest a parallelism that is incorrect. -- ___ Python tracker <

[issue40284] Add mapping methods to types.SimpleNamespace

2020-04-15 Thread Vedran Čačić
Vedran Čačić added the comment: I think there is a teaching moment here. I think it's important that no object in Python standard library conflates "item namespace" with "attr namespace". (Maybe that isn't true because of some specialized objects, but surely general ones such as SimpleNamespa

[issue40286] Add getrandbytes() method to random.Random

2020-04-15 Thread Vedran Čačić
Vedran Čačić added the comment: I think that the "module owner";-P must decide whether the `random` module should follow the C-namespacing or not. Of course, I'm in the "not" camp, so I believe those two "rand..." functions (randrange is completely redundant with random.choice(range)) should

[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-04-15 Thread Michael Felt
Michael Felt added the comment: On 14/04/2020 19:28, Michael Felt wrote: > Michael Felt added the comment: > > On 14/04/2020 14:54, Batuhan Taskaya wrote: >> Batuhan Taskaya added the comment: >> >>> With the print statements - it does not crash: >> I think this isn't directly relevant with p

[issue40286] Add getrandbytes() method to random.Random

2020-04-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur that bytes() isn't a good name, but am still concerned that the proposed name is a bad API decision. -- ___ Python tracker ___ _

[issue40292] Memory leak when defining a new class inside a loop

2020-04-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Python2.7 gives similar results with: class A(object): pass -- nosy: +rhettinger ___ Python tracker ___ _

[issue40292] Memory leak when defining a new class inside a loop

2020-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not a leak. It is expected behavior when you call gc.set_debug(gc.DEBUG_SAVEALL). -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue40286] Add getrandbytes() method to random.Random

2020-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe randbytes()? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list maili

[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-04-15 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > No. I do not think it is the real problem either. And I do not know compiler behavior well enough. Actually, considering the setting is still -O0 (aka no optimization) I am surprised it has any effect. if I understood correctly "no return" is intended to hel

[issue40286] Add getrandbytes() method to random.Random

2020-04-15 Thread STINNER Victor
STINNER Victor added the comment: I like "from random import randbytes" name. I concur that "from random import bytes" overrides bytes() builtin type and so can likely cause troubles. -- ___ Python tracker

[issue36207] robotsparser deny all with some rules

2020-04-15 Thread asca
asca added the comment: I thought it was going to work but apparently when I try https://www.actusite.fr/robots.txt, it doesn't -- nosy: +artasca ___ Python tracker ___ _

[issue40268] Reorganize pycore_pystate.h header

2020-04-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5eca75df031d3cbe577c75dd87734b48c787e7f6 by Victor Stinner in branch 'master': bpo-40268: Reformat posixmodule.c includes (GH-19536) https://github.com/python/cpython/commit/5eca75df031d3cbe577c75dd87734b48c787e7f6 --

[issue39953] Let's update ssl error codes

2020-04-15 Thread Michael Felt
Michael Felt added the comment: Do I need to open a new issue? This breaks building _ssl on AIX. building '_ssl' extension xlc_r -O -I./Include/internal -I/opt/aixtools/include -I./Include -I. -I/home/aixtools/python/cpython-master/Include -I/home/aixtools/python/cpython-master -c /home/ai

[issue40286] Add randbytes() method to random.Random

2020-04-15 Thread STINNER Victor
STINNER Victor added the comment: I updated my PR to rename the method to randbytes(). -- title: Add getrandbytes() method to random.Random -> Add randbytes() method to random.Random ___ Python tracker

[issue39953] Let's update ssl error codes

2020-04-15 Thread Michael Felt
Michael Felt added the comment: Also checking with gcc: get the following messages: Failed to build these modules: _ssl Could not build the ssl module! Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host(). LibreSSL 2.6.4 and earlier do not provide the

[issue40286] Add randbytes() method to random.Random

2020-04-15 Thread STINNER Victor
STINNER Victor added the comment: The performance of the new method is not my first motivation. My first motivation is to avoid consumers of the random to write a wrong implementation which would be biased. It's too easy to write biased functions without notifying. Moreover, it seems like w

[issue39953] Let's update ssl error codes

2020-04-15 Thread Michael Felt
Michael Felt added the comment: And when I use a standard OpenSSL library (on AIX): building '_ssl' extension gcc -pthread -Wno-unused-result -Wsign-compare -g -Og -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declar

[issue40268] Reorganize pycore_pystate.h header

2020-04-15 Thread STINNER Victor
STINNER Victor added the comment: > It exposes too many internals whereas most consumers only need basic > functions like _PyThreadState_GET(). That's basically done: pycore_pystate.h no longer defines PyInterpreterState structure. pycore_interp.h must now be included explicitly. It's now in

[issue40288] atexit module should not be loaded more than once per interpreter

2020-04-15 Thread Dong-hee Na
Dong-hee Na added the comment: I will take a look :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Carl Meyer
Carl Meyer added the comment: > Is it a common use case to load big data and then fork to use preloaded data? A lot of the "big data" in question here is simply lots of Python module/class/code objects resulting from importing lots of Python modules. And yes, this "pre-fork" model is extreme

[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread STINNER Victor
STINNER Victor added the comment: Carl: > A lot of the "big data" in question here is simply lots of Python > module/class/code objects resulting from importing lots of Python modules. > > And yes, this "pre-fork" model is extremely common for serving Python web > applications; it is the way

[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'll note that this "extremely common" model can break as soon as you have hidden worker threads somewhere (this can happen in a third-party library). For example, the libhdfs library is not fork-safe. -- ___ Pyth

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-15 Thread hai shi
hai shi added the comment: > Py_TRASHCAN_BEGIN() access directly PyTypeObject.tp_dealloc Looks like this macro not recorded in docs. Do we need using function to replace this macro? -- ___ Python tracker _

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-15 Thread STINNER Victor
STINNER Victor added the comment: > Looks like this macro not recorded in docs. It never prevented anyone to use a function of the C API :-) -- ___ Python tracker ___ ___

[issue40293] cpython-source-deps project missing release for libffi commits

2020-04-15 Thread Gregory Szorc
New submission from Gregory Szorc : The https://github.com/python/cpython-source-deps project is missing a source archive release for commits to libffi needed to support building on Windows. The latest release of libffi is version libffi-3.3.0-rc0-r1, which corresponds to https://github.com/

[issue40286] Add randbytes() method to random.Random

2020-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: All Random methods give the same result independently of endianess and bitness of the platform. > I don't think that these two implementations give the same result on big and > little endian. The second one does. -- _

[issue40293] cpython-source-deps project missing release for libffi commits

2020-04-15 Thread Steve Dower
Steve Dower added the comment: In master, we build against the latest build out of that repo, which comes from the libffi branch (not the 3.3.0 RC). In 3.8 (and 3.7? I forget) we use the 3.3.0 RC build. There's no later release from libffi (last I checked), and no important fixes since then

[issue40293] cpython-source-deps project missing release for libffi commits

2020-04-15 Thread Steve Dower
Steve Dower added the comment: To save the clicks, here's the URL that will get the latest sources from the libffi branch: https://github.com/python/cpython-source-deps/archive/libffi.zip -- ___ Python tracker

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-15 Thread hai shi
Change by hai shi : -- pull_requests: +18889 pull_request: https://github.com/python/cpython/pull/19541 ___ Python tracker ___ ___ P

[issue39953] Let's update ssl error codes

2020-04-15 Thread SilentGhost
SilentGhost added the comment: Michael, could you try with the latest fix in 584a3cfda4? -- nosy: +SilentGhost ___ Python tracker ___ _

[issue40293] cpython-source-deps project missing release for libffi commits

2020-04-15 Thread Gregory Szorc
Gregory Szorc added the comment: I don't like utilizing the dynamic archive links like https://github.com/python/cpython-source-deps/archive/libffi.zip (even if you pin the commit) because GitHub does not guarantee the file content is deterministic over time. I perform SHA-256 validation of

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-15 Thread hai shi
hai shi added the comment: > It never prevented anyone to use a function of the C API :-) Got it. If possible someone uses it, I will try to add a function to repalce it(MAYBE udpate this docs too;) ) -- ___ Python tracker

[issue40249] __import__ doesn't honour globals

2020-04-15 Thread Brett Cannon
Brett Cannon added the comment: Algorithm is documented as part of the language reference: https://docs.python.org/3/reference/import.html -- ___ Python tracker ___ _

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-15 Thread Jeffrey Quesnelle
New submission from Jeffrey Quesnelle : Starting with Python 3.8 (GH-16598), the `_asyncio` module's C initialization is guarded behind a static variable. If the module is initialized a second time and this variable is set, the resources from the first initialization are used. However, when t

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-15 Thread Jeffrey Quesnelle
Change by Jeffrey Quesnelle : -- keywords: +patch pull_requests: +18890 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19542 ___ Python tracker __

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-15 Thread STINNER Victor
STINNER Victor added the comment: _asyncio should be ported to multiphase initialization (PEP 489) and its types converted to PyType_FromSpec() rather than using statically allocated types. See bpo-1635741. -- nosy: +vstinner ___ Python tracker <

[issue25680] Selector.select() hangs when there is nothing to select

2020-04-15 Thread Russell Davis
Russell Davis added the comment: @gvanrossum PR is ready for review: https://github.com/python/cpython/pull/19508 -- ___ Python tracker ___ ___

[issue40293] Tag libffi build and sources in cpython-source-deps for 3.9.0b1

2020-04-15 Thread Steve Dower
Steve Dower added the comment: When we make a beta release, you can have a release artifact. Until then, if you're building against the master branch, you can use the dependency's "master" branch. I've renamed the issue so it can serve as a reminder to tag whatever version we use for beta 1

[issue40267] Error message differs when an expression is in an fstring

2020-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 9a4b38f66b3e674db94e07980e1cacb39e388c73 by Lysandros Nikolaou in branch 'master': bpo-40267: Fix message when last input character produces a SyntaxError (GH-19521) https://github.com/python/cpython/commit/9a4b38f66b3e674db94e07980e1cacb39e3

[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Neil Schemenauer
Neil Schemenauer added the comment: Eddie mentions in the PR about using memory arenas to contain immortal objects. I think it could be worth investigating further. With the current PR, the immortal status is dependent on the value of the refcnt field of the object. Using immortal arenas

[issue40267] Error message differs when an expression is in an fstring

2020-04-15 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35967] Better platform.processor support

2020-04-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 4b4e90a51848578dc06341777a929a0be4f4757f by Jason R. Coombs in branch 'master': bpo-35967: Baseline values for uname -p (GH-12824) https://github.com/python/cpython/commit/4b4e90a51848578dc06341777a929a0be4f4757f -- _

[issue39667] Update zipfile.Path with zipp 3.0

2020-04-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 3e72de9e08b03a15875f5b226c5f096e567dab42 by Miss Islington (bot) in branch '3.8': [3.8] bpo-39667: Sync zipp 3.0 (GH-18540) (GH-18701) https://github.com/python/cpython/commit/3e72de9e08b03a15875f5b226c5f096e567dab42 -- _

[issue39667] Update zipfile.Path with zipp 3.0

2020-04-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: In the 3.8 backport, I retained API compatibility and backported only the performance improvement code. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue35967] Better platform.processor support

2020-04-15 Thread Jason R. Coombs
Change by Jason R. Coombs : -- versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue25680] Selector.select() hangs when there is nothing to select

2020-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset ba1bcffe5cafc1bb0ac6fdf9ecef51e75e342707 by Russell Davis in branch 'master': bpo-29255: Wait in KqueueSelector.select when no fds are registered (GH-19508) https://github.com/python/cpython/commit/ba1bcffe5cafc1bb0ac6fdf9ecef51e75e342707 --

[issue29255] selects.KqueueSelector behaves incorrectly when no fds are registered

2020-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset ba1bcffe5cafc1bb0ac6fdf9ecef51e75e342707 by Russell Davis in branch 'master': bpo-29255: Wait in KqueueSelector.select when no fds are registered (GH-19508) https://github.com/python/cpython/commit/ba1bcffe5cafc1bb0ac6fdf9ecef51e75e342707 --

[issue29255] selects.KqueueSelector behaves incorrectly when no fds are registered

2020-04-15 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35967] Better platform.processor support

2020-04-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: The aformentioned test broke tests in buildbots: https://buildbot.python.org/all/#builders/105/builds/779 -- ___ Python tracker ___ ___

[issue35967] Better platform.processor support

2020-04-15 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +18891 pull_request: https://github.com/python/cpython/pull/19544 ___ Python tracker ___ _

[issue35967] Better platform.processor support

2020-04-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: raspbian failure https://buildbot.python.org/all/#/builders/645/builds/31 -- nosy: +gregory.p.smith ___ Python tracker ___

[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Anthony Sottile
Anthony Sottile added the comment: This patch has broken debian's builds due to use of modulefinder -- notably the type of `file_info` changed as a side-effect of this patch and is now causing: ../debian/pymindeps.py:29: DeprecationWarning: the imp module is deprecated in favour of importlib

[issue25680] Selector.select() hangs when there is nothing to select

2020-04-15 Thread Russell Davis
Russell Davis added the comment: I think this got auto-closed due to a link in the PR. Note that, per https://github.com/python/cpython/pull/19508#issuecomment-613317021, the behavior is still inconsistent on windows. I think the solution there will have to be a call to sleep() when the list

[issue39247] dataclass defaults and property don't work together

2020-04-15 Thread Juan Arrivillaga
Juan Arrivillaga added the comment: But when would you want to have a descriptor as an instance attribute? Descriptors must be in the class dictionary to work: https://docs.python.org/3/reference/datamodel.html#implementing-descriptors I suppose, you could want some container class of descri

[issue40257] Improve the use of __doc__ in pydoc

2020-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fbf2786c4c89430e2067016603078cf3500cfe94 by Serhiy Storchaka in branch 'master': bpo-40257: Output object's own docstring in pydoc (GH-19479) https://github.com/python/cpython/commit/fbf2786c4c89430e2067016603078cf3500cfe94 -- _

[issue25680] Selector.select() hangs when there is nothing to select

2020-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: How ironic, the other issue had to be closed manually. :-) Reopening this one. -- resolution: fixed -> status: closed -> open ___ Python tracker

[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Steve Dower
Steve Dower added the comment: Go ahead and fix it against this one. -- resolution: fixed -> stage: resolved -> needs patch status: closed -> open ___ Python tracker ___

[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Steve Dower
Steve Dower added the comment: Would be ideal to add a test that hits this case as well. -- ___ Python tracker ___ ___ Python-bugs-

[issue35967] Better platform.processor support

2020-04-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm hoping that PR 19544 fixes the issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Barry Alan Scott
Barry Alan Scott added the comment: I need to see the code of pymindeps to understand what you are doing and how to fix this. Can you post a URL to the source please? Are you aware that load_module() changed in other ways that are required to fix the bug? You may have to change yout pyminde

[issue39953] Let's update ssl error codes

2020-04-15 Thread Michael Felt
Michael Felt added the comment: I did update, and saw that there was one more patch applied. I think that fixed the define issues, but there may be a new concern. Ran out of time to document it today. Will post tomorrow. Sent from my iPhone > On 15 Apr 2020, at 17:53, SilentGhost wrote:

[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Filip Rembiałkowski
New submission from Filip Rembiałkowski : The doctest module does not compare multiline strings properly, as attached example proves. Tested on 2.7, 3.6 and 3.9.0a5+. (platform: Ubuntu 18.04). Related: https://stackoverflow.com/questions/60956015/unexpected-errors-while-testing-python3-code-

[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Barry Alan Scott
Barry Alan Scott added the comment: Regarding test case. I will need to know what pymindeps is doing to be able to design a suitable test case. -- ___ Python tracker ___

[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Anthony Sottile
Anthony Sottile added the comment: I'm admittedly a little unfamiliar with what it does as well -- I'm mostly repackaging debian sources for deadsnakes. If I'm correct in my assumption, it is attempting to find a minimal set of modules to package into `python3-minimal` and ensure that that

[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Anthony Sottile
Anthony Sottile added the comment: (additionally, I'm not sure this should be backported to python3.8, especially with changed behaviour) -- ___ Python tracker ___ __

[issue40257] Improve the use of __doc__ in pydoc

2020-04-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +18892 pull_request: https://github.com/python/cpython/pull/19546 ___ Python tracker ___

[issue40296] help(list[int]) fails

2020-04-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : >>> help(list[int]) Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/_sitebuiltins.py", line 103, in __call__ return pydoc.help(*args, **kwds) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1905, in __ca

[issue40270] activate (or include) json1 extension in sqlite

2020-04-15 Thread Zachary Ware
Zachary Ware added the comment: New changeset 58d6f2ee3aeb699156d4784acccd2910d27982e7 by Ammar Askar in branch 'master': bpo-40270: Enable json extension in Windows sqlite extension (GH-19528) https://github.com/python/cpython/commit/58d6f2ee3aeb699156d4784acccd2910d27982e7 -- ___

[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Did you try to run the tested function in the interactive Python interpreter? Did you get what you expected? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Carl Meyer
Carl Meyer added the comment: > I would be interested to hear the answer to Antoine's question which is > basically: why not using the multiprocessing fork server? Concretely, because for a long time we have used the uWSGI application server and it manages forking worker processes (among oth

[issue40270] activate (or include) json1 extension in sqlite

2020-04-15 Thread Zachary Ware
Zachary Ware added the comment: This has been done in the macOS installer since 9625bf520e08828e36bc3b1d043af679eb5f993d, so this is now done. I won't backport it due to the inevitable confusion over which patch version of which branch started including it on Windows; it's much easier to ju

[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Steve Dower
Steve Dower added the comment: The 3.8 behaviour is clearly broken, so backporting is fine. Also, io.open_code() is a security feature. The core of the issue is that apparently load_module() is a public API, and the file_info parameter used to be a 3-tuple and is now a 2-tuple. AFAICT, the

[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Steve Dower
Steve Dower added the comment: Sorry, misready. They're monkeypatching the API. It isn't documented, but it's also not clearly internal. We don't have a strong need to change the meaning of that argument though, so best to leave it as it was and not break anyone. -- ___

[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Steve Dower
Steve Dower added the comment: > What problem do you have in mind that the fork server would solve? My understanding is that the fork server solves the *general* problem of running arbitrary code before fork by making sure that only CPython/multiprocessing gets to run code before fork. In t

[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Steve is right. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Filip Rembiałkowski
Filip Rembiałkowski added the comment: @Serhiy, Thank you for feedback. Yes the "testme" function (indeed trivial) works as expected - both in interactive Python interpreter and in script file. If you go to Lib/doctest.py, search for "string-identical" and debug my example there, you will

[issue23082] pathlib relative_to() can give confusing error message

2020-04-15 Thread Sadhana Srinivasan
Sadhana Srinivasan added the comment: I'll work on this. I tried to come up with a single error message but having two different error messages seems like a better idea to me. One for when the path isn't a subpath and one for when absolute and relative paths are mixed. Basically to explain

[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Filip Rembiałkowski
Filip Rembiałkowski added the comment: Actually, the behavior does not depend on leading spaces, and test case can be isolated even further. Sample is attached [doctest-bugs-2.py]. -- Added file: https://bugs.python.org/file49066/doctest-bugs-2.py _

[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2020-04-15 Thread Graham Dumpleton
Graham Dumpleton added the comment: For the record. Since virtualenv 20.0.0 (or there about) switched to the python -m venv style virtual environment structure, the C API for embedding when using a virtual environment is now completely broken on Windows. The same workaround used on UNIX does

[issue40290] Add z_score to statistics.NormalDist

2020-04-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +18893 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19547 ___ Python tracker __

[issue40290] Add zscore to statistics.NormalDist

2020-04-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Trying out various names in code examples, zscore() was a clear winner over z_score(). Also, the name matches what is used in R and numpy. -- title: Add z_score to statistics.NormalDist -> Add zscore to statistics.NormalDist

[issue35967] Better platform.processor support

2020-04-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset e72cbcb346cfcc1ed7741ed6baf1929764e1ee74 by Jason R. Coombs in branch 'master': bpo-35967: Make test_platform.test_uname_processor more lenient to satisfy build bots. (GH-19544) https://github.com/python/cpython/commit/e72cbcb346cfcc1ed7741ed6

[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Carl Meyer
Carl Meyer added the comment: Makes sense. Yes, caution is required about what code runs before fork, but forkserver’s solution for that would be a non-starter for us, since it would ensure that we can share no basically no memory at all between worker processes. -- _

[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Steven D'Aprano
Steven D'Aprano added the comment: Have you tried calling multiline_output() in the REPL? It does *not* show your expected output: # expected First line Second line but the string repr(): # actual 'First line\nSecond line\n' Change your doctest to either: >>> m

[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Steven D'Aprano
Steven D'Aprano added the comment: By the way Filip, you were told on the Stackoverflow page that the output was correct and that you were not using doctest correctly. Serhiy also hinted to you that you should check the output in the REPL and you falsely claimed that it gave the expected out

[issue40297] test_socket.CANTest is broken at HEAD on master

2020-04-15 Thread Karl Ding
New submission from Karl Ding : While working on https://bugs.python.org/issue40291, I was trying to run the SocketCAN tests to ensure that my changes weren't causing any regressions. However, I was seeing test failures at HEAD. I'm running the tests like so: # Kernel version uname -r # 5.4.

[issue40297] test_socket.CANTest is broken at HEAD on master

2020-04-15 Thread Karl Ding
Change by Karl Ding : -- keywords: +patch pull_requests: +18894 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19548 ___ Python tracker ___ __

[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Eddie Elizondo
Eddie Elizondo added the comment: I was able to get an equal (maybe slightly better) performance by following the advice from Steve and Neil and skipping reference counting of instances that we know are immortal. It seems that by getting performance parity, we should be able to ease most of

[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Eddie Elizondo
Eddie Elizondo added the comment: Neil: > The fastest would be to create an immortal block as part of the BSS > (uninitialized data). That's an interesting idea, definitely worth exploring and we can probably get some perf win out of it. And yes, using the frozen modules is definitely a step

  1   2   >