[RELEASE] Python 3.13.0 (final) released

2024-10-07 Thread Thomas Wouters via Python-list
Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation <https://www.python.org/psf-landing/>. Choo-choo from the release train, Your release team, Thomas Wouters Ned Deily Steve Dower Łukasz Langa -- https://mail.python.org/mailman/listinfo/python-list

Re: Beazley's Problem

2024-10-06 Thread Antoon Pardon via Python-list
Op 23/09/2024 om 09:44 schreef Annada Behera via Python-list: The "next-level math trick" Newton-Raphson has nothing to do with functional programming. I have written solvers in purely iterative style. What is your point. Any problem solved in a functional style can also be solved

Re: Best Practice Virtual Environment

2024-10-06 Thread transreductionist via Python-list
hey have their environment with the proper dependencies. > > On Sun, Oct 6, 2024, 09:47 Karsten Hilbert via Python-list < > python-list@python.org> wrote: > >> Am Sun, Oct 06, 2024 at 12:21:09AM +0200 schrieb Karsten Hilbert via >> Python-list: >> >>

Re: Best Practice Virtual Environment

2024-10-06 Thread transreductionist via Python-list
are scripts for poetry lock, poetry install, and whatever else is needed. A user pulls down the repository and runs 1. poetry lock 2. poetry install And they have their environment with the proper dependencies. On Sun, Oct 6, 2024, 09:47 Karsten Hilbert via Python-list < python-list@python.

Re: Best Practice Virtual Environment

2024-10-06 Thread Karsten Hilbert via Python-list
Am Sun, Oct 06, 2024 at 12:21:09AM +0200 schrieb Karsten Hilbert via Python-list: > Am Sat, Oct 05, 2024 at 10:27:33PM +0200 schrieb Ulrich Goebel via > Python-list: > > > Debian (or even Python3 itself) doesn't allow to pip install required > > packages system wide

Re: Best Practice Virtual Environment

2024-10-05 Thread Karsten Hilbert via Python-list
Am Sat, Oct 05, 2024 at 10:27:33PM +0200 schrieb Ulrich Goebel via Python-list: > Debian (or even Python3 itself) doesn't allow to pip install required > packages system wide, so I have to use virtual environments even there. But > is it right, that I have to do that for eve

Re: Best Practice Virtual Environment

2024-10-05 Thread Thomas Passin via Python-list
On 10/5/2024 4:27 PM, Ulrich Goebel via Python-list wrote: Hi, I learned to use virtual environments where ever possible, and I learned to pip install the required packages there. That works quite nice at home. Now I come to deploy a Python script on a debian linux server, making it usable

Re: Best Practice Virtual Environment

2024-10-05 Thread Cameron Simpson via Python-list
Just make a shared virtualenv, eg in /usr/local or /opt somewhere. Have the script commence with: #!/path/to/the/shred/venv/bin/python and make it readable and executable. Problem solved. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Best Practice Virtual Environment

2024-10-05 Thread Ulrich Goebel via Python-list
n.org/mailman/listinfo/python-list

How to check whether lip movement is significant using face landmarks in dlib?

2024-10-05 Thread marc nicole via Python-list
an aspect ratio for the lips to conclude they are moving significantly? Is the mentioned function able to tell whether the lips are significantly moving while the mouth is closed? -- https://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] How to stop a specific thread in Python 2.7?

