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:
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
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:
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:
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:
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
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:
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:
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
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:
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:
alignment was the only one I found which was applicable and didn't work
`!s` "works" but it's kind of a hack (of course I want string formatting, I'm
making a string!) -- then I would want to write `!s` everywhere whic
New submission from Anthony Sottile :
currently this works correctly:
```
>>> '%8s %8s' % (None, 1)
'None1'
```
but conversion to f-string fails:
```
>>> f'{None:>8} {1:>8}'
Traceback (most recent call last):
File "&q
Anthony Sottile added the comment:
this maybe shouldn't have been backported to 3.8.x as the change in compiler
flags appears to break pyc files in subtle ways:
https://stackoverflow.com/q/68910329/812183
--
nosy: +Anthony Sottile
___
P
Change by Anthony Sottile :
--
nosy: +Anthony Sottile
nosy_count: 19.0 -> 20.0
pull_requests: +26032
pull_request: https://github.com/python/cpython/pull/27516
___
Python tracker
<https://bugs.python.org/issu
New submission from Anthony Sottile :
this is a small proposal to add a new function to the functools module which
provides better profiling-compatible `@functools.wraps(...)`
the rationale comes from https://github.com/Yelp/named_decorator (which is dead
/ abandoned)
the tl;dr from there
Anthony Sottile added the comment:
here is a minimal reproduction:
```python
def iterboom():
raise AssertionError
yield 1
next(1 for x in iterboom())
```
python 3.9:
```
$ python3.9 t.py
Traceback (most recent call last):
File "/tmp/rinohtype/t.py", line 5, in
ne
New submission from Anthony Sottile :
installed from git:
```
$ git remote -v
origin https://github.com/brechtm/rinohtype.git (fetch)
origin https://github.com/brechtm/rinohtype.git (push)
$ git rev-parse HEAD
4054539bae53eaddd10291c8429a1a32aeeb4786
```
working in 3.10 b2:
```console
Anthony Sottile added the comment:
here's the traceback pytest is trying to display and crashing:
```
Traceback (most recent call last):
File "/tmp/rinohtype/venv/lib/python3.10/site-packages/_pytest/runner.py",
line 311, in from_call
result: Optional[TResult] = func
Anthony Sottile added the comment:
this appears to have regressed in 3.10 as well according to some reports on
pytest: https://github.com/pytest-dev/pytest/pull/8227#issuecomment-864327090
--
nosy: +Anthony Sottile, pablogsal
versions: +Python 3.10
Anthony Sottile added the comment:
they are directly coupled which is why I commented here
the api redesign forces O(N) lookups and O(N) constructions which directly
impact performance causing the regression
--
resolution: fixed ->
status: closed ->
Anthony Sottile added the comment:
here's the performance regressions, they affect any callers of
`distributions()` and are even worse on callers of the new apis.
a call to distributions() is about 3x slower than in 3.9
here is the setup I am using:
virtualenv venv39 -ppython3.9
venv3
Change by Anthony Sottile :
--
components: +Library (Lib)
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue44295>
___
___
Python-bugs-lis
Anthony Sottile added the comment:
*terry.reedy oops typo!
--
___
Python tracker
<https://bugs.python.org/issue44307>
___
___
Python-bugs-list mailing list
Unsub
Anthony Sottile added the comment:
@terry.reddy -- I believe your title change makes this more difficult to
understand
--
___
Python tracker
<https://bugs.python.org/issue44
New submission from Anthony Sottile :
```console
$ python3.10 -m timeit -s 'from datetime import datetime'
'datetime.now().date()'
50 loops, best of 5: 708 nsec per loop
$ python3.10 -m timeit -s 'from datetime import date' 'date.today()'
20
New submission from Anthony Sottile :
I have yet to come across a usecase where `stacklevel=1` makes sense -- usually
it is more helpful to point at the calling code than the function which is
itself warning
my proposal is to update the default for `stacklevel=` from `1` to `2`
an example
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +25093
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26497
___
Python tracker
<https://bugs.python.org/issu
New submission from Anthony Sottile :
it's missing stacklevel= -- mostly creating a bpo issue to link to
--
messages: 394953
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: self.assertDictContainsSubset warning is unhelpful
versions: Python
New submission from Anthony Sottile :
for example: https://github.com/asottile/cpython/pull/1
--
messages: 394842
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: cpython forks are spammed with dependabot PRs
___
Python
Anthony Sottile added the comment:
it does not, it restores apis but in a way which requires a huge performance
hit to avoid deprecation warnings
it also still has the 2-500x performance regression I've stated above
--
___
Python tracker
&
Anthony Sottile added the comment:
I have also shown that the performance is indeed not better in the nominal
case, as demonstrated in the first case
--
___
Python tracker
<https://bugs.python.org/issue44
Anthony Sottile added the comment:
the toil is still present, the existing, good apis are deprecated and the new,
bad apis are slow -- and the odd subclasses are still present
--
___
Python tracker
<https://bugs.python.org/issue44
Anthony Sottile added the comment:
oops, tiny typo in those code examples, they should say `group=` instead of
`name=` -- though the performance is unchanged:
(first example)
```console
$ ./venv39/bin/python t.py
0.6641988754272461
$ ./venv310/bin/python t.py
1.3172023296356201
```
(second
Anthony Sottile added the comment:
the `.select(...)` api is at least twice as slow as indexing as well:
setup:
```
virtualenv venv39 -p python3.9
venv39/bin/pip install flake8 pytest pytest-randomly
virtualenv venv39 -p python3.10
venv310/bin/pip install flake8 pytest pytest-randomly
Anthony Sottile added the comment:
also https://github.com/miurahr/aqtinstall/issues/221
(this links to importlib-metadata tracker, not sure how you missed it)
--
___
Python tracker
<https://bugs.python.org/issue44
Anthony Sottile added the comment:
I also need `.sort(key=...)` for what it's worth, the error in this issue was
just the first encountered
I think my only satisfactory outcome would be:
- the original api returns actual dicts
- the sub-api returns actual lists
- the new sele
Anthony Sottile added the comment:
> Which types are sneaky and look like built-in types but do not act like them?
well for starters, there's the tuple subclass which pretends to be a dict. but
it violates substitutability for both `tuple` and `Mapping` so it's not usef
Anthony Sottile added the comment:
personally I think they should be reverted -- they were not committed in spirit
with the backwards compatibility policy:
https://www.python.org/dev/peps/pep-0387/#making-incompatible-changes
- I don't think they were discussed thoroughly, and
Anthony Sottile added the comment:
the "what's new" mentions nothing of this break, nor the aggressive deprecation
warnings, nor the various shifted interfaces (such as this one):
https://docs.python.org/3.10/whatsnew/3.10.html#imp
New submission from Anthony Sottile :
for instance in this issue: https://bugs.python.org/issue44246
it links to 3.1/... instead of 3.10/...
--
messages: 394549
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: bpo stacktrace linkifier does not understand
New submission from Anthony Sottile :
this is breaking code that's unfortunately out of my control (vendor) -- also
it looks really wrong
```python
import importlib.metadata
print('looks like a list:')
print(importlib.metadata.distribution('pip').entry_points)
p
Anthony Sottile added the comment:
that version of flake8 uses multiprocessing (even for 1 file) -- would the ast
objects be involved in that way? (pyflakes also makes reference cyles to handle
"parent" relationships)
--
___
Pyth
Anthony Sottile added the comment:
would it maybe be helpful to bisect a history where the dataclasses / inspect
import change is introduced earlier? this would perhaps help pinpoint the
other commit which is causing this?
--
___
Python tracker
Anthony Sottile added the comment:
vstinner I showed the directions above, but here they are again:
venv\Scripts\pip install flake8==3.6.0
venv\Scripts\pip install -e . --no-deps # ignore the conflict, but fix pyflakes
--
___
Python tracker
Anthony Sottile added the comment:
ah sorry, the branch got squash-merged
this is the equivalent revision after the merge:
f3b1b44bf3d2d5927004fa1c2fcf1ab2def816b9
--
___
Python tracker
<https://bugs.python.org/issue44
Anthony Sottile added the comment:
everything in this virtualenv is pure python so I don't think it's a faulty
third party extension module
--
___
Python tracker
<https://bugs.python.o
Anthony Sottile added the comment:
I can reproduce it outside of tox using:
venv\Scripts\pip install flake8==3.6.0
venv\Scripts\pip install -e . --no-deps # ignore the conflict, but fix pyflakes
C:\Users\asott\AppData\Local\Temp\y\pyflakes>venv\Scripts\flake8.exe setup.py
C:\Users\as
New submission from Anthony Sottile :
I installed python using the installers from python.org -- I originally
reproduced this using github actions using pyflakes's testsuite
>ver
Microsoft Windows [Version 10.0.19041.985]
>venv\Scripts\python --version
Python 3.10.0b1
C:\
Anthony Sottile added the comment:
oddly enough, when I add `-X faulthandler` it passes
___
I did some research on the error message and it looks like the ubuntu
maintainers have found the same thing and reported it here:
https://bugs.python.org/issue36445
this points at (intentional
New submission from Anthony Sottile :
terribly sorry, I don't have much information to go off on this other than the
build logs from deadsnakes.
I retried this build twice and it seems it consistently fails in this position:
https://launchpadlibrarian.net/537139233/buildlog_ubuntu-b
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
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:
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
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:
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:
I'm suggesting instead of:
MatchAs(pattern=None, name='foo')
to have
MatchAs(pattern=None, name=Name('foo', ctx=Store()))
--
___
Python tracker
<https:
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:
can confirm that pytest no longer crashes
--
___
Python tracker
<https://bugs.python.org/issue43933>
___
___
Python-bug
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
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
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.
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:
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
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:
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
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 haven't looked into or thought about that yet, it might not be possible
It might also make sense to build new tokenize.py apis avoiding the
`readline()` api -- I always found it painful to work
Anthony Sottile added the comment:
Either works for me, would you be able to point me to the starting bits as to
how `_ast` becomes builtin?
--
___
Python tracker
<https://bugs.python.org/issue3
Anthony Sottile added the comment:
private api sounds fine too -- I thought it was necessary to implement the
module (as it needs external linkage) but if it isn't then even better
--
___
Python tracker
<https://bugs.python.org/i
Anthony Sottile added the comment:
you already have that right now because the `tokenize` module is exposed.
(except that every change to the tokenization requires it to be implemented
once in C and once in python)
it's much more frustrating when the two differ as well
I don't
Anthony Sottile added the comment:
I'm interested in it because the `tokenize` module is painfully slow
--
___
Python tracker
<https://bugs.python.org/i
Anthony Sottile added the comment:
Serhiy Storchaka is this still blocked? it's been a few years on either this
or the linked issue and I'm reaching for this one :)
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.
Anthony Sottile added the comment:
> Anthony: removing 'set' from 'list(set(interable))' is wrong if 'set' were
> added to remove duplicates.
It's not removed, it's changed to a set comprehension (which was added in 2.7
and 3.0)
pyupgrade
Anthony Sottile added the comment:
just noticed this PR -- you might be interested in pyupgrade which automates
some of these things -- here's (for example) `git ls-files -- Lib/idlelib |
grep '\.py$' | xargs pyupgrade --py36-plus
```diff
diff --git a/Lib/idlelib/calltip_w.p
Anthony Sottile added the comment:
attached out3.pstats / out3.svg which represent the optimization using
lru_cache instead
--
Added file: https://bugs.python.org/file49764/out3.svg
___
Python tracker
<https://bugs.python.org/issue43
Change by Anthony Sottile :
Added file: https://bugs.python.org/file49763/out3.pstats
___
Python tracker
<https://bugs.python.org/issue43014>
___
___
Python-bugs-list m
Anthony Sottile added the comment:
admittedly anecdotal but here's another data point in addition to the profiles
attached
test.test_tokenize suite before:
$ ./python -m test.test_tok
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +23130
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24311
___
Python tracker
<https://bugs.python.org/issu
Change by Anthony Sottile :
Added file: https://bugs.python.org/file49762/out2.svg
___
Python tracker
<https://bugs.python.org/issue43014>
___
___
Python-bugs-list mailin
Change by Anthony Sottile :
Added file: https://bugs.python.org/file49761/out2.pstats
___
Python tracker
<https://bugs.python.org/issue43014>
___
___
Python-bugs-list m
Change by Anthony Sottile :
Added file: https://bugs.python.org/file49760/out.svg
___
Python tracker
<https://bugs.python.org/issue43014>
___
___
Python-bugs-list mailin
New submission from Anthony Sottile :
I did some profiling (attached a few files here with svgs) of running this
script:
```python
import io
import tokenize
# picked as the second longest file in cpython
with open('Lib/test/test_socket.py', 'rb') as f:
bio = io.Byt
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
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:
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:
+peg parser individuals to nosy
--
nosy: +gvanrossum, lys.nikolaou, pablogsal
___
Python tracker
<https://bugs.python.org/issue42
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:
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 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
Change by Anthony Sottile :
--
pull_requests: +21718
pull_request: https://github.com/python/cpython/pull/22755
___
Python tracker
<https://bugs.python.org/issue40
Change by Anthony Sottile :
--
pull_requests: +21715
pull_request: https://github.com/python/cpython/pull/22752
___
Python tracker
<https://bugs.python.org/issue40
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
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
Change by Anthony Sottile :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue41767>
___
___
Python-bugs-list
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 :
--
nosy: +Anthony Sottile
nosy_count: 3.0 -> 4.0
pull_requests: +20834
pull_request: https://github.com/python/cpython/pull/21100
___
Python tracker
<https://bugs.python.org/issu
Anthony Sottile added the comment:
awesome, I'm going to work through this with someone in my discord as a demo /
mentorship opportunity -- hope that's ok!
--
___
Python tracker
<https://bugs.python.o
New submission from Anthony Sottile :
C:
https://github.com/python/cpython/blob/8b33961e4bc4020d8b2d5b949ad9d5c669300e89/Modules/_datetimemodule.c#L3183
pure python:
https://github.com/python/cpython/blob/8b33961e4bc4020d8b2d5b949ad9d5c669300e89/Lib/datetime.py#L927
this makes it difficult
Anthony Sottile added the comment:
Ćukasz: what would you recommend for downstream packagers?
I have essentially two options (assuming this isn't reverted in cpython master
which I believe makes the most sense since cpython still works fine with older
libmpdec):
- revert this indiv
1 - 100 of 403 matches
Mail list logo