[issue15668] PEP 3121, 384 Refactoring applied to random module

2020-11-19 Thread STINNER Victor
STINNER Victor added the comment: commit cc0cd43c0f96dac413e54855e9c77ec4b73bd2f8 Author: Christian Heimes Date: Thu Nov 19 08:46:29 2020 +0100 bpo-1635741: Port _random to multiphase initialization (GH-23359) See bpo-4 "Convert a few stdlib extensions to the limited C API". -

[issue15668] PEP 3121, 384 Refactoring applied to random module

2020-06-22 Thread STINNER Victor
STINNER Victor added the comment: The PEP 384 part was fixed by: commit 04f0bbfbedf8d2bb69b012f853de6648b1a9f27f Author: Dino Viehland Date: Fri Sep 13 11:12:27 2019 +0100 bpo-38075: Port _randommodule.c to PEP-384 (GH-15798) - Migrate `Random_Type` to `PyType_FromSpec` -

[issue15668] PEP 3121, 384 Refactoring applied to random module

2014-05-13 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue15668] PEP 3121, 384 Refactoring applied to random module

2012-11-08 Thread Robin Schreiber
Changes by Robin Schreiber : -- keywords: +pep3121 -patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue15668] PEP 3121, 384 Refactoring applied to random module

2012-08-18 Thread Stefan Krah
Stefan Krah added the comment: Thanks, Mark. With your change applied I can't measure any performance differences either. -- ___ Python tracker ___ __

[issue15668] PEP 3121, 384 Refactoring applied to random module

2012-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: With the Py_tp_bases line removed, all tests pass for me on a non-debug 64-bit build on OS X 10.6. A quick timing of random.random() showed no distinguishable performance impact. -- ___ Python tracker

[issue15668] PEP 3121, 384 Refactoring applied to random module

2012-08-18 Thread Mark Dickinson
Mark Dickinson added the comment: The Py_tp_bases line below doesn't look right. I suspect that's what's causing the segfault. +static PyType_Slot Random_Type_slots[] = { +{Py_tp_getattro, PyObject_GenericGetAttr}, +{Py_tp_doc, random_doc}, +{Py_tp_methods, random_methods}, +{

[issue15668] PEP 3121, 384 Refactoring applied to random module

2012-08-18 Thread Stefan Krah
Stefan Krah added the comment: I tried to benchmark this patch but I'm getting a segfault: Python 3.3.0b2+ (default:dc18d73e67a5, Aug 18 2012, 15:37:04) [GCC 4.4.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import random Segmentation fault -- n

[issue15668] PEP 3121, 384 Refactoring applied to random module

2012-08-17 Thread Martin v . Löwis
Martin v. Löwis added the comment: Sure; I've mentored Robin throughout the summer with this, and this is his GSoC project. As for the specific change: this is primarily to support PEP 3121, and allowing multiple interpreters to use a module without fear of global variables being shared acros

[issue15668] PEP 3121, 384 Refactoring applied to random module

2012-08-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Martin, does this patch match your intent with PEP3121 and PEP384? -- assignee: -> loewis nosy: +loewis ___ Python tracker ___ _

[issue15668] PEP 3121, 384 Refactoring applied to random module

2012-08-15 Thread Robin Schreiber
New submission from Robin Schreiber: Changes proposed in PEP3121 and PEP384 have now been applied to the lsprof module! -- components: Extension Modules files: _random_pep3121-384_v0.patch keywords: patch messages: 168297 nosy: Robin.Schreiber, rhettinger priority: normal severity: norm