2024-10-03 Thread Cameron Simpson via Python-list
reexisting Event may be supplied. Return a 2-tuple of `(T,E)`. ''' if E is None: E = Event() T = Thread(target=target, args=[E, *a], kwargs=kw) return T, E Something along those lines. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] How to stop a specific thread in Python 2.7?

2024-10-03 Thread Dan Ciprus (dciprus) via Python-list
I'd be interested too :-). On Thu, Sep 26, 2024 at 03:34:05AM GMT, marc nicole via Python-list wrote: Could you show a python code example of this? On Thu, 26 Sept 2024, 03:08 Cameron Simpson, wrote: On 25Sep2024 22:56, marc nicole wrote: >How to create a per-thread event in Py

Re: Python crash together with threads

2024-10-03 Thread Left Right via Python-list
red pool. The description of _PyThreadState_GET states that callers must hold GIL. Does your code do that? It's not possible to divine that from the stack trace, but you'd probably know that. On Wed, Oct 2, 2024 at 3:29 PM Guenther Sohler via Python-list wrote: > > My Software

doRe: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-03 Thread Greg Ewing via Python-list
er in that respect. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-02 Thread Ethan Furman via Python-list
This thread is derailing. Please consider it closed. -- ~Ethan~ Moderator -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-02 Thread Left Right via Python-list
that there's no way to tell if my notion of streaming is correct or not. But, for the future reference: my notion of streaming is correct, and you would do better learning some materials about it before jumping to conclusions. -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-02 Thread Left Right via Python-list
P packet is all you can parse. You're playing shenanigans > with words the way Humpty Dumpty does. IP packets are not sequences, > they are individuals. > > ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Python crash together with threads

2024-10-02 Thread Louis Krupp via Python-list
rates the problem? Louis -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-02 Thread Chris Angelico via Python-list
s of > symbols of the alphabet of fixed length. This is, essentially, like > saying that the words themselves are regular. One single IP packet is all you can parse. You're playing shenanigans with words the way Humpty Dumpty does. IP packets are not sequences, they are individuals. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-02 Thread Chris Angelico via Python-list
On Wed, 2 Oct 2024 at 23:53, Left Right via Python-list wrote: > In the same email you replied to, I gave examples of languages for > which parsers can be streaming (in general): SCSI or IP. You can't validate an IP packet without having all of it. Your notion of "streaming

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-02 Thread Left Right via Python-list
#x27;d typically study in automata theory class. Well, not exactly in the very same words, but you should be able to figure this stuff out if you had that class. -- https://mail.python.org/mailman/listinfo/python-list

Python crash together with threads

2024-10-02 Thread Guenther Sohler via Python-list
_Py_EnsureTstateNotNULL(tstate); #endif # <<--- suspect state is nullpointer return tstate->interp; } any clues , whats going on here, and how I can mitigate that ? -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Greg Ewing via Python-list
ad of collecting the whole list first. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Dan Sommers via Python-list
r overflowing. And yet somehow, the universe never collapsed. If you believe that some implementation of fsync fails to meet a specification, or fails to work correctly on files containign JSON, then file a bug report. -- https://mail.python.org/mailman/listinfo/python-list

RE: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread AVI GROSS via Python-list
am results. If I only want info on records about company X between July 1 and September 15 of a particular year and only if the amount paid remains zero or is less than the amount owed, ... -Original Message----- From: Python-list On Behalf Of Greg Ewing via Python-list Sent: Tuesday, October

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Greg Ewing via Python-list
t has nothing to do with the protocol. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Greg Ewing via Python-list
written little endian instead of big endian, but the same argument applies either way. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Left Right via Python-list
to sync _everything_ (and it hurts!) On Tue, Oct 1, 2024 at 5:49 PM Dan Sommers via Python-list wrote: > > On 2024-09-30 at 21:34:07 +0200, > Regarding "Re: Help with Streaming and Chunk Processing for Large JSON Data > (60 GB) from Kenna API," > Left Right via Python-lis

[RELEASE] Python 3.13.0rc3 and 3.12.7 released.

2024-10-01 Thread Thomas Wouters via Python-list
to the Python Software Foundation. Regards from a positively *melting* Menlo Park for some reason <https://social.coop/@Yhg1s/113051321976759729>this time, Your release team, Thomas Wouters Łukasz Langa Ned Deily Steve Dower -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Dan Sommers via Python-list
On 2024-09-30 at 21:34:07 +0200, Regarding "Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API," Left Right via Python-list wrote: > > What am I missing? Handwavingly, start with the first digit, and as > > long as the next character

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Dan Sommers via Python-list
On 2024-09-30 at 18:48:02 -0700, Keith Thompson via Python-list wrote: > 2qdxy4rzwzuui...@potatochowder.com writes: > [...] > > In Common Lisp, you can write integers as #nnR[digits], where nn is the > > decimal representation of the base (possibly without a leading zero), &

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Left Right via Python-list
igned to be streamed. So, that's not a > problem (in principle), but you would need to have a streaming GZip > parser, quick search in PyPI revealed this package: > https://pypi.org/project/gzip-stream/ . > > On Mon, Sep 30, 2024 at 6:20 PM Thomas Passin via Python-list > wro

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Keith Thompson via Python-list
ase. So the input #16f is read as the integer 65535. Typo: You meant #16R, not #16f. -- Keith Thompson (The_Other_Keith) keith.s.thompso...@gmail.com void Void(void) { Void(); } /* The recursive call of the void */ -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Dan Sommers via Python-list
On 2024-10-01 at 09:09:07 +1000, Chris Angelico via Python-list wrote: > On Tue, 1 Oct 2024 at 08:56, Grant Edwards via Python-list > wrote: > > > > On 2024-09-30, Dan Sommers via Python-list wrote: > > > > > In Common Lisp, integers can be written in any inte

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Chris Angelico via Python-list
On Tue, 1 Oct 2024 at 08:56, Grant Edwards via Python-list wrote: > > On 2024-09-30, Dan Sommers via Python-list wrote: > > > In Common Lisp, integers can be written in any integer base from two > > to thirty six, inclusive. So knowing the last digit doesn't tell >

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Grant Edwards via Python-list
On 2024-09-30, Dan Sommers via Python-list wrote: > In Common Lisp, integers can be written in any integer base from two > to thirty six, inclusive. So knowing the last digit doesn't tell > you whether an integer is even or odd until you know the base > anyway. I had to think

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Dan Sommers via Python-list
On 2024-10-01 at 04:46:35 +1000, Chris Angelico via Python-list wrote: > On Tue, 1 Oct 2024 at 04:30, Dan Sommers via Python-list > wrote: > > > > But why do I need to start with the least > > significant digit? > > If you start from the most significant, you d

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Thomas Passin via Python-list
On 9/30/2024 11:30 AM, Barry via Python-list wrote: On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list wrote: import polars as pl pl.read_json("file.json") This is not going to work unless the computer has a lot more the 60GiB of RAM. As later suggested a

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Left Right via Python-list
ould need to have a streaming GZip parser, quick search in PyPI revealed this package: https://pypi.org/project/gzip-stream/ . On Mon, Sep 30, 2024 at 6:20 PM Thomas Passin via Python-list wrote: > > On 9/30/2024 11:30 AM, Barry via Python-list wrote: > > > > > >> On 30 Se

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Thomas Passin via Python-list
On 9/30/2024 1:00 PM, Chris Angelico via Python-list wrote: On Tue, 1 Oct 2024 at 02:20, Thomas Passin via Python-list wrote: On 9/30/2024 11:30 AM, Barry via Python-list wrote: On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list wrote: import polars as pl pl.read_json

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Chris Angelico via Python-list
On Tue, 1 Oct 2024 at 04:30, Dan Sommers via Python-list wrote: > > But why do I need to start with the least > significant digit? If you start from the most significant, you don't know anything about the number until you finish parsing it. There's almost nothing you can say a

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Grant Edwards via Python-list
On 2024-09-30, Dan Sommers via Python-list wrote: > On 2024-09-30 at 11:44:50 -0400, > Grant Edwards via Python-list wrote: > >> On 2024-09-30, Left Right via Python-list wrote: >> > [...] >> > Imagine a pathological case of this shape: 1... <60GB of digits&g

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Dan Sommers via Python-list
On 2024-09-30 at 11:44:50 -0400, Grant Edwards via Python-list wrote: > On 2024-09-30, Left Right via Python-list wrote: > > Whether and to what degree you can stream JSON depends on JSON > > structure. In general, however, JSON cannot be streamed (but commonly > > it can b

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Chris Angelico via Python-list
On Tue, 1 Oct 2024 at 02:20, Thomas Passin via Python-list wrote: > > On 9/30/2024 11:30 AM, Barry via Python-list wrote: > > > > > >> On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list > >> wrote: > >> > >>

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Thomas Passin via Python-list
On 9/30/2024 11:30 AM, Barry via Python-list wrote: On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list wrote: import polars as pl pl.read_json("file.json") This is not going to work unless the computer has a lot more the 60GiB of RAM. As later suggested a

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Grant Edwards via Python-list
On 2024-09-30, Left Right via Python-list wrote: > Whether and to what degree you can stream JSON depends on JSON > structure. In general, however, JSON cannot be streamed (but commonly > it can be). > > Imagine a pathological case of this shape: 1... <60GB of digits>. Th

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Barry via Python-list
> On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list > wrote: > > > import polars as pl > pl.read_json("file.json") > > This is not going to work unless the computer has a lot more the 60GiB of RAM. As later suggested a streaming pars

ANN: Python Meeting Düsseldorf - 02.10.2024

2024-09-30 Thread eGenix Team via Python-list
h time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Left Right via Python-list
4 at 8:44 AM Asif Ali Hirekumbi via Python-list wrote: > > Thanks Abdur Rahmaan. > I will give it a try ! > > Thanks > Asif > > On Mon, Sep 30, 2024 at 11:19 AM Abdur-Rahmaan Janhangeer < > arj.pyt...@gmail.com> wrote: > > > Idk if you tried Polars, but i

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-29 Thread Asif Ali Hirekumbi via Python-list
> > Kind Regards, > > Abdur-Rahmaan Janhangeer > about <https://compileralchemy.github.io/> | blog > <https://www.pythonkitchen.com> > github <https://github.com/Abdur-RahmaanJ> > Mauritius > > > On Mon, Sep 30, 2024 at 8:00 AM Asif Ali Hireku

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-29 Thread Abdur-Rahmaan Janhangeer via Python-list
maanJ> Mauritius On Mon, Sep 30, 2024 at 8:00 AM Asif Ali Hirekumbi via Python-list < python-list@python.org> wrote: > Dear Python Experts, > > I am working with the Kenna Application's API to retrieve vulnerability > data. The API endpoint provides a single, massive JSON

Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-29 Thread Asif Ali Hirekumbi via Python-list
ilar use cases or can offer any advice, it would be greatly appreciated. Thank you in advance for your help! Best regards Asif Ali -- https://mail.python.org/mailman/listinfo/python-list

Re: How to stop a specific thread in Python 2.7?

2024-09-26 Thread Left Right via Python-list
just the design of threads. On Wed, Sep 25, 2024 at 7:26 PM marc nicole via Python-list wrote: > > Hello guys, > > I want to know how to kill a specific running thread (say by its id) > > for now I run and kill a thread like the following: > # start thread > thread1 = threading

Re: [Tutor] How to stop a specific thread in Python 2.7?

2024-09-25 Thread marc nicole via Python-list
ion and keep it to hand for your use outside the thread. > ___ > Tutor maillist - tu...@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > -- https://mail.python.org/mailman/listinfo/python-list

Re: How to stop a specific thread in Python 2.7?

2024-09-25 Thread Cameron Simpson via Python-list
On 25Sep2024 22:56, marc nicole wrote: How to create a per-thread event in Python 2.7? Every time you make a Thread, make an Event. Pass it to the thread worker function and keep it to hand for your use outside the thread. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to stop a specific thread in Python 2.7?

2024-09-25 Thread marc nicole via Python-list
How to create a per-thread event in Python 2.7? On Wed, 25 Sept 2024, 22:47 Cameron Simpson via Python-list, < python-list@python.org> wrote: > On 25Sep2024 19:24, marc nicole wrote: > >I want to know how to kill a specific running thread (say by its id) > > > >for

Re: How to stop a specific thread in Python 2.7?

2024-09-25 Thread Cameron Simpson via Python-list
if it becomes set. You just need a per-thred vent instead of a single Event for all the threads. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

How to stop a specific thread in Python 2.7?

2024-09-25 Thread marc nicole via Python-list
() event_thread1.set() I know that set() will kill all running threads, but if there was thread2 as well and I want to kill only thread1? Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: Beazley's Problem

2024-09-24 Thread Annada Behera via Python-list
omputation graph which takes space but is faster. For function: f:R^m->R, they can run in O(m^0)=O(1) time and vice versa ( O(m) time for f:R->R^m ). Almost all neural network training these days use reverse-mode autodiff. -- https://mail.python.org/mailman/listinfo/python-list

Re: Beazley's Problem

2024-09-23 Thread Annada Behera via Python-list
ou bust out those "next-level math tricks" >   with just a single line each! You might like: https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf The numerics stuff starts on page 9. -- https://mail.python.org/mailman/listinfo/python-list

Re: Common objects for CLI commands with Typer

2024-09-23 Thread Dan Sommers via Python-list
On 2024-09-23 at 19:00:10 +0100, Barry Scott wrote: > > On 21 Sep 2024, at 11:40, Dan Sommers via Python-list > > wrote: > But once your code gets big the disciple of using classes helps > maintenance. Code with lots of globals is problematic. Even before your code gets big

Re: Common objects for CLI commands with Typer

2024-09-23 Thread Barry Scott via Python-list
> On 21 Sep 2024, at 11:40, Dan Sommers via Python-list > wrote: > > Despite the fact that "everything is an object" in Python, you don't > have to put data or functions inside classes or objects. I also know > nothing about Typer, but there's noth

Re: Common objects for CLI commands with Typer

2024-09-21 Thread Dan Sommers via Python-list
On 2024-09-21 at 06:38:05 +0100, Barry via Python-list wrote: > > On 20 Sep 2024, at 21:01, Loris Bennett via Python-list > > wrote: > > > > Hi, > > > > Apologies if the following description is to brief - I can expand if no > > one knows what I&#x

Re: Common objects for CLI commands with Typer

2024-09-20 Thread Barry via Python-list
> On 20 Sep 2024, at 21:01, Loris Bennett via Python-list > wrote: > > Hi, > > Apologies if the following description is to brief - I can expand if no > one knows what I'm on about, but maybe a short description is enough. > > I am developing a command lin

Re: Bug in 3.12.5

2024-09-20 Thread Keith Thompson via Python-list
ith.s.thompso...@gmail.com void Void(void) { Void(); } /* The recursive call of the void */ -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug in 3.12.5

2024-09-20 Thread Cameron Simpson via Python-list
On 20Sep2024 12:52, Martin Nilsson wrote: The attached program doesn’t work in 3.12.5, but in 3.9 it worked. This mailing list discards attachments. Please include your code inline in the message text. Thanks, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: Trouble with mocking

2024-09-20 Thread Mark Bourne via Python-list
n2_to_mock` won't call `function1_to_mock` (or its mock) regardless of whether `function1_to_mock` has been patched, unless you set the mock of `function2_to_mock` to do so. You don't necessarily need to patch `function1_to_mock`, unless of course there are other calls to it that you need to mock. -- Mark. -- https://mail.python.org/mailman/listinfo/python-list

Bug in 3.12.5

2024-09-20 Thread Martin Nilsson via Python-list
Dear Sirs ! The attached program doesn’t work in 3.12.5, but in 3.9 it worked. Best Regards Martin Nilsson -- https://mail.python.org/mailman/listinfo/python-list

Common objects for CLI commands with Typer

2024-09-20 Thread Loris Bennett via Python-list
under constuction. -- https://mail.python.org/mailman/listinfo/python-list

ANN: A new version (0.5.3) of python-gnupg has been released.

2024-09-20 Thread Vinay Sajip via Python-list
GnuPG -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.8 or later on Debian?

2024-09-19 Thread Mats Wichmann via Python-list
On 9/18/24 08:49, Ulrich Goebel via Python-list wrote: Hi, Debian Linux seems to love Python 3.7 - that is shown by apt-get list, and it's installed on my Debian Server. But I need at least Python 3.8 Is there a repository which I can give to apt to get Python 3.8 or later? Or do I r

Re: Python 3.8 or later on Debian?

2024-09-18 Thread Thomas Passin via Python-list
On 9/18/2024 10:49 AM, Ulrich Goebel via Python-list wrote: Hi, Debian Linux seems to love Python 3.7 - that is shown by apt-get list, and it's installed on my Debian Server. But I need at least Python 3.8 Is there a repository which I can give to apt to get Python 3.8 or later? Or

Re: Python 3.8 or later on Debian?

2024-09-18 Thread dn via Python-list
On 19/09/24 02:49, Ulrich Goebel via Python-list wrote: Hi, Debian Linux seems to love Python 3.7 - that is shown by apt-get list, and it's installed on my Debian Server. But I need at least Python 3.8 Is there a repository which I can give to apt to get Python 3.8 or later? Or do I r

Re: Python 3.8 or later on Debian?

2024-09-18 Thread Alexander Neilson via Python-list
the past I did build newer Python versions (mostly on raspberry pi’s) Regards Alexander Alexander Neilson Neilson Productions Limited 021 329 681 alexan...@neilson.net.nz > On 19 Sep 2024, at 10:42, Ulrich Goebel via Python-list > wrote: > > Hi, > > Debian Linux seems

Python 3.8 or later on Debian?

2024-09-18 Thread Ulrich Goebel via Python-list
? I'm not a friend of things so deep in the system... Greetings Ulrich -- Ulrich Goebel -- https://mail.python.org/mailman/listinfo/python-list

Re: Synchronise annotations -> docstring

2024-09-15 Thread AJ via Python-list
Sphinx. I like Markdown better than restructuredText, though. -- https://mail.python.org/mailman/listinfo/python-list

Re: PyBitmessage is not dead. Ignore the FUD.

2024-09-12 Thread Andy Burns via Python-list
711 Spooky Mart wrote: PyBitmessage is not dead. https://bitmessage.org It may help with looking "not dead" to have a changelog that has actually changed within the last 8 years? -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-11 Thread Jon Ribbens via Python-list
case of an exception is completely > unnecessary: the DBMS will take care of that for you. No, it won't. -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-10 Thread Jon Ribbens via Python-list
n mind. So > any partial transaction data saved on persistent storage that remains > after a system crash can be identified as such and discarded, leaving the > database in its pre-transaction state. Yes, nobody's disputing that. A good database will do what you tell it, and keep the data you give it. But what if you tell it the wrong thing or give it the wrong data? It's like, for example, a RAID array will save you from a faulty disk, but will not save you from the software writing incorrect data, which the RAID array will then faithfully copy across to all the disks overwriting the good data. -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-10 Thread Jon Ribbens via Python-list
On 2024-09-10, Karsten Hilbert wrote: > Am Tue, Sep 10, 2024 at 08:38:30AM - schrieb Jon Ribbens via Python-list: >> Ok. So we've moved away from "In any DBMS worth its salt, rollback is >> something that happens automatically" > > Nope. The original pos

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-10 Thread Karsten Hilbert via Python-list
Am Tue, Sep 10, 2024 at 08:38:30AM - schrieb Jon Ribbens via Python-list: > Ok. So we've moved away from "In any DBMS worth its salt, rollback is > something that happens automatically" Nope. The original post asked something entirely different. > and now you'

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-10 Thread Jon Ribbens via Python-list
S worth its salt, rollback is something that happens automatically" and now you're saying it isn't automatic after all, "you write code to do it". That was my point. The database provides the tools, but it isn't psychic. -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-09 Thread Jon Ribbens via Python-list
>> So the Python code is half-way through a transaction when it throws a >> (non-database-related) exception and that thread of execution is >> aborted. The database connection returns to the pool ... > > The DBMS connection is deleted. How does that happen then? -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-09 Thread Jon Ribbens via Python-list
On 2024-09-09, Karsten Hilbert wrote: > Am Mon, Sep 09, 2024 at 10:00:11AM - schrieb Jon Ribbens via Python-list: >> So the Python code is half-way through a transaction when it throws >> a (non-database-related) exception and that thread of execution is >> aborted. Th

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-09 Thread Karsten Hilbert via Python-list
Am Mon, Sep 09, 2024 at 10:00:11AM - schrieb Jon Ribbens via Python-list: > So the Python code is half-way through a transaction when it throws > a (non-database-related) exception and that thread of execution is > aborted. The database connection returns to the pool, How does it

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-09 Thread Karsten Hilbert via Python-list
Am Mon, Sep 09, 2024 at 10:00:11AM - schrieb Jon Ribbens via Python-list: > > The database only needs to commit when it is explicitly told. Anything > > less -- no commit. > > So the Python code is half-way through a transaction when it throws > a (non-database-relate

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-09 Thread Jon Ribbens via Python-list
uding a program or > system crash. If it's a program or system crash, sure, but anything less than that - how would the database even know, unless the program told it? -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

2024-09-09 Thread Jon Ribbens via Python-list
(non-database-related) exception and that thread of execution is aborted. The database connection returns to the pool, and is re-used by another thread which continues using it to perform a different sequence of operations ... ending in a COMMIT, which commits one-and-a-half transactions. -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-09 Thread Jon Ribbens via Python-list
back if it is interrupted for any reason. What if there's an exception in your exception handler? I'd put the rollback in the 'finally' handler, so it's always called. If you've already called 'commit' then the rollback does nothing of course. -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-09 Thread Karsten Hilbert via Python-list
Am Mon, Sep 09, 2024 at 01:48:32PM +1200 schrieb Greg Ewing via Python-list: > That code doesn't inspire much confidence in me. It's far too > convoluted with too much micro-management of exceptions. It is catching two exceptions, re-raising both of them, except for re-raisin

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-09 Thread Karsten Hilbert via Python-list
Am Mon, Sep 09, 2024 at 01:48:32PM +1200 schrieb Greg Ewing via Python-list: > That code doesn't inspire much confidence in me. It's far too > convoluted with too much micro-management of exceptions. > > I would much prefer to have just *one* place where exceptions are >

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Greg Ewing via Python-list
tions are caught and logged. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Greg Ewing via Python-list
o it's always called. Good point. Putting the rollback first would be safer/ -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Karsten Hilbert via Python-list
Am Sun, Sep 08, 2024 at 02:58:03PM +0100 schrieb Rob Cliffe via Python-list: > >Ugly: > > > > try: > > do something > > except: > > log something > > finally: > > try: > >

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Rob Cliffe via Python-list
On 07/09/2024 22:20, Karsten Hilbert via Python-list wrote: Am Sat, Sep 07, 2024 at 02:09:28PM -0700 schrieb Adrian Klaver: Right, and this was suggested elsewhere ;) And, yeah, the actual code is much more involved :-D I see that. The question is does the full code you show fail? The

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Karsten Hilbert via Python-list
Am Sun, Sep 08, 2024 at 12:48:50PM +1200 schrieb Greg Ewing via Python-list: > On 8/09/24 9:20 am, Karsten Hilbert wrote: > > try: > > do something > > except: > > log something > > finally: > > .commit(

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Karsten Hilbert via Python-list
Am Sun, Sep 08, 2024 at 12:48:50PM +1200 schrieb Greg Ewing via Python-list: > On 8/09/24 9:20 am, Karsten Hilbert wrote: > > try: > > do something > > except: > > log something > > finally: > > .commit(

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-07 Thread Greg Ewing via Python-list
.rollback() Doing an explicit rollback ensures that the transaction is always rolled back if it is interrupted for any reason. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-07 Thread Karsten Hilbert via Python-list
ept: block. Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-07 Thread Karsten Hilbert via Python-list
gmLog2.log_stack_trace() __safely_close_cursor_and_rollback_close_conn ( curs_close, tx_rollback, conn_close ) raise if get_col_idx: col_idx = get_col_indices(curs) curs_close() tx_commit() conn_close() return (data, col_idx) # Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >