Re: Contributing to cpython

2022-12-06 Thread Thomas Passin
On 12/6/2022 11:18 PM, ramvikram singh wrote: the issue is that after reading the issue I am not able to think how to modify the code, this is where I am stuck On Wed, Dec 7, 2022 at 1:54 AM ramvikram singh wrote: Greetings, I learnt python this year and visiting the python issue tab for the

Re: Contributing to cpython

2022-12-06 Thread ramvikram singh
the issue is that after reading the issue I am not able to think how to modify the code, this is where I am stuck On Wed, Dec 7, 2022 at 1:54 AM ramvikram singh wrote: > Greetings, > I learnt python this year and visiting the python issue tab for the last > two months, but there is a problem whi

Re: Contributing to cpython

2022-12-06 Thread Thomas Passin
On 12/6/2022 3:24 PM, ramvikram singh wrote: Greetings, I learnt python this year and visiting the python issue tab for the last two months, but there is a problem which I am facing I understand the issue after reading the few times but I can't think about how to modify the code as per the issue.

Re: Contributing to cpython

2022-12-06 Thread Barry
> On 6 Dec 2022, at 20:55, ramvikram singh wrote: > > Greetings, > I learnt python this year and visiting the python issue tab for the last > two months, but there is a problem which I am facing I understand the issue > after reading the few times but I can't think about how to modify the code

Contributing to cpython

2022-12-06 Thread ramvikram singh
Greetings, I learnt python this year and visiting the python issue tab for the last two months, but there is a problem which I am facing I understand the issue after reading the few times but I can't think about how to modify the code as per the issue. Could you please help me with this? -- https:

Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-24 Thread Barry Scott
t; > Date: Friday, October 7, 2022 at 1:30 PM > To: MRAB mailto:pyt...@mrabarnett.plus.com>> > Cc: python-list@python.org <mailto:python-list@python.org> > mailto:python-list@python.org>> > Subject: Re: Ref-strings in logging messages (was: Performance issue with

Re: Quick question about CPython interpreter

2022-10-17 Thread Chris Angelico
On Tue, 18 Oct 2022 at 03:51, Stefan Ram wrote: > > MRAB writes: > >It can't optimise that because, say, 'print' could've been bound to a > >function that rebinds 'str'. > > It would be possible to find out whether a call of a function > named "print" is to the standard function, but the over

Re: Quick question about CPython interpreter

2022-10-17 Thread MRAB
P 6 40 POP_TOP 42 JUMP_ABSOLUTE 46 44 JUMP_ABSOLUTE 20 >> 46 LOAD_CONST 4 (None) 48 RETURN_VALUE In short, it seems the cpython interpreter doesn't (currently) perform this sort of optimization.

Re: Quick question about CPython interpreter

2022-10-17 Thread David Lowry-Duda
5 (print) 34 LOAD_CONST 3 ('found') 36 CALL_FUNCTION1 38 POP_TOP 6 40 POP_TOP 42 JUMP_ABSOLUTE 46 44 JUMP_ABSOLUTE 20 >> 46 LOAD_CONST

Re: Quick question about CPython interpreter

2022-10-17 Thread Michael Torrie
): > break > > > - > this does one str() conversion before the loop > - > strID = str(ID) > for i in range(cells.count()): >if text == strID: > bre

Quick question about CPython interpreter

