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
> whereas I am quite sure that program flows do not overlap. You can never be sure of this in Python. Virtually all objects in Python are allocated on heap, so instantiating integers, doing simple arithmetic etc. -- all of this requires synchronization because it will allocate memory for a sha

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
On 10/2/2024 7:26 AM, Guenther Sohler wrote: My Software project is working fine in most of the cases (www.pythonscad.org) however I am right now isolating a scenario, which makes it crash permanently. It does not happen with Python 3.11.6 (and possibly below), it happens with 3.12 and above

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
My Software project is working fine in most of the cases (www.pythonscad.org) however I am right now isolating a scenario, which makes it crash permanently. It does not happen with Python 3.11.6 (and possibly below), it happens with 3.12 and above It does not happen when not using Threads

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
generators to give you as many primes as you want, and no more. So, if you can store arbitrary python code as part of your JSON, you can send quite a bit of somewhat compressed data. The real problem is how the JSON is set up. If you take umpteen data structures and wrap them all in something like

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
This is not the release you’re looking for… (unless you’re looking for 3.12.7.) Because no plan survives contact with reality, instead of the actual Python 3.13.0 release we have a new Python 3.13 release candidate today. Python 3.13.0rc3 rolls back the incremental cyclic garbage collector (GC

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
/This announcement is in German since it targets a local user group//meeting in Düsseldorf, Germany/ Ankündigung Python Meeting Düsseldorf - Oktober 2024 <https://www.egenix.com/company/news/Python-Meeting-Duesseldorf-2024-10-02> Ein Treffen von Python Enthusiast

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
Dear Python Experts, I am working with the Kenna Application's API to retrieve vulnerability data. The API endpoint provides a single, massive JSON file in gzip format, approximately 60 GB in size. Handling such a large dataset in one go is proving to be quite challenging, especially in ter

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

2024-09-26 Thread Left Right via Python-list
y) modify the shared state observed by other threads in such a way that it becomes unusable to other threads. So... if you want to kill a thread, I'm sorry to say this: you will have to bring down the whole process, there's really no other way, and that's not Python-specific, this is

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

2024-09-25 Thread marc nicole via Python-list
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 Python 2.7? > > Every time you make a Thread, make an Event. Pass it to the thread > worker funct

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
other points via this group). Enjoy! Cheers Vinay Sajip [1] https://github.com/vsajip/python-gnupg [2] https://pypi.org/project/python-gnupg/0.5.3 [3] https://github.com/vsajip/python-gnupg/issues [4] https://github.com/vsajip/python-gnupg/releases/ [5] python-gnupg - A Python wrapper for

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
Python 3.7 is part of Buster (Debian old old stable) If you moved to Debian bullseye you would get offered 3.9 (old stable) Currently the stable version (Bookworm) would give you 3.11 I am not aware of anyone maintaining a repo for old Debian versions to get newer Python versions. But I know in

Python 3.8 or later on Debian?

2024-09-18 Thread Ulrich Goebel via Python-list
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 really have to install and compile these versions manually

Re: Synchronise annotations -> docstring

2024-09-15 Thread AJ via Python-list
On 9/4/24 00:21, r...@zedat.fu-berlin.de wrote: Albert-Jan Roskam wrote or quoted: Are there any tools that check whether type annotations and Numpydoc strings are consistent? According to one webpage, the "sphinx-autodoc-typehints" extension lets you roll with Python 3 annot

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
On 2024-09-09, Lawrence D'Oliveiro wrote: >>>>> >>>>> On Mon, 9 Sep 2024 10:00:11 - (UTC), Jon Ribbens wrote: >>>>>> >>>>>> On 2024-09-09, Lawrence D'Oliveiro wrote: >>>>>>> >>>>>

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
eiro wrote: >>>>> 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-related) exception

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

2024-09-09 Thread Jon Ribbens via Python-list
On 2024-09-09, Lawrence D'Oliveiro wrote: > On Mon, 9 Sep 2024 10:00:11 - (UTC), Jon Ribbens wrote: >> On 2024-09-09, Lawrence D'Oliveiro wrote: >>> The database only needs to commit when it is explicitly told. Anything >>> less -- no commit. >>

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
m crash, sure, but anything less than that - >> how would the database even know, unless the program told it? > > 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

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

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

2024-09-07 Thread Karsten Hilbert via Python-list
about the SQL itself succeeded but then the COMMIT failed due to serialization. I was wondering about where to best place any needed conn.commit(). My knee-jerk reaction was to then put it last in the try: block... All this is probably more related to Python than to PostgreSQL. Thanks, 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 Rob Cliffe via Python-list
On 07/09/2024 16:48, Karsten Hilbert via Python-list wrote: Dear all, unto now I had been thinking this is a wise idiom (in code that needs not care whether it fails to do what it tries to do^1): conn = psycopg2.connection(...) curs = conn.cursor() try

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

2024-09-07 Thread Karsten Hilbert via Python-list
TIP: The transaction might succeed if retried. 2024-08-20 22:17:04 DEBUG gm.logging[140274459512896 MainThread] (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace() #178): with_traceback: -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 3.13.0RC2, 3.12.6, 3.11.10, 3.10.15, 3.9.20, and 3.8.20 are now available!

2024-09-07 Thread Łukasz Langa via Python-list
Hi there! A big joint release today. Mostly security fixes but we also have the final release candidate of 3.13 so let’s start with that! Python 3.13.0RC2 Final opportunity to test and find any show-stopper bugs before we bless and release 3.13.0 final on October 1st. Get it here: Python

Re: Python3 Fork of BMWrapper

2024-09-06 Thread Schimon Jehudah via Python-list
Good day, 711 Spooky Mart! Did you consider to add support for IRC or XMPP too? Best regards, Schimon On Thu, 5 Sep 2024 04:47:39 - 711 Spooky Mart via Python-list wrote: > from https://github.com/kashikoibumi/bmwrapper > > bmwrapper is a poorly hacked together python scri

Re: PyBitmessage is not dead. Ignore the FUD.

2024-09-06 Thread Schimon Jehudah via Python-list
Greetings! I am interested in adding support for Bitmessage to Slixfeed news bot. Support is currently provided to XMPP and it will be extended to Email, IRC and Session. https://git.xmpp-it.net/sch/Slixfeed Schimon On Thu, 5 Sep 2024 04:40:10 - 711 Spooky Mart via Python-list wrote

Re: BitChan (python project)

2024-09-06 Thread Schimon Jehudah via Python-list
Greetings, 711! This is very good! Do you know of Plebbit? It might be good to interoperate with Plebbit too. https://plebbit.com/ Kind regards, Schimon On Thu, 5 Sep 2024 04:53:05 - 711 Spooky Mart via Python-list wrote: > from https://github.com/813492291816/BitChan > > B

Re: Unofficial PyBitmessage port to run with Python3 and PyQt5

2024-09-06 Thread Schimon Jehudah via Python-list
Good day, 711 Spooky Mart! Congratulations and thank you for investing efforts to enhance PyBitmessage, as it is an important telecommunication mean . I use Arch Linux, and I would be happy to help you to test. I have several tasks with Python, mostly on XMPP, so I am not sure I would be

BitChan (python project)

2024-09-05 Thread 711 Spooky Mart via Python-list
rt Channel ─┗━━┓─┃──┗┓─┃───┗┓─┃──[chan] 711 ┃─┃──┏┛─┗┓──┏┛─┗┓─always open | stay spooky ┗━┛──┗━━━┛──┗━━━┛─https://bitmessage.org -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >