On 2024-07-31, marc nicole via Python-list wrote:
> I suppose the meaning of those numbers comes from this line
> predicts_dict[class_name].append([int(xmin), int(ymin), int(xmax),
> int(ymax), P[index]]) as well as the yolo inference call. But i was
> expecting zeros for all cl
You invitation to read on machine is not helping, if you wanna enlighten us
on this specific case otherwise pls spare me such comments which i know
On Wed, 31 Jul 2024, 16:00 Grant Edwards via Python-list, <
[email protected]> wrote:
> On 2024-07-31, marc nicole via Python-li
Python 3.13 *release candidate 1* is now available.
https://www.python.org/downloads/release/python-3130rc1/
<https://discuss.python.org/t/python-3-13-0-release-candidate-1-released/59703#p-181511-this-is-the-first-release-candidate-of-python-3130-1>This
is the first release candidate of
> On 30 Jul 2024, at 18:36, Schimon Jehudah via Python-list
> wrote:
>
> Greetings, to one and all!
>
> My name is Schimon, and I am the developer of a news chat bot for the
> XMPP network, called Slixfeed.
>
> I have recently added support for OMEMO encryption,
On 8/3/2024 2:49 PM, Barry Scott via Python-list wrote:
On 30 Jul 2024, at 18:36, Schimon Jehudah via Python-list
wrote:
Greetings, to one and all!
My name is Schimon, and I am the developer of a news chat bot for the
XMPP network, called Slixfeed.
I have recently added support for OMEMO
On 03Aug2024 16:34, o1bigtenor wrote:
So please - - - how do I set up a venv so that I can install and run
python
3.12
(and other needed programs related to 3.12) inside?
Maybe this github comment will help with this:
https://github.com/orgs/micropython/discussions/10255#discussioncomment
On 8/3/24 20:03, o1bigtenor via Python-list wrote:
My question was, is and will be (and the doc absolutely doesn't cover it)
how do I install a different version in the venv so that python 3.11.x on
the
system is not discombobulated by the python 3.12.x in the venv.
That python 3.12 woul
On 8/5/24 06:48, o1bigtenor via Python-list wrote:
On Sun, Aug 4, 2024 at 8:49 AM Mats Wichmann via Python-list <
[email protected]> wrote:
On 8/3/24 20:03, o1bigtenor via Python-list wrote:
My question was, is and will be (and the doc absolutely doesn't cover it)
how do
Your approach is wrong.
You don't build python from source using pip.
You don't install new versions of python into a venv either.
Have you read the following?
https://docs.micropython.org/en/latest/esp8266/tutorial/intro.html
That seems to have instructions for what you want to d
On 8/5/24 14:39, o1bigtenor wrote:
Matt - if you would rather that you were not included in the address
list - -
please advise.
On Mon, Aug 5, 2024 at 8:51 AM Mats Wichmann <mailto:[email protected]>> wrote:
On 8/5/24 06:48, o1bigtenor via Python-list wrote:
> On Sun, Au
On 8/5/24 15:17, o1bigtenor via Python-list wrote:
That's something like
pyenv install 3.12.4
$ pyenv install 3.12.4
bash: pyenv: command not found
pyenv is not a 'global' package
there is a mountain of /root/.pyenv files though
there is also quite a number of /root
Did Mats suggestion of:
python3.13 -m venv new_venv
$ new_venv/bin/python --version
Python 3.13.0b4
$ source new_venv/bin/activate
Not work?
That should work on any system, with any system installl python.
It's not trying to modify the system installed python in anyway...
If not, please
On 2024-08-05, aotto1968 via Python-list wrote:
> Is it possible to run two completely independent Python interpreters
> in one process, each using a thread?
>
> By independent, I mean that no data is shared between the
> interpreters and thus the C API can be used without any ot
On Tue, 6 Aug 2024 at 08:48, aotto1968 via Python-list
wrote:
>
> hi,
>
> Is it possible to run two completely independent Python interpreters in one
> process, each using a thread?
>
> By independent, I mean that no data is shared between the interpreters and
> th
why reply to me instead of to the list?
It's generally considered bad form to do so.
Do you have any python 3 installed on your system?
Or python 2.7?
If not, can you install such via system package?
-Bill
On Mon, Aug 5, 2024 at 6:06 PM o1bigtenor wrote:
>
>
> On Mon, Au
Hi!
I'm working on a Linux From Scratch sort of system, and part of that is
bootstrapping Python. I'm running into an error message in the compilation
though - could anyone help me with next steps on troubleshooting the error?
Error:
> ./_bootstrap_python /tmp/sources/Python-3.
I’m not looking through all the packages you have installed
What version of python is installed on your system?
On Tue, Aug 6, 2024 at 5:24 AM o1bigtenor wrote:
>
>
> On Mon, Aug 5, 2024 at 10:36 PM Bill Deegan
> wrote:
>
>> why reply to me instead of to the li
> On 6 Aug 2024, at 07:11, aotto1968 via Python-list
> wrote:
>
> I know but I use a thread like a process because the "conversation" between
> the threads is done by my
> software. a Thread is usually faster to startup (thread-pool) this mean for
> high-lo
> On 6 Aug 2024, at 02:49, Piper McCorkle via Python-list
> wrote:
>
> $ /tmp/sources/Python-3.12.4/configure --enable-shared --with-system-expat
> --enable-optimizations --prefix=
I assume that you must provide a value for --prefix. The linux default would be
--pre
Python 3.12.5 is now available:
https://www.python.org/downloads/release/python-3125/
This is the fifth maintenance release of Python 3.12
Python 3.12 is the newest major release of the Python programming language,
and it contains many new features and optimizations. 3.12.5 is the latest
I believe you will need to track the modules in the folder *dbi *in the
root file '__init__.py'.
So there's an alternative to use the statement __all__ in the root filet
__init__.py, check the link where I find a use case:
*https://sentry.io/answers/what-is-init-py-for-i
On Thu, 8 Aug 2024 at 03:40, Tobiah via Python-list
wrote:
> The one under rcs.dbi contains:
>
> from dbi import *
> from regos import *
>
You probably want these to be package-relative now:
from .dbi import *
from .regos import *
Or, since you're using names
On 07Aug2024 08:35, Tobiah wrote:
When I do the same import with python3, I get:
Traceback (most recent call last):
File "/home/toby/me", line 1, in
import rcs.dbi
File "/usr/regos-1.0/lib/python/rcs/dbi/__init__.py", line 1, in
On 08Aug2024 21:55, Gilmeh Serda wrote:
I guess in a sense Py2 was smarter figuring out what whent where and
where
it came from. Or it was a bad hack that has been removed.
No, Python 2 offered less control.
--
https://mail.python.org/mailman/listinfo/python-list
Hiya, I'm using the sims 4 mod constructor by Zerbu, and when saving I'm
getting these error codes.
I'm going around in circles trying to figure out what is causing it, and I'm
stuck!
Can you help please?
Thank you.
Errors:
There was an error compiling the generated Pyt
Barry. Thomas. I agree.
I do not have his machine to make observations, and therefore this
report is obscured.
I want to solve an issue of a friend who has attempted to install
Slixfeed, which is based on OMEMO, and the installation has failed.
I have asked him to install python-omemo and he
On 8/11/24 07:42, Schimon Jehudah via Python-list wrote:
Barry. Thomas. I agree.
I do not have his machine to make observations, and therefore this
report is obscured.
I want to solve an issue of a friend who has attempted to install
Slixfeed, which is based on OMEMO, and the installation has
I am clearly one of the troglodytes referred to in recent discussions around
the PSF. I've been around in python land
for far too long, my eyesight fails etc etc.
I feel strongly that a miscarriage of justice has been made in the 3-month banning of a famous python developer from
some are
> On 11 Aug 2024, at 13:06, Charlotte Plant via Python-list
> wrote:
>
> Hiya, I'm using the sims 4 mod constructor by Zerbu, and when saving I'm
> getting these error codes.
> I'm going around in circles trying to figure out what is causing it, and I&
On 8/13/24 3:24 AM, Robin Becker via Python-list wrote:
> I am clearly one of the troglodytes referred to in recent discussions around
> the PSF. I've been around in python land
> for far too long, my eyesight fails etc etc.
>
> I feel strongly that a miscarriage of justice
Hahah, as someone with extensive experience of being banned by various
CoC-waving Python online communities' authorities I really enjoyed the
saga. Watching little men grasp for power on the Web to squash their
opponents never stops to amuse me.
On Tue, Aug 13, 2024 at 4:56 PM Michael Torri
"test" writes:
> why is the nntp library deprecated in recent python versions? they
> clearly lost touch
nntplib is not vanishing into thin air. It's just not going to be part
of a default Python installation. (It's not there in Python 3.13.0rc1.)
In my opinion the u
you will. The primordial sense of
justice, that was later developed into a bunch of different theories
of how justice might work.
--
https://mail.python.org/mailman/listinfo/python-list
On 8/14/24 13:14, Keith Thompson via Python-list wrote:
> The rationale for removing nntplib and other modules from the default
> installation is explained in PEP 0594 <https://peps.python.org/pep-0594/>.
>
> """
> The nntplib tests have been the cause of
On 8/14/24 15:19, Left Right via Python-list wrote:
>On 8/14/24 13:26, geodandw via Python-list wrote:
>> Why do you have to belittle other people?
> Who says I have to? I like to! I like to see people driven by all
> sorts of low and reprehensible motives being punished for it.
ement for vetting and validation
* Shortening shelf life of existing projects
But hey, this is just letting off steam. Nobody cares. The decision
was already made and it won't be unmade. And, in the grand scheme of
things this is a drop in a bucket of the awful decisions that were
guiding Py
On 14/08/2024 23:32, Left Right via Python-list wrote:
>> it became simple and straightforward to
>> download and install packages.
>
> I think the right word for this is "delusional".
I agree. But even if it worked it doesn't alter the fact
that by not havi
On 8/14/24 15:32, Left Right via Python-list wrote:
> I think the right word for this is "delusional". But people get
> offended when other people use the right words. Instead they want a
> grotesque round-about way of saying the same thing...
>
> So, the grotesque round
On 8/14/24 15:56, Alan Gauld via Python-list wrote:
> Lots of people care but the ability to influence these
> decisions seems to have been removed far from the
> general python user community. Python has moved from
> the BDFL/Bazaar to the Committee/Cathedral. Probably
>
On 14/08/2024 12:54 am, Michael Torrie via Python-list wrote:
On 8/13/24 3:24 AM, Robin Becker via Python-list wrote:
I am clearly one of the troglodytes referred to in recent discussions around
the PSF. I've been around in python land
for far too long, my eyesight fails etc etc.
I
On 8/14/24 19:43, dn via Python-list wrote:
Recently there was an election for PSF members. Did 'everyone' participate?
Of course not, I didn't simply because I don't know enough have a cogent
opinion. But conversations like this are would seem to be good if they
don
On 8/14/24 17:53, Mike Dewhirst via Python-list wrote:
I read Chris McDonough's defence of Tim Peters and he has convinced me.
Not because of everything he said but because I have experience of
committees. And other things.
The problem is generational.
Later generations can see the f
c.
I do wonder if the people at python.org want multiple forums. There is also
one that sort of tutors people that obviously has an overlapping but
different audience.
Avi
-Original Message-
From: Python-list On
Behalf Of MRAB via Python-list
Sent: Tuesday, August 20, 2024 7:12 PM
To: p
On 2024-08-20 at 23:16:48 -0400,
AVI GROSS via Python-list wrote:
> I do wonder if the people at python.org want multiple forums. There is
> also one that sort of tutors people that obviously has an overlapping
> but different audience.
$ python -m this
The Zen of Python, by T
On Wed, Aug 21, 2024 at 4:04 PM Daniel via Python-list <
[email protected]> wrote:
>
> An example of use, here's a weather service tied to a finger. Put your
> city name as the user. This isn't mine, but it is inspiring. Example:
>
> finger [email protected]
>
they were a tad tone deaf and did
not seem to care if anyone objected.
Let's keep this forum going.
-Original Message-
From: Python-list On
Behalf Of Dan Sommers via Python-list
Sent: Wednesday, August 21, 2024 4:57 AM
To: [email protected]
Subject: Re: new here
On 2024-08-20 at
On 20.08.2024 um 23:26 Uhr Daniel wrote:
> New here. I've perused some posts and haven't seen a posting FAQ for
> this NG. I'm learning python right now to realize some hobby goals I
> have regarding some smolnet services. What are the NG standards on
> pasting code in
Lawrence D'Oliveiro writes:
> On 23 Aug 2024 03:43:15 GMT, rbowman wrote:
>> I am confused by the cross-over to Python-list. I only read/post to
>> comp.lang.python. Is that echoed to Python-list or vice versa?
>
> This has been happening, without asking our p
Message-
From: Python-list On
Behalf Of rbowman via Python-list
Sent: Friday, August 23, 2024 1:22 AM
To: [email protected]
Subject: Re: new here
On Fri, 23 Aug 2024 16:23:42 +1200, dn wrote:
> Adding a display to the Pico-W is my next project... After that, gyros
> (am thinking
On Sun, 25 Aug 2024 15:12:20 GMT Gilmeh Serda via Python-list wrote:
>Subject explains it, or ask.
>
>This is a bloody mess:
>
>>>> s = "123456789" # arrives as str
>>>> f"{f'{int(s):,}': >20}"
>' 123,456,789
On Sun, 25 Aug 2024 15:12:20 GMT Gilmeh Serda via Python-list wrote:
>Subject explains it, or ask.
>
>This is a bloody mess:
>
>>>> s = "123456789" # arrives as str
>>>> f"{f'{int(s):,}': >20}"
>' 123,456,789'
>
f"{s:>20}"
--
https://mail.python.org/mailman/listinfo/python-list
Thank you Michael. Embedded Controllers are something I personally have never
had to deal with, except as an inviable part of things I use.
But, yes, things like that when cheap enough, make plenty of sense.
-Original Message-
From: Python-list On
Behalf Of MRAB via Python-list
Sent
On 2024-08-26 at 20:42:32 +1200,
dn via Python-list wrote:
> and if we really want to go over-board:
>
> >>> RIGHT_JUSTIFIED = ">"
> >>> THOUSANDS_SEPARATOR = ","
> >>> s_format = F"{RIGHT_JUSTIFIED}{S_FIELD_WIDTH}{THO
else:
pytest.fail("Server did not start in time")
@pytest.mark.usefixtures("start_server")@patch('dispatcher.main.validate_jwt')def
test_function(mock_validate_jwt, mock_get_public_key):
,
.
.
When test_function runs the real validate_jwt runs, not my mock.
--
https://mail.python.org/mailman/listinfo/python-list
others :-)
bye,
--
piergiorgio
--
https://mail.python.org/mailman/listinfo/python-list
On 2024-08-27, Gilmeh Serda via Python-list wrote:
> On 25 Aug 2024 15:46:25 GMT, Stefan Ram wrote:
>
>> f"{int(number):>20,}"
>
> Great. Thanks. Do you have a link to where that's documented?
>
> I did web search, found nothing.
https://docs.python.
On 8/28/2024 5:09 PM, Daniel via Python-list wrote:
As you all have seen on my intro post, I am in a project using Python
(which I'm learning as I go) using the wikimedia API to pull data from
wiktionary.org. I want to parse the json and output, for now, just the
definition of the
On 8/28/2024 8:07 PM, dn via Python-list wrote:
On 29/08/24 10:32, Thomas Passin via Python-list wrote:
On 8/28/2024 5:09 PM, Daniel via Python-list wrote:
As you all have seen on my intro post, I am in a project using Python
(which I'm learning as I go) using the wikimedia API to pull
I need to write a script that will take some user input (supplied on a website)
and then execute a Python script on a host via SSH. I'm curious what the best
options are for protecting against malicious input in much the smae way as you
sanitise SQL to protect against SQL injections.
I
On Friday, 30 August 2024 at 21:23, Peter J. Holzer via Python-list
wrote:
>
>
> On 2024-08-30 19:18:29 +, Simon Connah via Python-list wrote:
>
> > I need to write a script that will take some user input (supplied on a
> > website) and then execute a Python
On 8/30/2024 3:18 PM, Simon Connah via Python-list wrote:
I need to write a script that will take some user input (supplied on a website)
and then execute a Python script on a host via SSH. I'm curious what the best
options are for protecting against malicious input in much the smae way a
> On 30 Aug 2024, at 23:28, dn via Python-list wrote:
>
> Me email (only) client shows a thread of 12 messages.
>
> The OP was @Gilmeh Serda (from an invalid email address). That appears in the
> email thread
>
> @Stefan Ram has had two contributions quoted, but
On 8/30/24 15:28, dn via Python-list wrote:
> The OP was @Gilmeh Serda (from an invalid email address). That appears in the
email thread
>
> @Stefan Ram has had two contributions quoted, but no such original-message
has appeared in the thread.
I can't speak about the archives,
Ethan Furman writes:
> On 8/30/24 15:28, dn via Python-list wrote:
>> The OP was @Gilmeh Serda (from an invalid email address). That appears in
>> the email thread
>>
>> @Stefan Ram has had two contributions quoted, but no such original-message
>> has appeared
On Friday, 30 August 2024 at 23:35, Thomas Passin via Python-list
wrote:
>
>
> On 8/30/2024 3:18 PM, Simon Connah via Python-list wrote:
>
> > I need to write a script that will take some user input (supplied on a
> > website) and then execute a Python scrip
Hello,
I am using Python 2.7 on Windows 10 and I want to launch a process
independently of the rest of the code so that the execution continues while
the started process proceeds. I am using Process().start() from Python 2.7
as follows:
from multiprocessing import Process
def do_something(text
> On 2 Sep 2024, at 15:00, marc nicole via Python-list
> wrote:
>
> I am using Python 2.7 on Windows 10
Why? Install Python 3.12 and it will be easier to get help and support.
If you have legacy that still needs porting then you can install 3.12 along side
the unsupported 3
ny message.
Module naming is OK and don't think it is a problem related to that.
Now the question, when to use Process/Multiprocess and when to use
Threading in Python?.Thread is there a distinctive use case that can
showcase when to use either? are they interchangeable? to note that using
Th
You can try:
>>> 1,2 == 2,2
(1, True, 2)
Its the same as:
>>> 1, (2 == 2), 2
(1, True, 2)
Hope this helps!
Alan Bawden schrieb:
Python 3.10.5 (v3.10.5:f37715, Jul 10 2022, 00:26:17) [GCC 4.9.2] on linux
Type "help", "copyright", "
Python 3.10.5 (v3.10.5:f37715, Jul 10 2022, 00:26:17) [GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> x,_,z = [1,2,3]
Works as expected.
Now I didn't expect the following to
imagine that it would be even
more difficult for readers whose first language is not English.
You also indent your own new text, which is exactly the opposite of
common Usenet conventions. (You've been doing this for a long time.)
Please consider prioritizing your readers' convenience over whatever
benefit you derive from your unconventional posting style.
--
Keith Thompson (The_Other_Keith) [email protected]
void Void(void) { Void(); } /* The recursive call of the void */
--
https://mail.python.org/mailman/listinfo/python-list
o_mock, mock_function2_to_mock
def test_main(mock_dependencies):
some_function()
When some_function is called the real function1_to_mock is called instead
of my mock.
Can someone please let me know how to properly mock these 2 functions.
Thanks!
--
https://mail.python.org/mailman/listinfo/python-list
tware or interest.
-Original Message-
From: Tutor On Behalf Of
Alan Gauld via Tutor
Sent: Tuesday, September 3, 2024 4:41 AM
To: [email protected]
Cc: [email protected]
Subject: Re: [Tutor] Getting a Process.start() error pickle.PicklingError:
Can't pickle : it's not found
Hi,
My "Project" is to integrate python support into OpenSCAD. It runs quite
well, but
there are still issues on MacOS. On My MacOS it works, but it crashes when
I ship
the DMG files.
It looks very much like python is not able to find the "startup" python
files and there
> On 4 Sep 2024, at 16:27, Guenther Sohler via Python-list
> wrote:
>
> Is it possible to turn on debugging and to display on the console, where
> python is loading files from ?
>
I assume you have a .app that is then packaged into a .dmg.
It will be the .app that
ere's usually just one executable file in there. Run that
from a shell and you should see anything written to stdout or stderr.
--
Greg
--
https://mail.python.org/mailman/listinfo/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
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
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
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
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
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
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
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
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
ept: block.
Best,
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
--
https://mail.python.org/mailman/listinfo/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
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(
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(
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
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:
> >
o it's always called.
Good point. Putting the rollback first would be safer/
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
tions are
caught and logged.
--
Greg
--
https://mail.python.org/mailman/listinfo/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
>
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
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
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
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
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
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
5601 - 5700 of 6733 matches
Mail list logo