2022-10-17 Thread DFS
- this does one str() conversion before the loop - strID = str(ID) for i in range(cells.count()): if text == strID: break But does CPython interpret the str() conversion away and essentially do it for me in the first example

Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-08 Thread Weatherby,Gerard
hello" logging.basicConfig() logging.debug(Defer(some_expensive_function)) From: Python-list on behalf of Barry Date: Friday, October 7, 2022 at 1:30 PM To: MRAB Cc: python-list@python.org Subject: Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython) *** Attentio

Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread Julian Smith
On Fri, 7 Oct 2022 18:28:06 +0100 Barry wrote: > > On 7 Oct 2022, at 18:16, MRAB wrote: > > > > On 2022-10-07 16:45, Skip Montanaro wrote: > >>> On Fri, Oct 7, 2022 at 9:42 AM Andreas Ames > >>> > >>> wrote: > >>> 1. The culprit was me. As lazy as I am, I have used f-strings all over the >

Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread Barry
ebug = logger_from(DEBUG) log_debug and log_debug(‘expensive %s’ % (complex(),)) Barry > > From: Python-list on > behalf of Barry > Date: Friday, October 7, 2022 at 1:30 PM > To: MRAB > Cc: python-list@python.org > Subject: Re: Ref-strings in logging messages (was: Pe

Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread Weatherby,Gerard
To: MRAB Cc: python-list@python.org Subject: Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython) *** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. *** > On 7 Oct 2022, at 18:16, MRAB wrote: >

Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread Barry
> On 7 Oct 2022, at 18:16, MRAB wrote: > > On 2022-10-07 16:45, Skip Montanaro wrote: >>> On Fri, Oct 7, 2022 at 9:42 AM Andreas Ames >>> wrote: >>> 1. The culprit was me. As lazy as I am, I have used f-strings all over the >>> place in calls to `logging.logger.debug()` and friends, evaluatin

Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread MRAB
On 2022-10-07 16:45, Skip Montanaro wrote: On Fri, Oct 7, 2022 at 9:42 AM Andreas Ames wrote: 1. The culprit was me. As lazy as I am, I have used f-strings all over the place in calls to `logging.logger.debug()` and friends, evaluating all arguments regardless of whether the logger was enabled

Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread Barry
> On 7 Oct 2022, at 16:48, Skip Montanaro wrote: > > On Fri, Oct 7, 2022 at 9:42 AM Andreas Ames > wrote: > >> 1. The culprit was me. As lazy as I am, I have used f-strings all over the >> place in calls to `logging.logger.debug()` and friends, evaluating all >> arguments regardless of wheth

Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread Skip Montanaro
Dang autocorrect. Subject first word was supposed to be "f-strings" not "ref-strings." Sorry about that. S On Fri, Oct 7, 2022, 10:45 AM Skip Montanaro wrote: > > > On Fri, Oct 7, 2022 at 9:42 AM Andreas Ames > wrote: > >> 1. The culprit was me. As lazy as I am, I have used f-strings all over

Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread Skip Montanaro
On Fri, Oct 7, 2022 at 9:42 AM Andreas Ames wrote: > 1. The culprit was me. As lazy as I am, I have used f-strings all over the > place in calls to `logging.logger.debug()` and friends, evaluating all > arguments regardless of whether the logger was enabled or not. > I thought there was some dis

Re: Performance issue with CPython 3.10 + Cython

2022-10-07 Thread Andreas Ames
815.qwe...@gmail.com>: > Hi all, > > I am wrapping an embedded application (, which does not use any dynamic > memory management,) using Cython to call it from CPython. The wrapped > application uses a cyclic executive, i.e. everything is done in the > input-logic-output desig

Performance issue with CPython 3.10 + Cython

2022-10-04 Thread Andreas Ames
Hi all, I am wrapping an embedded application (, which does not use any dynamic memory management,) using Cython to call it from CPython. The wrapped application uses a cyclic executive, i.e. everything is done in the input-logic-output design, typical for some real-time related domains

Re: "CPython"

2022-06-24 Thread Avi Gross via Python-list
varied! LOL! -Original Message- From: David J W To: Avi Gross Cc: python-list@python.org Sent: Fri, Jun 24, 2022 11:57 am Subject: Re: "CPython" The main motivation for a Python virtual machine in Rust is to strengthen my knowledge with Rust which currently has some gnarly

Re: "CPython"

2022-06-24 Thread David J W
y taken. Going backward to the issue of use and audience. Making Rython a real virtual machine that passes the CPython unit-tests is the only goal. I am actively following the faster CPython fork that Mike Shannon, GVR, and others are working on with the intention to try and incorporate what they d

Re: "CPython"

2022-06-23 Thread Avi Gross via Python-list
? -Original Message- From: David J W To: python-list@python.org Sent: Thu, Jun 23, 2022 10:29 am Subject: Re: "CPython" >> Let's say they reimplement "reference python" CPython in Rust. What is >> better? Change the "reference python" CPyth

Re: "CPython"

2022-06-23 Thread David J W
>> Let's say they reimplement "reference python" CPython in Rust. What is >> better? Change the "reference python" CPython name to RPython, for >> example, or let it as CPython? >The C implementation would still be called CPython, and the n

Re: "CPython"

2022-06-21 Thread Greg Ewing
On 22/06/22 4:42 am, MRAB wrote: On 2022-06-21 03:52, Avi Gross via Python-list wrote: This leads to the extremely important question of what would an implementation of Python, written completely in C++, be called? C++Python CPython++ C+Python+ DPython SeaPython? SeeSeaSiPython CincPython

Re: "CPython"

2022-06-21 Thread jkn
On Tuesday, June 21, 2022 at 2:09:27 PM UTC+1, Grant Edwards wrote: > On 2022-06-21, Chris Angelico wrote: > > > Not sure why it's strange. The point is to distinguish "CPython" from > > "Jython" or "Brython" or "PyPy" or any of t

Re: "CPython"

2022-06-21 Thread 2QdxY4RzWzUUiLuE
On 2022-06-21 at 17:04:45 +, Avi Gross via Python-list wrote: > My problem with that idea is, believe it or not, that it is too negative. > What you meant to be seen as a dash is a minus sign to me. And both C and C++ > not only have both a pre and post autoincrement variable using ++x and

Re: "CPython"

2022-06-21 Thread Avi Gross via Python-list
who kept improving C thought the ++ concept was best removed! -Original Message- From: Greg Ewing To: python-list@python.org Sent: Tue, Jun 21, 2022 3:53 am Subject: Re: "CPython" On 21/06/22 2:56 pm, Paulo da Silva wrote: > Let's say they reimplement "reference

Re: "CPython"

2022-06-21 Thread MRAB
to troll postings might make them spread unconfirmed ideas about the meaning of "C" in "CPython". The /core/ of CPython is written in C. CPython is the /canonical/ implementation of Python. The "C" in "CPython" stands for C. Not s

Re: "CPython"

2022-06-21 Thread Dennis Lee Bieber
On Tue, 21 Jun 2022 19:53:51 +1200, Greg Ewing declaimed the following: >Although if it were called RPython, no doubt a new debate would >flare up over whether the "R" stands for "Rust" or "Reference"... Or does RPython refer to a Python integrated into the R statistics system?

Re: "CPython"

2022-06-21 Thread Dennis Lee Bieber
On Tue, 21 Jun 2022 01:53:38 +0100, Paulo da Silva declaimed the following: >I still find very strange, to not say weird, that a compiler or >interpreter has a name based in the language it was written. But, again, >is just my opinion and nothing more. > The whole purpose for that was

Re: "CPython"

2022-06-21 Thread MRAB
On 2022-06-21 03:52, Avi Gross via Python-list wrote: This leads to the extremely important question of what would an implementation of Python, written completely in C++, be called? C++Python CPython++ C+Python+ DPython SeaPython? SeeSeaSiPython CincPython? FYI, there's a language cal

Re: "CPython"

2022-06-21 Thread Greg Ewing
On 21/06/22 8:37 pm, Christian Gollwitzer wrote: Am 20.06.22 um 22:47 schrieb Roel Schroeven: "CPython is a descendant of Pyscript built on Pyodide, a port of CPython, or a Python distribution for the browser and Node.js that is based on Webassembly and Emscripten." To me, this s

Re: "CPython"

2022-06-21 Thread Christian Gollwitzer
Am 20.06.22 um 22:47 schrieb Roel Schroeven: indication that www.analyticsinsight.net is wrong on that point. Frankly that website seems very low quality in general. In that same article they say: "CPython is a descendant of Pyscript built on Pyodide, a port of CPython, or a P

Re: "CPython"

2022-06-21 Thread Dennis Lee Bieber
tOn Tue, 21 Jun 2022 02:52:28 + (UTC), Avi Gross declaimed the following: > >I don't even want to think fo what sound a C# Python would make. A musical hiss on a frequency of 277.183Hz (for the C# above middle-C) -- Wulfraed Dennis Lee Bieber AF6VN

