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
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 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
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
Changes by Anthony Kong :
--
nosy: +Anthony.Kong
___
Python tracker
<http://bugs.python.org/issue13641>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Anthony Briggs :
--
nosy: +anthonyb, ncoghlan
versions: +Python 3.3 -Python 3.2
___
Python tracker
<http://bugs.python.org/issue6484>
___
___
Python-bug
Anthony Briggs added the comment:
Added ncoghlan to the nosy list - we're reviewing/fixing unit test coverage as
part of the sprints at PyconAU. Thanks Gnofi!
--
___
Python tracker
<http://bugs.python.org/i
New submission from Anthony Briggs :
Unlike Python 2, Python 3 warns when files aren't closed properly, which raises
lots of warnings when running tabnanny:
~/devinabox/cpython$ ./python -m tabnanny Lib/
/home/anthony/devinabox/cpython/Lib/tabnanny.py:93: ResourceWarning: unclosed
Changes by Anthony Kong :
--
nosy: +Anthony.Kong
___
Python tracker
<http://bugs.python.org/issue12853>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Anthony Long :
import unittest
from selenium import selenium
class SetupSomething(unittest.TestCase):
def setUp(self, URL):
self.selenium = selenium("localhost", , "*firefox", self.URL)
def tearDown(self):
pass
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.
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:
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
Anthony Tuininga <[EMAIL PROTECTED]> added the comment:
This patch appears to be mostly duplicated by patch 2125 which has been
accepted. Would it be helpful if I separated out the parts that have now
been accepted?
___
Python tracker <[EMAIL
Anthony Lenton <[EMAIL PROTECTED]> added the comment:
This doesn't happen to me with 2.6 compiled from HEAD, or with 2.5.2
shipped with Ubuntu Hardy.
In both cases the output is:
Contents of text box: '123456789\n123456789\n'
-
Anthony Lenton <[EMAIL PROTECTED]> added the comment:
In http://bugs.python.org/issue754016 there's already a discussion about
this.
The RFC that urlparse is following (rfc 1808) requires the net_loc
component to start with // even if the scheme component is missing,
which is why ur
Changes by Anthony Lenton <[EMAIL PROTECTED]>:
--
nosy: +facundobatista
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2569>
___
__
Anthony Lenton <[EMAIL PROTECTED]> added the comment:
I agree with facundobatista that the patch is bad, but for a different
reason: it now breaks with:
>>> import urlparse
>>> urlparse.urlparse ('http:')
Traceback (most recent call last):
File "&
Anthony Lenton <[EMAIL PROTECTED]> added the comment:
I don't really think the MIMEBase class is supposed to be used like
this, or at all: it behaves more like a Multipart message in that it
expects to carry a list of MIMEBase objects as a payload (not a string!)
though it doesn
Anthony Lenton <[EMAIL PROTECTED]> added the comment:
I confirm that the bug occurs with Python 2.5.1 on Windows XP. Also,
anglocelt's fix worked fine for me.
--
nosy: +elachuni
___
Python tracker <[EMAIL PROTECTED]>
<ht
Anthony Lenton <[EMAIL PROTECTED]> added the comment:
It's probably just a typo from copying from an editor, but there is a
bug in the workaround. It should be:
maxRead = 100
class MySSL (imaplib.IMAP4_SSL):
def read (self, n):
#print "..Attempting to read %d bytes
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
Anthony Lenton added the comment:
Attached is an diff against trunk that adds philfr's suggesitions. I've
also added a test file for testing url parsing, so's these things stay
fixed. Updated Misc/NEWS. No doc or functionallity modified.
--
nosy: +elachuni, facundobat
Changes by Anthony Tuininga <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file8385/_msi.patch.txt
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Anthony Tuininga <[EMAIL PROTECTED]> added the comment:
With apologies for the delay, I have modified the patch to remove the
stuff that has been added already. Some of the other changes are to make
use of new C API functionality but they can be ignored, if desired. The
changes that are re
Anthony Tuininga <[EMAIL PROTECTED]> added the comment:
This problem also occurs in the bdist_msi command.
--
versions: +Python 2.5, Python 2.6
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
New submission from Anthony Awtrey <[EMAIL PROTECTED]>:
Here is the reproduction process. Get Windows box running Vista 64-bit.
Download the Python 2.6 64-bit version. Write a script that imports
escape from saxutils. See this:
C:\Python26>python.exe example_xml_script.py > out.x
Anthony Tuininga added the comment:
Removing cmp() breaks distutils. I get the following exception, for
example using the just released version 3.0.1:
Traceback (most recent call last):
File "setup.py", line 318, in
classifiers = classifiers)
File "c:\Python30\lib\di
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:
Anthony Sottile added the comment:
In case it helps someone else, `insstr` seems to not have this limitation
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue8
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +15028
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/15308
___
Python tracker
<https://bugs.python.org/issu
Change by Anthony Sottile :
--
nosy: +Anthony Sottile
versions: +Python 3.8, Python 3.9 -Python 3.5
___
Python tracker
<https://bugs.python.org/issue20
Anthony Sottile added the comment:
I threw together a flake8 plugin which checks for these usage patterns:
https://github.com/asottile/flake8-2020
| Code | Description |
||-|
| YTT101
Anthony Sottile added the comment:
neat, this looks like a similar api to astpretty:
https://github.com/asottile/astpretty
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue37
Change by Anthony Sottile :
--
pull_requests: +15320
pull_request: https://github.com/python/cpython/pull/15653
___
Python tracker
<https://bugs.python.org/issue36
Anthony Sottile added the comment:
oops! thanks for the quick fix, I'll double check where I copied this from
since it might have the same bug
--
___
Python tracker
<https://bugs.python.org/is
Anthony Sottile added the comment:
https://github.com/python/cpython/pull/6398/files#diff-fb54fd281a2569006594f7edc6ad90f9R744
hmm I assume _PyDict_GetItemId has different reference semantics?
--
___
Python tracker
<https://bugs.python.
New submission from Anthony Sottile :
https://linux.die.net/man/3/set_escdelay
https://linux.die.net/man/3/set_tabsize
I'd like to help with this, but I don't even know where to start with
argumentclinic -- any points would be greatly appreciated
presumably I should also add g
New submission from Anthony Tuininga :
Running the suggested code found at
https://docs.python.org/3.8/whatsnew/3.8.html regarding the new
importlib.metadata module
from importlib.metadata import version, requires, files
version('requests')
yields the error
Traceback (most recent
Anthony Tuininga added the comment:
Yes. I had tried b3 earlier, installed b4 over b3 and then rc1 over b4.
Removing the cruft using the command you specified caused the problem to go
away.
--
___
Python tracker
<https://bugs.python.
Anthony Sottile added the comment:
Try with `sh`:
(it prompts for continuation, I pressed ^D to end it)
$ export F=$'\''
>
>
>
>
> sh: 8: Syntax error: Unterminated quoted string
dollar-sign strings are a `bash` extension, I don't think they're s
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +16467
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16938
___
Python tracker
<https://bugs.python.org/issu
Anthony Sottile added the comment:
should we backport a documentation change for this? (the deprecatedremoved says
4.0 currently)
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue37
Anthony Sottile added the comment:
ah, I'll add those too -- I can do that in the current PR
--
___
Python tracker
<https://bugs.python.org/issue38312>
___
___
New submission from Anthony Baire :
We developed an alternate asyncio TLS transport based on GnuTLS
(https://pypi.org/project/aio-gnutls-transport/). In this project we want to
support half-closed TLS connections (WriteTransport.write_eof()).
Unfortunately StreamReaderProtocol won
Change by Anthony Sottile :
--
nosy: +Anthony Sottile
nosy_count: 7.0 -> 8.0
pull_requests: +23611
pull_request: https://github.com/python/cpython/pull/24850
___
Python tracker
<https://bugs.python.org/iss
Anthony Sottile added the comment:
I took a stab at improving the error message (see the linked PR)
$ ./python -c 'import tarfile; tarfile.open("Lib/test/testtar.tar.xz")'
Traceback (most recent call last):
File "", line 1, in
File "/home/asottile/work
New submission from Anthony Flury :
A commonly asked question on Quora is 'What do *args and **kwargs' mean ?
While it is relatively easy for community to answer these questions the search
tool on the standard documentation doesn't make it easy.
I understand that 'args
Anthony Flury added the comment:
Is PR 25045 the correct Pull request - this Issue is a documentation change -
the linked PR is related to Issue 43433 (a change to xmlrpc.client ?)
--
___
Python tracker
<https://bugs.python.org/issue43
anthony shaw added the comment:
Guido, regen.vcxproj targets 142 as the SDK version, which is most likely a
mistake.
The other projects are part of the main PCBuild.sln solution, which has a
variable for the base SDK version.
If you need to change it quickly, you can either open it in VS
New submission from Anthony Flury :
The behavior of a%b when a is positive and b is negative can be suprising.
I understand that the behavior is so that the identity
a = (a//b)*b + a%b
can be preserved regardless of the signs of a or b.
but the result is different from other languages
Anthony Flury added the comment:
I take your point about warnings etc - but when you come from other languages
the Python behavior can initially be very surprising.
The reference section has always seemed to be a very technical document,
certainly not targeted at the usual audience of
Anthony Flury added the comment:
Should the data structures page also link to the FAQ. The problem with the FAQ
is that most beginners don't even know that == vs 'is' is actually a question
they need to ask, and therefore they aren't likely to look at the FAQ
Anthony Flury added the comment:
I am working on a pull request for this.
--
___
Python tracker
<https://bugs.python.org/issue43737>
___
___
Python-bugs-list m
Change by Anthony Flury :
--
keywords: +patch
pull_requests: +23957
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25220
___
Python tracker
<https://bugs.python.org/issu
Change by Anthony Flury :
--
pull_requests: +24015
pull_request: https://github.com/python/cpython/pull/25279
___
Python tracker
<https://bugs.python.org/issue43
Change by Anthony Flury :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue43737>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Anthony Flury :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
___
Python tracker
<https://bugs.python.org/issu
New submission from Anthony Sottile :
I realize this is unlikely to be a helpful report, but something that changed
between 3.9.3 and 3.9.4 has caused the build to break on (admittedly a strange
platform) ppc64le
I attached the build log (zipped because otherwise it's too big ?)
The
Anthony Sottile added the comment:
hmmm strange, the only changes in 3.9.4 are a revert -- perhaps this is a
flakey bug in gcc and not actionable
I've clicked rebuild on my build, maybe it'll magically fix it
plus xenial is almost end of lifed so I doubt anyone cares about th
Anthony Flury added the comment:
I fundamentally disagree with closing this - I know that this and many other
'quirks' catch beginners out, and the tutorial is what they use to learn.They
don't look in the reference document - it is too dense in BNF definitions which
turns
Anthony Sottile added the comment:
here's quite a few other cases as well -- I'd love for this to be clarified in
PEP8 such that I can rationalize crafting a rule for it in `pycodestyle` --
https://github.com/PyCQA/pycodestyle/issues/371
--
nosy: +Antho
Anthony Sottile added the comment:
a rebuild succeeded so I'm ok closing this :shrug:
--
stage: -> resolved
status: pending -> closed
___
Python tracker
<https://bugs.python.
New submission from Anthony Sottile :
This is breaking pytest for failed assertions:
https://github.com/pytest-dev/pytest/pull/8227
It also breaks the traceback in the output below
Here's a minimal example:
```python
class Boom:
def __enter__(self):
return self
def __e
Change by Anthony Sottile :
--
nosy: +Anthony Sottile
nosy_count: 14.0 -> 15.0
pull_requests: +24316
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/25596
___
Python tracker
<https://bugs.python.org/i
Anthony Sottile added the comment:
can confirm that pytest no longer crashes
--
___
Python tracker
<https://bugs.python.org/issue43933>
___
___
Python-bug
New submission from Anthony Sottile :
I'm looking at adding support to `match` for pyflakes, and the first impression
I have is that `MatchAs` is unnecessarily different from `Name` with
`ctx=Store()`
if it were represented as the latter pyflakes would not require special
handling of `
Anthony Sottile added the comment:
I'm suggesting instead of:
MatchAs(pattern=None, name='foo')
to have
MatchAs(pattern=None, name=Name('foo', ctx=Store()))
--
___
Python tracker
<https:
Anthony Sottile added the comment:
and actually, now that I look close it would be useful for `MatchStar` and
`MatchMapping` to also use a `Name(..., ctx=Store())` for their respective
parameters as well
--
___
Python tracker
<ht
Anthony Sottile added the comment:
at least for static analysis of other python constructs it's very convenient to
know from a `Name` node alone whether it's being used in a read or write
context -- without this information an ast traversal needs to maintain more
information abo
Anthony Sottile added the comment:
ah yeah that's the `asname` ast change -- if you use the unreleased main branch
it has a fix for that
--
___
Python tracker
<https://bugs.python.org/is
Change by Anthony Sottile :
--
nosy: -Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue40465>
___
___
Python-bugs-list mailing list
Unsubscribe:
Anthony Sottile added the comment:
I've released pytest 6.2.4 for the other breakage (which is unrelated to this
bpo -- it was the asname source position issue)
--
___
Python tracker
<https://bugs.python.org/is
1 - 100 of 738 matches
Mail list logo