[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Anthony Sottile
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

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Anthony Sottile
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

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Anthony Sottile
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

[issue47152] Reorganize the re module sources

2022-04-02 Thread Anthony Sottile
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

[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-02 Thread Anthony Sottile
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

[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-02 Thread Anthony Sottile
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

[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-02 Thread Anthony Sottile
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

[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-04 Thread Anthony Sottile
Change by Anthony Sottile : -- nosy: -Anthony Sottile ___ Python tracker <https://bugs.python.org/issue45847> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR'

2019-08-13 Thread Anthony Sottile
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

[issue20490] Show clear error message on circular import

2019-08-15 Thread Anthony Sottile
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

[issue20490] Show clear error message on circular import

2019-08-15 Thread Anthony Sottile
Change by Anthony Sottile : -- nosy: +Anthony Sottile versions: +Python 3.8, Python 3.9 -Python 3.5 ___ Python tracker <https://bugs.python.org/issue20

[issue37636] Deprecate slicing and ordering operations on sys.version

2019-08-24 Thread Anthony Sottile
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

[issue37995] Multiline ast.dump()

2019-08-31 Thread Anthony Sottile
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

[issue36853] inconsistencies in docs builds (Sphinx 2)

2019-09-02 Thread Anthony Sottile
Change by Anthony Sottile : -- pull_requests: +15320 pull_request: https://github.com/python/cpython/pull/15653 ___ Python tracker <https://bugs.python.org/issue36

[issue38090] test_ctypes is leaking references

2019-09-10 Thread Anthony Sottile
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

[issue38090] test_ctypes is leaking references

2019-09-10 Thread Anthony Sottile
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.

[issue38312] curses: add `set_tabsize` and `set_escdelay`

2019-09-28 Thread Anthony Sottile
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

[issue38570] Shlex does not parse commands containing single quotes correctly

2019-10-25 Thread Anthony Sottile
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

[issue38312] curses: add `set_tabsize` and `set_escdelay`

2019-10-26 Thread Anthony Sottile
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

[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2019-10-28 Thread Anthony Sottile
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

[issue38312] curses: add `set_tabsize` and `set_escdelay`

2019-10-29 Thread Anthony Sottile
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> ___ ___

[issue8978] "tarfile.ReadError: file could not be opened successfully" if compiled without zlib

2021-03-13 Thread Anthony Sottile
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

[issue8978] "tarfile.ReadError: file could not be opened successfully" if compiled without zlib

2021-03-15 Thread Anthony Sottile
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

[issue43782] Failure to build from source on ppc64le on ubuntu xenial

2021-04-08 Thread Anthony Sottile
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

[issue43782] Failure to build from source on ppc64le on ubuntu xenial

2021-04-08 Thread Anthony Sottile
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

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Anthony Sottile
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

[issue43782] Failure to build from source on ppc64le on ubuntu xenial

2021-04-15 Thread Anthony Sottile
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.

[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-04-24 Thread Anthony Sottile
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

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-25 Thread Anthony Sottile
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

[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-04-30 Thread Anthony Sottile
Anthony Sottile added the comment: can confirm that pytest no longer crashes -- ___ Python tracker <https://bugs.python.org/issue43933> ___ ___ Python-bug

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Anthony Sottile
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 `

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Anthony Sottile
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:

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Anthony Sottile
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

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Anthony Sottile
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

[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-05-01 Thread Anthony Sottile
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

[issue40465] Deprecate the optional *random* argument to random.shuffle()

2021-05-03 Thread Anthony Sottile
Change by Anthony Sottile : -- nosy: -Anthony Sottile ___ Python tracker <https://bugs.python.org/issue40465> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-05-04 Thread Anthony Sottile
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

[issue44043] 3.10 b1 armhf Bus Error in hashlib test: test_gil

2021-05-04 Thread Anthony Sottile
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

[issue44043] 3.10 b1 armhf Bus Error in hashlib test: test_gil

2021-05-05 Thread Anthony Sottile
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

[issue44184] crash on windows invoking flake8 under tox

2021-05-19 Thread Anthony Sottile
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:\

[issue44184] crash on windows invoking flake8 under tox

2021-05-19 Thread Anthony Sottile
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

[issue44184] crash on windows invoking flake8

2021-05-20 Thread Anthony Sottile
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

[issue44184] crash on windows invoking flake8

2021-05-20 Thread Anthony Sottile
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

[issue44184] crash on windows invoking flake8

2021-05-20 Thread Anthony Sottile
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

[issue44184] crash on windows invoking flake8

2021-05-20 Thread Anthony Sottile
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

[issue44184] crash on windows invoking flake8

2021-05-21 Thread Anthony Sottile
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

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-27 Thread Anthony Sottile
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

[issue44247] bpo stacktrace linkifier does not understand 3.10+

2021-05-27 Thread Anthony Sottile
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

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-27 Thread Anthony Sottile
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

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-27 Thread Anthony Sottile
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

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-27 Thread Anthony Sottile
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

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Anthony Sottile
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

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Anthony Sottile
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

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Anthony Sottile
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

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Anthony Sottile
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

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Anthony Sottile
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

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Anthony Sottile
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

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread Anthony Sottile
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 &

[issue44277] cpython forks are spammed with dependabot PRs

2021-05-31 Thread Anthony Sottile
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

[issue44295] self.assertDictContainsSubset warning is unhelpful

2021-06-02 Thread Anthony Sottile
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

[issue44295] self.assertDictContainsSubset warning is unhelpful

2021-06-02 Thread Anthony Sottile
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

[issue44296] Should warnings.warn default to stacklevel=2?

2021-06-02 Thread Anthony Sottile
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

[issue44307] date.today() is 2x slower than datetime.now().date()

2021-06-03 Thread Anthony Sottile
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

[issue44307] date.today() is half as fast as datetime.now().date()

2021-06-04 Thread Anthony Sottile
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

[issue44307] date.today() is half as fast as datetime.now().date()

2021-06-04 Thread Anthony Sottile
Anthony Sottile added the comment: *terry.reedy oops typo! -- ___ Python tracker <https://bugs.python.org/issue44307> ___ ___ Python-bugs-list mailing list Unsub

[issue44295] self.assertDictContainsSubset warning is unhelpful

2021-06-07 Thread Anthony Sottile
Change by Anthony Sottile : -- components: +Library (Lib) type: -> behavior ___ Python tracker <https://bugs.python.org/issue44295> ___ ___ Python-bugs-lis

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-06-08 Thread Anthony Sottile
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

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-06-08 Thread Anthony Sottile
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 ->

[issue44297] Frame with -1 line number

2021-06-18 Thread Anthony Sottile
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

[issue44297] Frame with -1 line number

2021-06-18 Thread Anthony Sottile
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

[issue44459] 3.10b2 -> 3.10b3 regression in importlib.metadata for rinoh

2021-06-18 Thread Anthony Sottile
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

[issue44297] Frame with -1 line number

2021-06-18 Thread Anthony Sottile
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

[issue44467] profiling-compatible functools.wraps

2021-06-20 Thread Anthony Sottile
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

[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2021-07-31 Thread Anthony Sottile
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

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2021-08-24 Thread Anthony Sottile
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

[issue45165] alighment format for nullable values

2021-09-10 Thread Anthony Sottile
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

[issue45165] alighment format for nullable values

2021-09-10 Thread Anthony Sottile
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

[issue45548] Update Modules/Setup

2021-10-27 Thread Anthony Sottile
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

[issue39214] Add curses.window.in_wch

2021-11-01 Thread Anthony Sottile
Anthony Sottile added the comment: rebased this onto 3.11 -- versions: +Python 3.11 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue39214> ___ ___

[issue44295] self.assertDictContainsSubset warning is unhelpful

2021-11-01 Thread Anthony Sottile
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

[issue38769] generators are currently hashable

2019-11-11 Thread Anthony Sottile
New submission from Anthony Sottile : We recently found a bug in one of our codebases that looked ~roughly like this: class C: ... def __hash__(self): return hash((v for k, v in sorted(self.__dict__.items( which resulted in a production bug The *intention* was to hash a

[issue38769] generators are currently hashable

2019-11-11 Thread Anthony Sottile
Anthony Sottile added the comment: :shrugs: it did go through a round of code review but was simply missed -- the testing bit is fair there are other such mutable objects in python which do define __hash__ = None such as list and dict

[issue38769] generators are currently hashable

2019-11-11 Thread Anthony Sottile
Anthony Sottile added the comment: function objects are immutable though -- ___ Python tracker <https://bugs.python.org/issue38769> ___ ___ Python-bugs-list m

[issue38769] generators are currently hashable

2019-11-11 Thread Anthony Sottile
Anthony Sottile added the comment: I think I'm missing what you're saying, apologies I'm probably confused :( -- ___ Python tracker <https://bugs.pyt

[issue38883] Path.home() should ignore HOME env var like os.path.expanduser()

2019-11-21 Thread Anthony Sottile
Change by Anthony Sottile : -- nosy: +Anthony Sottile ___ Python tracker <https://bugs.python.org/issue38883> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37032] Add CodeType.replace() method

2019-12-31 Thread Anthony Sottile
Change by Anthony Sottile : -- pull_requests: +17209 pull_request: https://github.com/python/cpython/pull/17776 ___ Python tracker <https://bugs.python.org/issue37

[issue39214] Add curses.window.in_wch

2020-01-04 Thread Anthony Sottile
New submission from Anthony Sottile : (I've already got a patch for this, just making the necessary issue) curses.window.inch is pretty useless for any non-ascii character -- components: Extension Modules messages: 359309 nosy: Anthony Sottile priority: normal severity: normal s

[issue39214] Add curses.window.in_wch

2020-01-04 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +17253 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17825 ___ Python tracker <https://bugs.python.org/issu

[issue39215] Type Annotation of nested function with positional only arguments triggers SystemError

2020-01-04 Thread Anthony Sottile
New submission from Anthony Sottile : def f(): def g(arg: int, /): pass f() $ python3.9 t2.py Traceback (most recent call last): File "/home/asottile/workspace/t2.py", line 5, in f() File "/home/asottile/workspace/t2.py", line 2, in f def g(arg:

[issue39215] Type Annotation of nested function with positional only arguments triggers SystemError

2020-01-04 Thread Anthony Sottile
Anthony Sottile added the comment: Looks as though annotations are using `LOAD_NAME` when they should probably use `LOAD_GLOBAL`? ``` $ diff -u <(python3.9 -m dis t2.py | sed 's/0x[a-f0-9]*/0xdeadbeef/g;s/t2\.py/FILENAME/g') <(python3.9 -m dis t3.py | sed 's/0x[a-f0-

[issue39215] Type Annotation of nested function with positional only arguments triggers SystemError

2020-01-04 Thread Anthony Sottile
Anthony Sottile added the comment: this triggers an assertion when run with debug enabled: $ gdb ./python GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> T

[issue39215] Type Annotation of nested function with positional only arguments triggers SystemError

2020-01-04 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +17254 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17826 ___ Python tracker <https://bugs.python.org/issu

[issue39216] ast_opt.c -- missing posonlyargs?

2020-01-04 Thread Anthony Sottile
New submission from Anthony Sottile : while fixing bpo-39215, I noticed that there seems to be a place here where posonlyargs was missed: https://github.com/python/cpython/blob/7dc72b8d4f2c9d1eed20f314fd6425eab66cbc89/Python/ast_opt.c#L617-L627 not sure if this is intentional or not -- happy

[issue39216] ast_opt.c -- missing posonlyargs?

2020-01-05 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +17264 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17837 ___ Python tracker <https://bugs.python.org/issu

[issue39236] [venv] Adding a .gitignore file to virtual environments

2020-01-06 Thread Anthony Sottile
Change by Anthony Sottile : -- nosy: +Anthony Sottile ___ Python tracker <https://bugs.python.org/issue39236> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31405] shutil.which doesn't find files without PATHEXT extension on Windows

2020-01-21 Thread Anthony Sottile
Anthony Sottile added the comment: should I open a new issue for this, or is this an appropriate task to add to this discussion shutil.which also doesn't apply `PATHEXT` when the path contains a directory separator C:\Users\IEUser\astpretty>venv\Scripts\python --version Python

[issue31405] shutil.which doesn't find files without PATHEXT extension on Windows

2020-01-22 Thread Anthony Sottile
Anthony Sottile added the comment: sure, it's the standard PATHEXT (basically a fresh vm from modern.ie) -- the only reason I noticed this is I was reading the source: https://github.com/python/cpython/blob/5bbac8cbdf140ebce446ea4e7db2b20a5d7b8402/Lib/shutil.py#L1367-L1373 C:\Users\I

[issue39656] shebanged scripts can escape from `venv` depending on how it was created

2020-02-16 Thread Anthony Sottile
New submission from Anthony Sottile : This is distilled from a larger example to be small/silly, however this caused real problems A script which was intended for python3.6 exactly was written as follows: ``` #!/usr/bin/env python3.6 ... ``` when creating a virtualenv with `python3.6 -m

[issue9685] tuples should remember their hash value

2020-03-15 Thread Anthony Sottile
Anthony Sottile added the comment: hit this today unfortunately -- I'm working with some pretty complex (and nested) `typing.NamedTuple` objects and the lack of caching here results in quite the slowdown (in my macro benchmarks it's the difference between a render pass taking 180m

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-16 Thread Anthony Sottile
Anthony Sottile added the comment: I would certainly like to see this, it would eliminate my last few hand rolled temporary directory contexts Mauro would you be interested in re-posting this patch as a PR to github? (or allowing someone else to carry your patch forward?) -- nosy

  1   2   3   4   5   >