New submission from Anthony :
Given one of the motivations of @dataclass is to reduce boilerplate code then,
in the context of @dataclass,
x: list = [] should be equal to x: list = field(default_factory=lambda: [])
The example in PEP 557 is not reasonable. It should be:
class D:
def
Anthony added the comment:
Thanks for adding it, I read it now.
And sorry to back track a moment - I love the idea of @dataclass and I can
only imagine how must work it was to implement as I am only a beginner.
I'm looking at this primarily from the narrow view point of a user - not so
Anthony added the comment:
To clarify,
A major assumption I'm making is that the default is empty, or the
"copying" is handled as some separately coupled concept.
A motivation here is wanting to do operations like .append() that depend on
the object existing.
On Wed, Nov 13,
Anthony added the comment:
Hey Eric, I think our emails crossed in the wind, please see my comment that
includes (as a sub component) a similar idea to what's proposed in the article
you linked.
--
___
Python tracker
<https://bugs.py
Anthony added the comment:
Vedran thank you for the detailed comments.
I want to separate the idea side and implementation:
The idea is having defaults expressed in a way of least surprise and in the
least amount of code.
Specifically that
[1]
makes more sense then
field(default_factory
Anthony Sottile added the comment:
I'm seeing some weird breakage in the deadsnakes builds, presumably due to this
change:
```
...
2021-10-27T08:55:21.9485959Z x86_64-linux-gnu-gcc -pthread -Wno-unused-result
-Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g -fdebug-prefix-map=/tmp
Anthony Sottile added the comment:
rebased this onto 3.11
--
versions: +Python 3.11 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue39214>
___
___
Anthony Sottile added the comment:
looks like this was removed in 3.11 -- wondering if it's still worth correcting
the deprecation warning location
--
versions: +Python 3.10 -Python 3.11
___
Python tracker
<https://bugs.python.org/is
New submission from anthony shaw :
I'd like to compile my C-extensions with ASAN for testing in Windows, but they
cannot be loaded as the host python.exe process needs to be compiled with ASAN.
https://docs.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-170#ide-msbuild
The Enabl
anthony shaw added the comment:
After some experimentation, this can be done if you enable ASAN in all projects
except python3dll.vcxproj
I think it would make sense (if this were supported) to have a flag in
build.bat like there is for pgo
`build.bat --asan
Anthony Sottile added the comment:
should this behaviour change be backported? it potentially creates an annoying
edgecase where code seemingly works unless you use an older patch version
since this isn't a bugfix I wouldn't expect this to land in 3.9 and 3.10
--
nosy
Anthony Sottile added the comment:
to me this is the same as the Union[Pattern] / Union[Match] "fixes" that landed
in 3.5.3 -- and the pain caused by using that and having CI pass (because of
modern 3.5.x) but having spurious bug reports from users stuck on 3.5.2
or in 3.6.1 when
Anthony Sottile added the comment:
3.7.2 has another example where OrderedDict was added to typing
I don't have any personal investment in this particular change but I've had
quite a few unhappy consumers of libraries due to instability in typing apis
between patch versions in the
New submission from Anthony Sottile :
For example:
>>> import pwd
>>> pwd.getpwnam("test")
Traceback (most recent call last):
File "", line 1, in
KeyError: "getpwnam(): name not found: 'test'"
An improvement would be som
Change by Anthony Sottile :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue41767>
___
___
Python-bugs-list
Anthony Sottile added the comment:
(I know this is old and closed but I've just run into the same thing with
pwd.getpwnam in issue41767)
KeyError: "getpwnam(): name not found: 'test'"
would it be possible / make sense to extend `KeyError` with a
named-only-argu
New submission from anthony shaw :
I noticed that HAVE_ARGUMENT and STORE_NAME have the same value (90) in
Include/opcode.h in both the source code and in the 2bd31b5f revision
(3.9.0rc2).
This must be creating some weird bugs.
https://github.com/python/cpython/blob
anthony shaw added the comment:
No, this is intentional. sorry. closing
https://github.com/python/cpython/blob/34cd3e9f6a87f9c50edac893b0d5ae46c4e48ee3/Doc/library/dis.rst#L1194
--
___
Python tracker
<https://bugs.python.org/issue41
anthony shaw added the comment:
Or is this some sort of obscure month python reference!?
--
___
Python tracker
<https://bugs.python.org/issue41888>
___
___
Pytho
Change by anthony shaw :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue41888>
___
___
Python-bugs-list
Anthony Sottile added the comment:
Seems to be due to https://bugs.python.org/issue40187
--
nosy: +Anthony Sottile, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41
Change by Anthony Sottile :
--
pull_requests: +21715
pull_request: https://github.com/python/cpython/pull/22752
___
Python tracker
<https://bugs.python.org/issue40
Change by Anthony Sottile :
--
pull_requests: +21718
pull_request: https://github.com/python/cpython/pull/22755
___
Python tracker
<https://bugs.python.org/issue40
New submission from Anthony Sottile :
this was originally pointed out in a comment on my youtube video here:
https://youtu.be/Xf_82stIbB8
here's a reproduction:
1. produce 5000 characters of output: python3 -c 'print("a"*5000)'
2. copy that to the clipboard
3. run
Anthony Sottile added the comment:
indeed! that's it -- you learn something every day :)
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
New submission from anthony shaw :
I noticed since the new parser implementation, the debug mode in the tokeniser
is no longer working.
This is the case for 3.9.0 and also 3.9.1rc1. Running python3.9 with a simple
application like this:
# Demo application
def my_function():
proceed
anthony shaw added the comment:
thanks, it would be great if this were documented in the --help section like
the other options which require a debug build (-X showrefcount)
--
___
Python tracker
<https://bugs.python.org/issue42
New submission from Anthony Hodson :
HTMLParser close() does not seem to dispose of previous HTML analyses.
I an sending a simple test to demonstrate this, complete with functions
that are part of a set of testing facilities. The problem is present for more
complex HTML
Anthony Hodson added the comment:
Resolved by correct initiation of subclass
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Anthony Sottile :
here's a sample file. this is distilled down from an example which broke a
code formatter here: https://github.com/asottile/add-trailing-comma/issues/106
def f():
x = (
'PERL_MM_OPT', (
f'INSTALL-BA
Anthony Sottile added the comment:
+peg parser individuals to nosy
--
nosy: +gvanrossum, lys.nikolaou, pablogsal
___
Python tracker
<https://bugs.python.org/issue42
Anthony Sottile added the comment:
I didn't initially, but now I have and it has the same bug in the current
master: 3bf05327c2b25d42b92795d9d280288c22a0963d
--
___
Python tracker
<https://bugs.python.org/is
Anthony Sottile added the comment:
by the way, here's a much smaller case which has a similar problem
```
x = (
f" {test(t)}"
)
```
--
___
Python tracker
<https://bugs.pyt
Anthony Sottile added the comment:
should the minimum sphinx version be bumped and/or this reverted:
https://github.com/python/cpython/blob/f7f0ed59bcc41ed20674d4b2aa443d3b79e725f4/Doc/conf.py#L48
this change breaks, for example, sphinx 1.8.5 while building for ubuntu 20.04
The directive
New submission from Anthony Flury :
In the Python version pull down list on docs.python.org, Python3.5 used to be
listed, but has now been removed; the list only contains 2.7, 3.6 & 3.7.
Python 3.5 is still the official Python 3.5 release in the Ubuntu repository,
and still a suppo
Anthony Flury added the comment:
Isn't Python 2.7 in Security Fix only as well ?
It seems strange; Python 3.5 probably the most heavily installed Python 3
release (every Ubuntu installation has Python 3.5 installed by default - and
neither Python 3.6 or 3.7 are available from the sta
New submission from Anthony Sottile :
Fortunately, this can be reproduced with the testsuite:
```
==
ERROR: test_copystat_symlinks (__main__.TestShutil
Anthony Sottile added the comment:
Here's one idea for a patch (inspired by the rest of the function):
```
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 464ee91..2099289 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -213,6 +213,13 @@ def copystat(src, dst, *, follow_symlinks
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +4230
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31940>
___
___
Py
Change by Anthony Sottile :
--
pull_requests: +4684
___
Python tracker
<https://bugs.python.org/issue31940>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Anthony Sottile :
While investigating https://bugs.python.org/issue31940 I noticed the following
is raised as `SystemError` instead of the expected `NotImplementedError`
(note: you need a platform with fchmodat but does not support nofollow)
```
touch foo
ln -s foo bar
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +4696
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32277>
___
___
Py
Anthony Sottile added the comment:
I noticed it when I changed the test preconditions in
https://github.com/python/cpython/pull/4783
I tried changing a test to trigger this (in this branch) but I found I was just
implementing exactly the test in the `skip` condition which to me didn't
Anthony Sottile added the comment:
if I'm reading the manpage correctly: `readlink` tells the filename that the
symlink points to. lchmod is concerned with setting the `stat` on the link
itself (which only some platforms actually su
Anthony Sottile added the comment:
Should this have landed in python3.6? It removes a public symbol
`PyExc_RecursionErrorInst` (abi break?)
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue30
New submission from Anthony Sottile :
On windows, a deep path can be accessed by prefixing the path with \\?\
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx?f=255&MSPPError=-2147217396#maxpath
The call to `listdir()` fails because it uses a posix separator
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +5023
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32539>
___
___
Py
New submission from Anthony Flury :
The first example given for collections.Counter is misleading - the
documentation ideally should show the 'best' (one and only one) way to do
something and the example is this :
>>> # Tally occurrences of words in a list
>>> cnt
Anthony Flury added the comment:
Raymond,
I completely understand your comment but I do disagree.
My view would be that the documentation of the stdlib should document the entry
level use cases.
The first example given uses nothing special from the Counter class - you could
implement
Anthony Flury added the comment:
Cheryl :
When you iterate around a counter instance it does return keys in the order
they are first encountered/inserted - so I agree with you that it is an ordered
collection from Python 3.7 onwards (although the iteration and the repr are
ordered in
Anthony Sottile added the comment:
Seeing this as well when running the cpython test suite in docker:
```
$ ./python -m test.test_asyncio
...
[18 similar traces omitted]
==
ERROR: test_sock_sendfile_zero_size
Anthony Sottile added the comment:
Actually, my issue seems to be something more strange.
The host being passed in is `localhost` which resolves to:
```
>>> pprint.pprint(socket.getaddrinfo('localhost', 80))
[(,
,
6,
'',
('127.0.0.1', 80)),
Anthony Sottile added the comment:
Applying this patch makes the tests pass for me, but I don't think the patch is
appropriate (just hides the bug):
```
$ git diff
diff --git a/Lib/test/test_asyncio/test_unix_events.py
b/Lib/test/test_asyncio/test_unix_events.py
index 5bd76d3..ff6c4e1 1
New submission from Anthony Flury :
Using the unittest.mock helper mock_open with multi-line read data, although
readlines method will work on the mocked open data, the commonly used iterator
idiom on an open file returns the equivalent of an empty file.
from unittest.mock import
Change by Anthony Flury :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue32933>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from anthony shaw :
In tokenizer.c, the translate_newlines() function does a `strlen()` on the
input string, if the string is not null-terminated, e.g.
'\xbe' this leads to a heap-buffer-overflow. The overflow is not exploitable,
but if there are further changes to
New submission from anthony shaw :
Providing an (invalid) input to the parser causes an exponentially-slow DoS to
the Python executable in 3.10.
e.g.
python3.10 -c "{:"
takes ~2 seconds
python3.10 -c ":"
takes ~22 seconds
Change by anthony shaw :
--
versions: +Python 3.10, Python 3.11
___
Python tracker
<https://bugs.python.org/issue46707>
___
___
Python-bugs-list mailin
Anthony Sottile added the comment:
would it be possible to expose `parse_template` -- or at least some way to
validate that a regex replacement string is correct prior to executing the
replacement?
I'm currently using that for my text editor:
https://github.com/asottile/babi
Anthony Sottile added the comment:
this appears to break the tkinter extension for ubuntu bionic (18.04) -- I'm
not entirely sure on the correct fix here but I get the following from trying
to build there:
2022-04-02T15:52:08.0910452Z Python build finished successfully!
2022-04-02T
Anthony Sottile added the comment:
the `tk-dev` package on ubuntu bionic does not ship with a `pkg-config` file
for tk so it does not build properly there:
```
root@f0dd06a3e87c:/cpython# dpkg -L tk8.6-dev | grep pc
root@f0dd06a3e87c:/cpython#
```
(a note: bionic reaches end of life in
Anthony Sottile added the comment:
I could, but it's very unlikely to get fixed given I believe 18.04 is in
security-only fixes and backporting a pkg-config file seems unlikely
this worked two days ago before this patch
--
___
Python tr
Change by Anthony Sottile :
--
nosy: -Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue45847>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by
Anthony Tuininga
:
--
components: Library (Lib)
severity: normal
status: open
title: Add support for _msi.Record.GetString() and _msi.Record.GetInteger()
type: behavior
versions: Python 2.5
New submission from
Anthony Tuininga
:
Attached is a patch that adds the requested support. This is in relation
to the thread at
http://www.gossamer-threads.com/lists/python/python/584264
In addition to the two methods I
Changes by
Anthony Tuininga
:
--
type: behavior ->
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
New submission from
Anthony Tuininga
:
Attached is a patch that fixes the truncation of the property values
returned by msilib.SummaryInfo.GetProperty(). Unfortunately Microsoft
has deemed it necessary to return the size of
New submission from
Anthony Tuininga
:
Attached is a patch that fixes the handling of file names with 0 or 2 or
more dots in them.
--
components: Library (Lib)
files: msilib.__init__.patch
messages: 55736
nosy
Anthony Foglia added the comment:
I've added Python 2.7 to the list of versions. The development docs
have the same issue.
Let me try another stab at what the docs should say. Following the
suggestion to add it to 3.3.5, perhaps it should be:
"
object.__contains__(self, item)
New submission from Anthony Foglia :
It would be nice if pprint could format namedtuples wrapping lines as it
does with tuples.
Looking at the code, this does not look like an easy task. Completely
rewriting pprint to allow it to be extensible to user-created classes
would be best, but involve
New submission from Anthony Foglia :
cPickle in Python 2.6.4 segfaults when trying to load the string "0.".
pickle throws an error. cPickle should at the least not segfault.
$ python
Python 2.6.4 (r264:75706, Nov 2 2009, 14:44:17)
[GCC 4.4.1] on linux2
Type "help", "
New submission from Anthony Lozano:
If you create a asynchat subclass with a SSL socket asyncore can hang when data
larger than the ac_in_buffer_size comes in.
What (I think) happens is that asyncore uses a select.select call to determine
when to read more data from the socket. On the first
Changes by Anthony Lozano :
--
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issue16976>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Anthony Kong :
--
nosy: +Anthony.Kong
___
Python tracker
<http://bugs.python.org/issue935117>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Anthony Kong :
--
nosy: +Anthony.Kong
___
Python tracker
<http://bugs.python.org/issue5038>
___
___
Python-bugs-list mailing list
Unsubscribe:
Anthony Long added the comment:
Are there tests for this?
--
nosy: +antlong
___
Python tracker
<http://bugs.python.org/issue5863>
___
___
Python-bugs-list mailin
Anthony Long added the comment:
Works for me, py2.7 on snow leopard.
--
nosy: +antlong
___
Python tracker
<http://bugs.python.org/issue10976>
___
___
Python-bug
New submission from Anthony Long :
On pypi, when you are inside of your packages' files area, the link that is
attached to
1. Use the setup.py "upload" command. # "upload"
is broken, it links to http://www.python.org/doc/dist/package-upload.html which
returns
Anthony Long added the comment:
Tests trying all positions and expecting an appropriate TypeError should be
included.
--
nosy: +antlong
___
Python tracker
<http://bugs.python.org/issue11
Changes by Anthony Long :
--
nosy: -antlong
___
Python tracker
<http://bugs.python.org/issue11014>
___
___
Python-bugs-list mailing list
Unsubscribe:
Anthony Long added the comment:
Strange, I didn't see it until this email came. Probably an old browser cache.
Either way, looks good to me. No issues on mac SL.
--
nosy: +antlong
___
Python tracker
<http://bugs.python.org/is
New submission from Anthony Long :
I ran
python test_time.py
and python immediately crashed.
This is the trace from mac's error reporter:
http://dpaste.de/Jsw7/
--
components: Tests
messages: 129502
nosy: antlong
priority: normal
severity: normal
status: open
title: Ru
Changes by Anthony Tuininga :
--
nosy: +atuining
___
Python tracker
<http://bugs.python.org/issue6501>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Anthony Long :
http://docs.python.org/c-api/int.html
"The current implementation keeps an array of integer objects for all integers
between -5 and 256, when you create an int in that range you actually just get
back a reference to the existing object. So it shou
Anthony Long added the comment:
I'll have a doc patch shortly.
Also, I am working on defining a solid range. Memory is not an issue like it
was back in 1991 when this range was originally implemented, so we can go
higher and get a bigger performance boost. This will be very importan
Anthony Long added the comment:
My plan is to document it, as it exists, in the current implementation. That's
a start atleast, and will provide an entry point for further documentation in
the future should it be changed again.
--
___
P
Anthony Long added the comment:
Patched my installation of python27 (via macports, snow leopard) and the patch
was successful. Verified patch works in a limited capacity, using yolk.
--
nosy: +antlong
___
Python tracker
<http://bugs.python.
Anthony Lenton added the comment:
Probably old news, but this also affects 2.5.4.
--
nosy: +elachuni
versions: +Python 2.5
___
Python tracker
<http://bugs.python.org/issue839
New submission from Anthony Foglia :
Looking at the documentation for the __import__ builtin, the default value of
the level parameter is unclear. Two different values are mentioned. The
function signature is written:
__import__(name, globals={}, locals={}, fromlist=[], level=-1)
But the
New submission from Anthony Long :
On mac 10.5, python 2.6.4 (via mac ports) performing
len(string.letters) will produce 117 instead of 52.
from terminal:
along-mb:~ along$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESS
Anthony Long added the comment:
Also: windows 64x, python 2.7
1.
Python 2.7 (r27:82525, Jul 4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)]
on win32
2.
Type "copyright", "credits" or "license()" for more information.
3
New submission from Anthony Long :
string.letters should display the locale based equivalent of a-Z.
In enUS this would be a-z A-Z, in total a len of 52, whereas in spain it would
be a-z (with ñ), and A-Z (Ñ).
Each locale should change the returned letters.
http://en.wikipedia.org/wiki
Anthony Long added the comment:
Windows 64 bit, python 2.7:
>>> '\xff'.isalpha()
>>> False
>>> import idlelib.run
>>> '\xff'.isalpha()
>>> False
and- Windows 32 bit, python 2.6: Both False.
--
Anthony Long added the comment:
Mac 10.5.6: py 2.6.4 - broken
Python 2.6.4 (r264:75706, Mar 18 2010, 14:58:13)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> '\xff&
Anthony Long added the comment:
Python 2.6.4, Mac 10.5:
>>> from string import letters
>>> letters
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\xaa\xb5\xba\xc0\xc1\xc2\xc
3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd
8\xd9\xda\
Anthony Long added the comment:
After import _tkinter, I would up getting this, which is totally different than
before:
>>> letters
'abcdefghijklmnopqrstuvwxyz\xaa\xb5\xba\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\x
Anthony Long added the comment:
A bit more info:
Python 2.6.4 (r264:75706, Mar 18 2010, 14:58:13)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>&g
New submission from Anthony Long :
install a distro of without sqlite3 support. now you should have a
/usr/lib/python2.6/sqlite3, which obviously isn't usable.
now if you install sqlite3, and try a 'import sqlite3' it still doesn't work.
so you have to compile/install py
Anthony Long added the comment:
Same behaviour on python 3,
http://pastebin.ca/1907343
--
___
Python tracker
<http://bugs.python.org/issue9365>
___
___
Python-bug
Anthony Long added the comment:
I disagree. It's expected that the function will return valid data. This
doesn't return valid data so isalpha() is compromised.
--
___
Python tracker
<http://bugs.python.
1 - 100 of 738 matches
Mail list logo