Re: "CPython"

2022-06-21 Thread Greg Ewing
s the successor to JPython. The Jython project was created in accordance with the CNRI JPython 1.1.x license, in order to ensure the continued existence and development of this important piece of Python software. The intent is to manage this project with the same open policies that are serving CP

Re: "CPython"

2022-06-21 Thread jak
Il 21/06/2022 04:56, Paulo da Silva ha scritto: Às 03:20 de 21/06/22, MRAB escreveu: On 2022-06-21 02:33, Chris Angelico wrote: On Tue, 21 Jun 2022 at 11:13, Paulo da Silva wrote: Às 20:01 de 20/06/22, Paulo da Silva escreveu: > Às 18:19 de 20/06/22, Stefan Ram escreveu: [snip] After all

Re: "CPython"

2022-06-21 Thread Greg Ewing
On 21/06/22 2:56 pm, Paulo da Silva wrote: Let's say they reimplement "reference python" CPython in Rust. What is better? Change the "reference python" CPython name to RPython, for example, or let it as CPython? The C implementation would still be called CPython, a

Re: "CPython"

2022-06-21 Thread Greg Ewing
On 21/06/22 2:52 pm, Avi Gross wrote: This leads to the extremely important question of what would an implementation of Python, written completely in C++, be called? (Pronounced with a comical stutter) "C-p-p-python!") -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: "CPython"

2022-06-21 Thread Greg Ewing
On 21/06/22 2:38 pm, Paulo da Silva wrote: Notice that they are, for example, Jython and not JPython. Jython *was* originally called JPython, but that was judged to be a trademark violation and they were made to change it. I don't know how MicroPython has escaped the same fate to date. -- Gre

Re: "CPython"

2022-06-21 Thread Eryk Sun
mentation and API ever switched to a different programming language, I'd personally be fine with changing the 'C" in "CPython" to mean "canonical", but not "core". The term "core" is used for building the interpreter core with access to internals

Re: "CPython"

2022-06-21 Thread Grant Edwards
On 2022-06-21, Chris Angelico wrote: > Not sure why it's strange. The point is to distinguish "CPython" from > "Jython" or "Brython" or "PyPy" or any of the other implementations. > Yes, CPython has a special place because it's the r

Re: "CPython"

2022-06-20 Thread Chris Angelico
Paulo da Silva escreveu: > >>> > Às 18:19 de 20/06/22, Stefan Ram escreveu: > >>> >>The same personality traits that make people react > >>> >>to troll postings might make them spread unconfirmed > >>> >>ideas about the m

Re: "CPython"

2022-06-20 Thread Chris Angelico
On Tue, 21 Jun 2022 at 12:53, Avi Gross via Python-list wrote: > > I don't even want to think fo what sound a C# Python would make. Probably about 277 Hz... ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: "CPython"

2022-06-20 Thread Paulo da Silva
>>    to troll postings might make them spread unconfirmed >>    ideas about the meaning of "C" in "CPython". >> >>    The /core/ of CPython is written in C. >> >>    CPython is the /canonical/ implementation of Python. >> >>    The

Re: "CPython"

2022-06-20 Thread Paulo da Silva
unconfirmed ideas about the meaning of "C" in "CPython". The /core/ of CPython is written in C. CPython is the /canonical/ implementation of Python. The "C" in "CPython" stands for C. Not so "unconfirmed"! Look at this article,

Re: "CPython"

2022-06-20 Thread Avi Gross via Python-list
This leads to the extremely important question of what would an implementation of Python, written completely in C++, be called? C++Python CPython++ C+Python+ DPython SeaPython? SeeSeaSiPython I don't even want to think fo what sound a C# Python would make. OK, my apologies to all. Bei

Re: "CPython"

2022-06-20 Thread MRAB
ake them spread unconfirmed >>ideas about the meaning of "C" in "CPython". >> >>The /core/ of CPython is written in C. >> >>CPython is the /canonical/ implementation of Python. >> >>The "C" in "CPython"

Re: "CPython"

2022-06-20 Thread Chris Angelico
firmed > >>ideas about the meaning of "C" in "CPython". > >> > >>The /core/ of CPython is written in C. > >> > >>CPython is the /canonical/ implementation of Python. > >> > >>The "C&qu

Re: "CPython"

2022-06-20 Thread Paulo da Silva
Às 20:01 de 20/06/22, Paulo da Silva escreveu: Às 18:19 de 20/06/22, Stefan Ram escreveu:    The same personality traits that make people react    to troll postings might make them spread unconfirmed    ideas about the meaning of "C" in "CPython".    The /core/ of CPy

Re: "CPython"

2022-06-20 Thread dn
On 21/06/2022 10.02, Chris Angelico wrote: > On Tue, 21 Jun 2022 at 08:01, dn wrote: >> >> On 21/06/2022 09.47, Roel Schroeven wrote: >> ... >> >>> So we have an untrustworthy site that's the only one to claim that >>> CPython is short for C

Re: "CPython"

2022-06-20 Thread Chris Angelico
On Tue, 21 Jun 2022 at 08:01, dn wrote: > > On 21/06/2022 09.47, Roel Schroeven wrote: > ... > > > So we have an untrustworthy site that's the only one to claim that > > CPython is short for Core Python, and we have an official site that says > > CPython is so

Re: "CPython"

2022-06-20 Thread Chris Angelico
irmed > > >ideas about the meaning of "C" in "CPython". > > > > > >The /core/ of CPython is written in C. > > > > > >CPython is the /canonical/ implementation of Python. > > > > > >The "C"

Re: "CPython"

2022-06-20 Thread dn
On 21/06/2022 09.47, Roel Schroeven wrote: ... > So we have an untrustworthy site that's the only one to claim that > CPython is short for Core Python, and we have an official site that says > CPython is so named because it's written in C. Hm, which one to believe? ...and so

Re: "CPython"

2022-06-20 Thread Roel Schroeven
Paulo da Silva schreef op 20/06/2022 om 21:01: Às 18:19 de 20/06/22, Stefan Ram escreveu: >The same personality traits that make people react >to troll postings might make them spread unconfirmed >ideas about the meaning of "C" in "CPython". > >

Re: "CPython"

2022-06-20 Thread Chris Angelico
On Tue, 21 Jun 2022 at 06:31, Stefan Ram wrote: > > Paulo da Silva writes: > >Do you have any credible reference to your assertion "The "C" in > >"CPython" stands for C."? > > Whether a source is considered "credible" is somethi

Re: "CPython"

2022-06-20 Thread Dennis Lee Bieber
On Mon, 20 Jun 2022 20:01:51 +0100, Paulo da Silva declaimed the following: >Not so "unconfirmed"! >Look at this article, I recently read: >https://www.analyticsinsight.net/cpython-to-step-over-javascript-in-developing-web-applications/ > >There is a sentence in ther

Re: "CPython"

2022-06-20 Thread Paulo da Silva
Às 18:19 de 20/06/22, Stefan Ram escreveu: The same personality traits that make people react to troll postings might make them spread unconfirmed ideas about the meaning of "C" in "CPython". The /core/ of CPython is written in C. CPython is the /canonica

RE: cpython and python and visual studio 2019

2022-06-09 Thread jschwar
Never mind. I figured it out myself. It's not documented very well. From: jsch...@sbcglobal.net Sent: Thursday, June 9, 2022 11:17 AM To: 'python-list@python.org' Subject: cpython and python and visual studio 2019 I contacted Visual Studio 2019 support about this an

cpython and python and visual studio 2019

2022-06-09 Thread jschwar
I contacted Visual Studio 2019 support about this and they referred me to this site, but I'm not sure this is a bug or not (https://github.com/python/cpython/issues/new?assignees= <https://github.com/python/cpython/issues/new?assignees=&labels=type-bug&tem plate=bug.md> &l

Re: Cpython: when to incref before insertdict

