On Thursday 15 February 2024 at 21:16:22 UTC, E.D.G. wrote:
> Test - ignore February 15, 2024
>
> Test post to see if my Newsgroup post program is working.
Aim your test messages at alt.test, please.
--
https://mail.python.org/mailman/listinfo/python-list
I know that mappings by default support the ** operator, to unpack the
mapping into key word arguments.
Has it been considered implementing a dunder method for the ** operator
so you could unpack an object into a key word argument, and the
developer could choose which keywords would be
Charles,
by your own admission, you deleted your pkl file,
And your code doesn't write that pkl file (pickle.dumps(...) doesn't
write a file it creates a new string and at no point will it write to
the file :
What you need is this :
import pickle
number=2
On Saturday, 17 December 2022 at 23:58:11 UTC, avi.e...@gmail.com wrote:
> Is something sort of taboo when using something like a computer language to
> write a program?
With what else would you write a program?
--
https://mail.python.org/mailman/listinfo/python-list
On 03/01/2022 12:45, Joao Marques wrote:
Good morning: I have a very simple question: I want to start writing
programs in Python so I went to the Microsoft Store and installed
Python3.9. No problem so far. I would prefer to have a gui interface, an
interface that I can use file-->Open and
On 26/01/2022 22:41, Barry wrote:
Run python and your code under a debugger and check the ref count of
the object as you step through the code.
Don’t just step through your code but also step through the C python code.
That will allow you to see how this works at a low level.
Setting a
On 26/01/2022 08:20, Chris Angelico wrote:
On Wed, 26 Jan 2022 at 19:04, Tony Flury via Python-list
wrote:
So according to that I should increment twice if and only if the calling
code is using the result - which you can't tell in the C code - which is
very odd behaviour.
No, the return
On 26/01/2022 01:29, MRAB wrote:
On 2022-01-25 23:50, Tony Flury via Python-list wrote:
On 25/01/2022 22:28, Barry wrote:
On 25 Jan 2022, at 14:50, Tony Flury via
Python-list wrote:
On 20/01/2022 23:12, Chris Angelico wrote:
On Fri, 21 Jan 2022 at 10:10, Greg
Ewing wrote:
On 20/01
On 25/01/2022 22:28, Barry wrote:
On 25 Jan 2022, at 14:50, Tony Flury via Python-list
wrote:
On 20/01/2022 23:12, Chris Angelico wrote:
On Fri, 21 Jan 2022 at 10:10, Greg Ewing wrote:
On 20/01/22 12:09 am, Chris Angelico wrote:
At this point, the refcount has indeed been increased
On 20/01/2022 23:12, Chris Angelico wrote:
On Fri, 21 Jan 2022 at 10:10, Greg Ewing wrote:
On 20/01/22 12:09 am, Chris Angelico wrote:
At this point, the refcount has indeed been increased.
return self;
}
And then you say "my return value is this object".
So you're
On 19/01/2022 11:09, Chris Angelico wrote:
On Wed, Jan 19, 2022 at 10:00 PM Tony Flury via Python-list
wrote:
Extension function :
static PyObject *_Node_test_ref_count(PyObject *self)
{
printf("\nIncrementing ref count for self - just for the hell
of
00_009_test_ref_count (__main__.TestNode)
--
Traceback (most recent call last):
File
"/home/tony/Development/python/orderedtree/tests/test_orderedtree.py",
line 62, in test_000_009_test_ref_count
self.assertEqual(sys.getrefcount(node), 3)
Ass
Tony Rice added the comment:
I would argue that PEP20 should win over backward compatibility, in addition to
the points I hinted at above,
practicality beats purity
--
___
Python tracker
<https://bugs.python.org/issue12
Tony Rice added the comment:
This enhancement request should be reconsidered.
Yes it is the documented behavior but that doesn't mean it's the right
behavior. Functions should work as expected not just in the context of the
module they are implemented in but the context of the problem
New submission from Tony Rice :
datetime.datetime.utcnow()
returns a timezone naive datetime, this is counter-intuitive since you are
logically dealing with a known timezone. I suspect this was implemented this
way for fidelity with the rest of datetime.datetime (which returns timezone
Tony Zhou added the comment:
ok i see, I found the pdf. thank you for that anyway
--
___
Python tracker
<https://bugs.python.org/issue45916>
___
___
Python-bug
Have you tried using Nuitka - rather than pyInstalller - it means you
distribute a single executable and the Python run time library (which
they probably have already), and it has the advantage that it is a bit
quicker than standard python.
Rather than bundle the source code and interpreter
New submission from Tony Zhou :
3.10.0 Documentation » The Python Tutorial » 15. Floating Point Arithmetic:
Issues and Limitationsin
in the link "The Perils of Floating Point" brings user to https://www.hmbags.tw/
I don't think this is right. please check
--
messages: 4
On Wednesday, 13 October 2021 at 16:16:46 UTC+1, jkk wrote:
> Selenium 3.141+
> python 3.8+
> ubuntu 20.04 or windows 10
>
> I'm trying to upgrade code from py3.6+ to py3.8+ and I'm getting several
> DepreciationWarnings.
>
> Can someone point me to where I can find the documentation that
On Saturday, 2 October 2021 at 13:48:39 UTC+1, hongy...@gmail.com wrote:
> On Saturday, October 2, 2021 at 4:59:54 PM UTC+8, ju...@diegidio.name wrote:
> > On Saturday, 2 October 2021 at 10:34:27 UTC+2, hongy...@gmail.com wrote:
> > > See the following testings:
> > >
> > > In [24]:
Tkinter stopped working overnight from 8/20/2021 to 8/21/2021. Last night
I was working on tutorials to work on a GUI and this morning every file
that uses tkinter is broken stating that no module `tkinter' exists.
Please let me know if there is some sort of problem. I am removing
New submission from Tony :
on the >>> prompt type:
>>>717161 * 0.01
7171.6101
the same goes for
>>>717161.0 * 0.01
7171.6101
You can easily find more numbers with similar problem:
for i in range(100):
if len(str(i * 0.01)) > 12:
Thank you
I have tried Sublime 3 and the same thing happens. I do not think I have
another version of Python on my PC. I am trying to look through my files to
find out.
Regards
Tony
-Original Message-
From: Mladen Gogala
Sent: 13 February 2021 05:35
To: python-list@python.org
this to work.
Regards
Tony
--
https://mail.python.org/mailman/listinfo/python-list
Tony Martin Berbel added the comment:
My system crashed completely. I reinstalled Ubuntu. Sorry I couldn't help
more ... :(
___
MARTIN BERBEL, Tony
GSM: +32 (0) 477 / 33.12.48
--
Le mer. 10 févr. 2021 à 04:06, Tony Martin
Tony Martin Berbel added the comment:
I found lastlog and attached it !
--
Added file: https://bugs.python.org/file49800/lastlog
___
Python tracker
<https://bugs.python.org/issue43
Tony Martin Berbel added the comment:
I had the same error
I ran the make test command with >
But I don't know where to look for the log file
--
nosy: +wingarmac
___
Python tracker
<https://bugs.python.org/issu
Tony Lykke added the comment:
Sorry, there's a typo in my last comment.
--store --foo a
Namespace(foo=['a', 'b', 'c'])
from the first set of examples should have been
--store --foo c
Namespace(foo=['a', 'b', 'c
Tony Lykke added the comment:
Perhaps the example I added to the docs isn't clear enough and should be
changed because you're right, that specific one can be served by store_const.
Turns out coming up with examples that are minimal but not too contrived is
hard! Let me try again
Change by Tony Lykke :
--
keywords: +patch
pull_requests: +23269
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24478
___
Python tracker
<https://bugs.python.org/issu
New submission from Tony Lykke :
I submitted this to the python-ideas mailing list early last year:
https://mail.python.org/archives/list/python-id...@python.org/thread/7ZHY7HFFQHIX3YWWCIJTNB4DRG2NQDOV/.
Recently I had some time to implement it (it actually turned out to be pretty
trivial
Tony Ladd added the comment:
Dennis
Thanks for the explanation. Sorry to post a fake report. Python is relentlessly
logical but sometimes confusing.
--
___
Python tracker
<https://bugs.python.org/issue43
New submission from Tony Ladd :
The expression "1 and 2" evaluates to 2. Actually for most combinations of data
type it returns the second object. Of course its a senseless construction (a
beginning student made it) but why no exception?
--
components: Interpreter Cor
Tony Albers added the comment:
No no no, please don't.
Apart from FreeBSD, illumos distros are the only really hard-core UNIX OS'es
still freely available, the features taken into account.
SMF, dtrace and several hypervisor types makes illumos really stand out.
I understand
On 07/10/2020 12:06, Loris Bennett wrote:
Hi,
I have written a program, which I can run on the command-line thus
mypyprog --version
and the get the version, which is currently derived from a variable in
the main module file.
However, I also have the version in an __init__.py file and in
I am trying to write a simple expression to build a raw string that ends
in a single backslash. My understanding is that a raw string should
ignore attempts at escaping characters but I get this :
>>> a = r'end\'
File "", line 1
a = r'end\'
^
SyntaxError:
Change by Tony Wu :
--
nosy: +ghaering
___
Python tracker
<https://bugs.python.org/issue41829>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Tony Wu :
Supplying a sequence or sqlite3.Row objects to sqlite3.Connection.executemany
will cause the Row objects to be interpreted as Sequences instead of Mappings
even if the statement to be executed uses named parameter substitution.
That is, values in the Rows
New submission from Tony DiLoreto :
The following code does not work on many OSX installations of Python via
homebrew:
>>> import webbrowser
>>> webbrowser.open("http://www.google.com;)
And throws the following error stack trace:
File
"/usr/loc
C/machine code.
--
Tony Flury
--
https://mail.python.org/mailman/listinfo/python-list
Tony added the comment:
bump
--
___
Python tracker
<https://bugs.python.org/issue41246>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Tony added the comment:
bump
--
___
Python tracker
<https://bugs.python.org/issue41533>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Tony added the comment:
bump
--
title: Convert StreamReaderProtocol to a BufferedProtocol -> Add a
StreamReaderBufferedProtocol
___
Python tracker
<https://bugs.python.org/issu
Tony Reix added the comment:
Hi Stefan,
In your message https://bugs.python.org/issue41540#msg375462 , you said:
"However, instead of freezing the machine, the process gets a proper SIGKILL
almost instantly."
That's probably due to a very small size of the Paging Space of the A
Tony Reix added the comment:
I forgot to say that this behavior was not present in stable version 3.8.5 .
Sorry.
On 2 machines AIX 7.2, testing Python 3.8.5 with:
+ cd /opt/freeware/src/packages/BUILD/Python-3.8.5
+ ulimit -d unlimited
+ ulimit -m unlimited
+ ulimit -s unlimited
+ export
Tony Reix added the comment:
Is it a 64bit AIX ? Yes, AIX is 64bit by default and only since ages, but it
manages 32bit applications as well as 64bit applications.
The experiments were done with 64bit Python executables on both AIX and Linux.
The AIX machine has 16GB Memory and 16GB Paging
Tony Reix added the comment:
Hi Pablo,
I'm only surprised that the maximum size generated in the test is always lower
than the PY_SSIZE_T_MAX. And this appears both on AIX and on Linux, which both
compute the same values.
On AIX, it appears (I've just discovered this now) that malloc() does
Tony Reix added the comment:
Some more explanations.
On AIX, the memory is controlled by the ulimit command.
"Global memory" comprises the physical memory and the paging space, associated
with the Data Segment.
By default, both Memory and Data Segment are limited:
# ulimit -a
dat
New submission from Tony Reix :
Python master of 2020/08/11
Test test_maxcontext_exact_arith (test.test_decimal.CWhitebox) checks that
Python correctly handles a case where an object of size 421052631578947376 is
created.
maxcontext = Context(prec=C.MAX_PREC, Emin=C.MIN_EMIN, Emax
Change by Tony :
--
keywords: +patch
pull_requests: +20974
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21847
___
Python tracker
<https://bugs.python.org/issu
New submission from Tony :
When calling a function a stack is allocated via va_build_stack.
There is a leak that happens if do_mkstack fails in it.
--
messages: 375267
nosy: tontinton
priority: normal
severity: normal
status: open
title: Bugfix: va_build_stack leaks the stack
Tony Reix added the comment:
I do agree that the example with memchr is not correct.
About your suggestion, I've done it. With 32. And that works fine.
All 3 values are passed by value.
# cat Pb-3.8.5.py
#!/usr/bin/env python3
from ctypes import *
mine = CDLL('./MemchrArgsHack2.so
Tony Reix added the comment:
After more investigations, we (Damien and I) think that there are several
issues in Python 3.8.5 :
1) Documentation.
a) AFAIK, the only place in the Python ctypes documentation where it talks
about how arrays in a structure are managed appears at:
https
Tony Reix added the comment:
Fedora32/x86_64 : Python v3.8.5 : optimized : uint type.
If, instead of using ulong type, the Pb.py program makes use of uint, the issue
is different: see below.
This means that the issue depends on the length of the data.
BUILD=optimized
TYPE=int
export
Change by Tony Reix :
--
versions: +Python 3.8 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue38628>
___
___
Python-bugs-list mailing list
Unsub
Tony Reix added the comment:
Fedora32/x86_64 : Python v3.8.5 has been built.
Issue is still there, but different in debug or optimized mode.
Thus, change done in https://bugs.python.org/issue22273 did not fix this issue.
./Pb-3.8.5-debug.py :
#!/opt/freeware/src/packages/BUILD/Python-3.8.5
Tony Reix added the comment:
After adding traces and after rebuilding Python and libffi with -O0 -g -gdwarf,
it appears that, still in 64bit, the bug is still there, but that ffi_call_AIX
is called now instead of ffi_call_DARWIN from ffi_call() routine of
../src/powerpc/ffi_darwin.c (lines
Tony Reix added the comment:
On AIX 7.2, with libffi compiled with -O0 -g, I have:
1) Call to memchr thru memchr_args_hack
#0 0x091b0d60 in memchr () from /usr/lib/libc.a(shr_64.o)
#1 0x0900058487a0 in ffi_call_DARWIN () from
/opt/freeware/lib/libffi.a(libffi.so.6)
#2
Tony Reix added the comment:
# pwd
/opt/freeware/src/packages/BUILD/libffi-3.2.1
# grep -R ffi_closure_ASM *
powerpc-ibm-aix7.2.0.0/.libs/libffi.exp: ffi_closure_ASM
powerpc-ibm-aix7.2.0.0/include/ffitarget.h:void * code_pointer; /*
Pointer to ffi_closure_ASM */
src/powerpc
Tony Reix added the comment:
AIX: difference between 32bit and 64bit.
After the second print, the stack is:
32bit:
#0 0xd01407e0 in memchr () from /usr/lib/libc.a(shr.o)
#1 0xd438f480 in ffi_call_AIX () from /opt/freeware/lib/libffi.a(libffi.so.6)
#2 0xd438effc in ffi_call () from /opt
Tony Reix added the comment:
On AIX in 32bit, we have:
Thread 2 hit Breakpoint 2, 0xd01407e0 in memchr () from /usr/lib/libc.a(shr.o)
(gdb) where
#0 0xd01407e0 in memchr () from /usr/lib/libc.a(shr.o)
#1 0xd438f480 in ffi_call_AIX () from /opt/freeware/lib/libffi.a(libffi.so.6)
#2
Tony Reix added the comment:
On Fedora/PPC64LE, where it is OK, the same debug with gdb gives:
(gdb) where
#0 0x77df03b0 in __memchr_power8 () from /lib64/libc.so.6
#1 0x7fffea167680 in ?? () from /lib64/libffi.so.6
#2 0x7fffea166284 in ffi_call () from /lib64/libffi.so.6
Tony Reix added the comment:
On Fedora/x86_64, in order to get the core, one must do:
coredumpctl -o /tmp/core dump /usr/bin/python3.8
--
___
Python tracker
<https://bugs.python.org/issue38
Tony Reix added the comment:
On AIX:
root@castor4## gdb /opt/freeware/bin/python3
...
(gdb) run -m pdb Pb.py
...
(Pdb) n
b'def'
> /home2/freeware/src/packages/BUILD/Python-3.8.5/32bit/Pb.py(35)()
-> print(
(Pdb) n
> /home2/freeware/src/packages/BUILD/Python-3.8.5/32bit
Tony Reix added the comment:
Fedora32/x86_64
[root@destiny10 tmp]# gdb /usr/bin/python3.8 core
...
Core was generated by `python3 ./Pb.py'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x7f898a02a1d8 in __memchr_sse2 () from /lib64/libc.so.6
Missing separate debuginfos
Tony Reix added the comment:
On Fedora32/PPC64LE (5.7.9-200.fc32.ppc64le), with little change:
libc = CDLL('/usr/lib64/libc.so.6')
I get the correct answer:
b'def'
b'def'
b'def'
# python3 --version
Python 3.8.3
libffi : 3.1-24
On Fedora32/x86_64 (5.7.9-200.fc32.x86_64), with a little
Tony added the comment:
If the error is not resolved yet, I would prefer if we revert this change then.
The new PR is kinda big I don't know when it will be merged.
--
___
Python tracker
<https://bugs.python.org/issue41
Tony added the comment:
Ok so I checked and the PR I am currently having a CR on fixes this issue:
https://github.com/python/cpython/pull/21446
Do you want me to make a different PR tomorrow that fixes this specific issue
to get it faster to master or is it ok to wait a bit
Tony added the comment:
I see, I'll start working on a fix soon
--
___
Python tracker
<https://bugs.python.org/issue41273>
___
___
Python-bugs-list mailin
Tony added the comment:
By the way if we will eventually combine StreamReader and StreamWriter won't
this function (readinto) be useful then?
Maybe we should consider adding it right now.
Tell me your thoughts on this.
--
___
Python tracker
Tony added the comment:
> Which brings me to the most important point: what we need it not coding it
> (yet), but rather drafting the actual proposal and posting it to
> https://discuss.python.org/c/async-sig/20. Once a formal proposal is there
> we can proceed with the im
Tony added the comment:
Ok actually that sounds really important, I am interested.
But to begin doing something like this I need to know what's the general design.
Is it simply combining stream reader and stream writer into a single object and
changing the write() function to always wait
Tony added the comment:
Ah it's trio...
--
___
Python tracker
<https://bugs.python.org/issue41305>
___
___
Python-bugs-list mailing list
Unsubscribe:
Tony added the comment:
ok.
Im interested in learning about the new api.
Is it documented somewhere?
--
___
Python tracker
<https://bugs.python.org/issue41
Change by Tony :
--
pull_requests: +20633
pull_request: https://github.com/python/cpython/pull/21491
___
Python tracker
<https://bugs.python.org/issue41
Change by Tony :
--
keywords: +patch
pull_requests: +20634
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21491
___
Python tracker
<https://bugs.python.org/issu
New submission from Tony :
Add a StreamReader.readinto(buf) function.
Exactly like StreamReader.read() with *n* being equal to the length of buf.
Instead of allocating a new buffer, copy the read buffer into buf.
--
messages: 373702
nosy: tontinton
priority: normal
severity: normal
Tony added the comment:
I feel like the metadata is not really a concern here. I like when there is no
code duplication :)
--
___
Python tracker
<https://bugs.python.org/issue41
Change by Tony :
--
keywords: +patch
pull_requests: +20594
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21446
___
Python tracker
<https://bugs.python.org/issu
Change by Tony :
--
pull_requests: +20593
pull_request: https://github.com/python/cpython/pull/21446
___
Python tracker
<https://bugs.python.org/issue41
New submission from Tony :
This will greatly increase performance, from my internal tests it was about
150% on linux.
Using read_into instead of read will make it so we do not allocate a new buffer
each time data is received.
--
messages: 373526
nosy: tontinton
priority: normal
Change by Tony :
--
pull_requests: +20589
pull_request: https://github.com/python/cpython/pull/21442
___
Python tracker
<https://bugs.python.org/issue41
Change by Tony :
--
pull_requests: +20590
pull_request: https://github.com/python/cpython/pull/21442
___
Python tracker
<https://bugs.python.org/issue41
Change by Tony :
--
keywords: +patch
pull_requests: +20588
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21439
___
Python tracker
<https://bugs.python.org/issu
Change by Tony :
--
nosy: +tontinton
nosy_count: 3.0 -> 4.0
pull_requests: +20585
pull_request: https://github.com/python/cpython/pull/21439
___
Python tracker
<https://bugs.python.org/issu
New submission from Tony :
Using recv_into instead of recv in the transport _loop_reading will speed up
the process.
>From what I checked it's about 120% performance increase.
This is only because there should not be a new buffer allocated each time we
call recv, it's really waste
Change by Tony :
--
pull_requests: +20555
pull_request: https://github.com/python/cpython/pull/21406
___
Python tracker
<https://bugs.python.org/issue41
Tony added the comment:
bump
--
___
Python tracker
<https://bugs.python.org/issue41093>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by Tony :
--
title: asyncio module better caching for set and get_running_loop ->
asyncio.set_running_loop() cache running loop holder
___
Python tracker
<https://bugs.python.org/issu
Change by Tony :
--
keywords: +patch
pull_requests: +20550
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21401
___
Python tracker
<https://bugs.python.org/issu
New submission from Tony :
There is a cache variable for the running loop holder, but once
set_running_loop is called the variable was set to NULL so the next time
get_running_loop would have to query a dictionary to receive the running loop
holder.
I thought why not always cache the latest
Change by Tony :
--
keywords: +patch
pull_requests: +20547
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21399
___
Python tracker
<https://bugs.python.org/issu
New submission from Tony :
In IocpProactor I saw that the callbacks to the functions recv, recv_into,
recvfrom, sendto, send and sendfile all give the same callback function for
when the overlapped operation is done.
I just wanted cleaner code so I made a static function inside the class
Maybe you should raise a bug (bugs.python.org) and flag that this
function is missing.
It could be that it can be introduced by whoever is maintaining the
existing code.
On 20/05/2020 08:31, Alan Gauld via Python-list wrote:
On 19/05/2020 20:53, Alan Gauld via Python-list wrote:
One of
Tony added the comment:
poke
--
___
Python tracker
<https://bugs.python.org/issue41093>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Sent: Wednesday, June 24, 2020 7:28:52 PM
To: python-list@python.org
Subject: Re: Pycharm Won't Do Long Underscore
On 2020-06-24 18:59, Chris Angelico wrote:
> On Thu, Jun 25, 2020 at 3:51 AM Dennis Lee Bieber
> wrote:
>>
>> On Tue, 23 Jun 2020 20:49:36 +, Tony Kaloki
&g
Tony added the comment:
This still leaves the open issue of UDPServer not shutting down immediately
though
--
___
Python tracker
<https://bugs.python.org/issue41
Tony added the comment:
Just want to note that this fixes an issue in all TCPServers and not only
http.server
--
title: BaseServer's server_forever() shutdown immediately when calling
shutdown() -> TCPServer's server_forever() shutdown immediately when calling
shutd
, thanks again for your quick and easy to follow - even for me -
reply.
Tony
Get Outlook for Android<https://aka.ms/ghei36>
From: Alexander Neilson
Sent: Tuesday, June 23, 2020 9:28:37 PM
To: Tony Kaloki
Cc: python-list@python.org
Subject: Re: Pycharm Won't D
Change by Tony :
--
pull_requests: +20260
pull_request: https://github.com/python/cpython/pull/21094
___
Python tracker
<https://bugs.python.org/issue41
1 - 100 of 487 matches
Mail list logo