2022-03-06 Thread Marco Sulla
PyDict_FromKeys() **does** > INCREF before calling insertdict, when key/value is borrowed > reference. > https://github.com/python/cpython/blob/6927632492cbad86a250aa006c1847e03b03e70b/Objects/dictobject.c#L2287-L2290 > https://github.com/python/cpython/blob/6927632492cbad86a250a

Re: Cpython: when to incref before insertdict

2022-03-05 Thread Inada Naoki
ference from its caller to the dict. merge_dict is very special and complex case. I assume you are talking about this part. https://github.com/python/cpython/blob/6927632492cbad86a250aa006c1847e03b03e70b/Objects/dictobject.c#L2885-L2912 In general, when reference is borrowed from a caller, the

Cpython: when to incref before insertdict

2022-03-05 Thread Marco Sulla
I noticed that some functions inside dictobject.c that call insertdict or PyDict_SetItem do an incref of key and value before the call, and a decref after it. An example is dict_merge. Other functions, such as _PyDict_FromKeys, don't do an incref before. When an incref of key and value is needed b

Re: CPython / Decimal and bit length of value.

2021-09-06 Thread jak
Il 03/09/2021 22:09, Nacnud Nac ha scritto: Hi, Is there a quick way to get the number of bits required to store the value in a Decimal class? What obvious thing am I missing? I'm working with really large integers, say, in the order of 5_000_000 of ASCII base 10 digits. It seems the function m

CPython / Decimal and bit length of value.

2021-09-04 Thread Nacnud Nac via Python-list
Hi, Is there a quick way to get the number of bits required to store the value in a Decimal class?  What obvious thing am I missing? I'm working with really large integers, say, in the order of 5_000_000 of ASCII base 10 digits.  It seems the function mpd_sizeinbase would be a nice thing to be ab

Re: [ANN] Austin -- CPython frame stack sampler v3.0.0 is now available

2021-07-02 Thread Martin Di Paola
netta wrote: I am delighted to announce the release 3.0.0 of Austin. If you haven't heard of Austin before, it is an open-source frame stack sampler for CPython, distributed under the GPLv3 license. It can be used to obtain statistical profiling data out of a running Python application withou

[ANN] Austin -- CPython frame stack sampler v3.0.0 is now available

2021-07-02 Thread Gabriele Tornetta
I am delighted to announce the release 3.0.0 of Austin. If you haven't heard of Austin before, it is an open-source frame stack sampler for CPython, distributed under the GPLv3 license. It can be used to obtain statistical profiling data out of a running Python application without a single

RE: How to build stable 3.9 branch from fork and clone of cpython

2021-05-19 Thread pjfarley3
> -Original Message- > From: Chris Angelico > Sent: Tuesday, May 18, 2021 3:01 AM > To: Python > Subject: Re: How to build stable 3.9 branch from fork and clone of cpython > > On Tue, May 18, 2021 at 4:33 PM wrote: > > > > I am following the "

Re: How to build stable 3.9 branch from fork and clone of cpython

2021-05-19 Thread Chris Angelico
On Wed, May 19, 2021 at 1:37 PM wrote: > > > -Original Message- > > From: Chris Angelico > > Sent: Tuesday, May 18, 2021 3:01 AM > > To: Python > > Subject: Re: How to build stable 3.9 branch from fork and clone of cpython > > > > On Tue, May

Re: How to build stable 3.9 branch from fork and clone of cpython

2021-05-18 Thread Terry Reedy
On 5/18/2021 3:00 AM, Chris Angelico wrote: On Tue, May 18, 2021 at 4:33 PM wrote: I am following the "Getting Started" section of the Python Developers Guide, but when I build the first version to verify everything builds, it builds branch 3.11. If I want to build and contribute to branch

Re: How to build stable 3.9 branch from fork and clone of cpython

2021-05-18 Thread Chris Angelico
On Tue, May 18, 2021 at 4:33 PM wrote: > > I am following the "Getting Started" section of the Python Developers Guide, > but when I build the first version to verify everything builds, it builds > branch 3.11. > > > > If I want to build and contribute to branch 3.9, how do I set that up > please?

How to build stable 3.9 branch from fork and clone of cpython

2021-05-17 Thread pjfarley3
I am following the "Getting Started" section of the Python Developers Guide, but when I build the first version to verify everything builds, it builds branch 3.11. If I want to build and contribute to branch 3.9, how do I set that up please? OS is Windows 10. I have, I believe, all the nec

[ANN] Austin -- CPython frame stack sampler v2.1.1 is now available

2021-01-12 Thread Gabriele Tornetta
I am delighted to announce the release 2.1.1 of Austin. If you haven't heard of Austin before, it is an open-source frame stack sampler for CPython, distributed under the GPLv3 license. It can be used to obtain statistical profiling data out of a running Python application without a single li

How to create a C Extension that uses CPython internals (outside limited API)?

2020-10-21 Thread Marco Sulla
I'm working on a C extension for frozendict. To make it working, I had to: 1. add by hand the whole path of dictobject.c (/home/marco/sources/cpython/Objects/dictobject.c) 2. add -DPy_BUILD_CORE 3. add the whole path of CPython includes (/home/marco/sources/cpython/Include and so on) This

[ANN] Austin -- CPython frame stack sampler v2.0.0 is now available

2020-10-13 Thread Gabriele
I am delighted to announce the release 2.0.0 of Austin. If you haven't heard of Austin before, it is an open source frame stack sampler for CPython, distributed under the GPLv3 license. It can be used to obtain statistical profiling data out of a running Python application without a s

[ANN] Austin -- Python frame stack sampler for CPython v1.0.1 is now available

2020-06-21 Thread Gabriele
I am delighted to announce the release 1.0.1 of Austin. If you haven't heard of Austin before, it is a frame stack sampler for CPython. It can be used to obtain statistical profiling data out of a running Python application without a single line of instrumentation. This means that you can

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-20 Thread R.Wieser
Dennis, > So... extract the original args, then build a new args object with your > added argument, then call your new function with that... I wanted to respond that prepending a string to an existing argument sounds quite a bit easier than what you are describing, but than I realized that I ju

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-20 Thread R.Wieser
Michael, > If you mentioned RPi.GPIO before, I apologize for my mistake. No I didn't, there is nothing to apologize for. > That's very helpful to know. I have no clue to why it would be, as my question has got *zero* to do with it - its valid for /any/ extension using t

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-20 Thread R.Wieser
Luciano, > Now that's a novel approach to asking for free help: pretending > to be smarter than the people who are trying to help you. What makes you think I'm /pretending/ ?*Ofcourse* I'm smarter than anyone on this earth, didn't you know ? :-D But I'll let you in on a secret: I'm rather a

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread DL Neil via Python-list
On 20/11/19 9:20 AM, Luciano Ramalho wrote: I apologize to all but the intended recipient for this. I’d have given him feedback in private if I knew his email. I will take leave from the list now. Keep up the good work, friendly responders. Please reconsider. Should your relationship with the

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread Michael Torrie
e but will get more people willing to respond who might know. > I did not find any example that showed me what I needed to know - simply one > CPython function calling another one.And yes, I've found multiple > documentation pages, including the "Extending and Embedding the Python

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread Luciano Ramalho
e should have been a dead giveaway by >> itself ... >> >> > We're working in the dark here >> >> Are you sure ? MRAB didn't seem to have too much problems with both >> recognising and understanding what I was busy with - he posted a spot-on >&

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread Luciano Ramalho
f ... > > > We're working in the dark here > > Are you sure ? MRAB didn't seem to have too much problems with both > recognising and understanding what I was busy with - he posted a spot-on > example, containing not more, but also not anything less than what I was > asking

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread R.Wieser
for. > Looking at existing examples, as well as the C API documentation I did not find any example that showed me what I needed to know - simply one CPython function calling another one.And yes, I've found multiple documentation pages, including the "Extending and Embedding the Py

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread Michael Torrie
On 11/19/19 9:00 AM, Michael Torrie wrote: > Sure but the Python methods themselves are exposed and accessible and > according to your previous posts, I meant to say the class methods defined by the C code. -- https://mail.python.org/mailman/listinfo/python-list

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread Michael Torrie
uld be visible and accessible from pure Python world. I can understand that the pure C stuff is not accessible of course. But the snippets you've shown so far don't show any of that. > And its just a syntax problem. I currently simply have not enough knowledge > about the CPyth

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread R.Wieser
MRAB, > It could be something like this: [snip example code] Thank you very much. Your "Call the other method" line shows me that I've been overthinking things. :-( After that I decided to see if I could give the "py_proc1" function two arguments, which worked. That means that the prepending

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread R.Wieser
Michael > Does this have to be done in the C API? As far as I can tell, yes. What I need to do is not exposed by the extension itself, meaning that a wrapper class can't get access to it either. And its just a syntax problem. I currently simply have not enough knowledge about the

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-18 Thread Michael Torrie
On 11/18/19 1:15 PM, R.Wieser wrote: > The thing is that the arguments of py_proc1 and py_proc2 are the same, but > for a single argument. Does this have to be done in the C API? Depending on how this class is used in your Python code, I would just create a new Python class that extends this cla

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-18 Thread MRAB
I think I already found how to append my argument to the "args" string-object). In other words, do you have any idea of what either of those calling methods should look like ? An example perhaps ? Having only encountered the CPython API two days ago I'm still fumbling in the dark

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-18 Thread R.Wieser
dy found how to append my argument to the "args" string-object). In other words, do you have any idea of what either of those calling methods should look like ? An example perhaps ? Having only encountered the CPython API two days ago I'm still fumbling in the dark I

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-18 Thread MRAB
On 2019-11-18 07:52, R.Wieser wrote: Hello all, I'm trying to edit a binary extension to Python, and have a situation where I would like to create method which adds a single argument, and than jumps to / calls another method. Like this: static PyObject *py_proc1(PyObject *self, PyObject *args)

Writing a CPython extension - calling another sibbling method ?

2019-11-17 Thread R.Wieser
Hello all, I'm trying to edit a binary extension to Python, and have a situation where I would like to create method which adds a single argument, and than jumps to / calls another method. Like this: static PyObject *py_proc1(PyObject *self, PyObject *args) { Py_RETURN_NONE } static Py

Re: [ANN] Austin -- CPython frame stack sampler v1.0.0 is now available

2019-10-21 Thread Gabriele
Austin computes the deltas of resident memory between samples. That's because resident memory is the closest to the actual space occupied in physical memory. I hope this answers your question! Best, G On Mon, 21 Oct 2019, 22:37 Barry, wrote: > > > > On 20 Oct 2019, at 23:12, Gabriele wrote: >

Re: [ANN] Austin -- CPython frame stack sampler v1.0.0 is now available

2019-10-21 Thread Barry
> On 20 Oct 2019, at 23:12, Gabriele wrote: > > The > latest release introduces a memory profiling mode which allows you to > profile memory usage. I am curious how do you determine used memory for Python Program? What is you definition of “memory”? The reason I am asking is that I have loo

[ANN] Austin -- CPython frame stack sampler v1.0.0 is now available

2019-10-20 Thread Gabriele
I am delighted to announce the release 1.0.0 of Austin. If you haven't heard of Austin before, it is a frame stack sampler for CPython. It can be used to obtain statistical profiling data out of a running Python application without a single line of instrumentation. This means that you

Re: fopen() and open() in cpython

2019-08-14 Thread Windson Yang
Thank you so much for the answer, now it makes sense :D eryk sun 于2019年8月15日周四 上午12:27写道: > On 8/13/19, Windson Yang wrote: > > After my investigation, I found Since Python maintains its own buffer > when > > read/write files, the build-in python open() function will call the > open() > > syste

Re: fopen() and open() in cpython

2019-08-14 Thread eryk sun
On 8/13/19, Windson Yang wrote: > After my investigation, I found Since Python maintains its own buffer when > read/write files, the build-in python open() function will call the open() > system call instead of calling standard io fopen() for caching. So when we > read/write a file in Python, it

  1   2   3   4   5   6   7   >