[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

[issue44692] Const unfolding in parser with negative numbers doesn't match float/int behaviour

2021-07-20 Thread anthony shaw
New submission from anthony shaw : Powers with negative bases do not observe the same rules that float_pow/long_pow do when it comes to returning negative results/ Example: > -2 ** 2 -4 >>> x = -2 >>> y = 2 >>> x ** y 4 >>> -2. ** 2. -4.0 >>&

[issue44692] Const folding in parser with negative numbers doesn't match float/int behaviour

2021-07-20 Thread anthony shaw
Change by anthony shaw : -- title: Const unfolding in parser with negative numbers doesn't match float/int behaviour -> Const folding in parser with negative numbers doesn't match float/int behaviour ___ Python tracker <https:/

[issue44692] Const folding in parser with negative numbers doesn't match float/int behaviour

2021-07-20 Thread anthony shaw
anthony shaw added the comment: Thanks! I didn't realise it applied the negative operator instead of loading the constant value. -- ___ Python tracker <https://bugs.python.org/is

[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:

[issue39144] Align ctags and etags targets and include Python stdlib

2019-12-27 Thread anthony shaw
New submission from anthony shaw : make tags will include - Modules/_ctypes/ where as make TAGS will not. Also, neither include the Python source files for the standard library, which both etags and ctags are capable of handling. PR to follow -- components: Build messages: 358917

[issue39144] Align ctags and etags targets and include Python stdlib

2019-12-27 Thread anthony shaw
anthony shaw added the comment: Also, make tags will reset the "tags" file, whereas, make TAGS will not. If you ran "make tags" then "make TAGS" you will have a corrupt etags file -- ___ Python tracker <h

[issue39144] Align ctags and etags targets and include Python stdlib

2019-12-27 Thread anthony shaw
Change by anthony shaw : -- keywords: +patch pull_requests: +17166 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17721 ___ Python tracker <https://bugs.python.org/issu

[issue39160] ./configure --help has inconsistencies in style

2019-12-29 Thread anthony shaw
New submission from anthony shaw : I've noticed that ./configure --help is inconsistent. - The way default values are shared - The way enumerated - The verbs used (e.g. enable, set) - Some --with-xyx and some --with(out-xyz) - Some start with capitals, others don't Also, many of

[issue39160] ./configure --help has inconsistencies in style

2019-12-29 Thread anthony shaw
anthony shaw added the comment: Current Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-universalsdk

[issue39160] ./configure --help has inconsistencies in style

2019-12-29 Thread anthony shaw
anthony shaw added the comment: Updated version based on principles: - Should not specify --with(out) in help string - Sentences should start with lowercase (as autoconf generates the builtin string with lower case) - --with-xyx=VALUE will be described as "overriding" - --with-x

[issue39160] ./configure --help has inconsistencies in style

2019-12-29 Thread anthony shaw
Change by anthony shaw : -- keywords: +patch pull_requests: +17185 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17747 ___ Python tracker <https://bugs.python.org/issu

[issue39160] ./configure --help has inconsistencies in style

2019-12-29 Thread anthony shaw
Change by anthony shaw : -- nosy: +anthonypjshaw ___ Python tracker <https://bugs.python.org/issue39160> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39160] ./configure --help has inconsistencies in style

2019-12-29 Thread anthony shaw
Change by anthony shaw : -- nosy: +twouters ___ Python tracker <https://bugs.python.org/issue39160> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw
Change by anthony shaw : -- nosy: +ned.deily ___ Python tracker <https://bugs.python.org/issue39162> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw
New submission from anthony shaw : ./configure && make -j4 is returning: Failed to build these modules: _tkinter I'm running macOS 10.15.2, with the SDK installed using `xcode-select --install` (no funny business) /Libr

[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw
anthony shaw added the comment: I also can't see how this condition would ever match, since macosx_sdk_root() is not in the list being iterated upon, https://github.com/python/cpython/blob/master/setup.py#L1774 -- ___ Python tracker &

[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw
Change by anthony shaw : -- keywords: +patch pull_requests: +17189 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17753 ___ Python tracker <https://bugs.python.org/issu

[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw
anthony shaw added the comment: This comes down to a logic bug in detect_tkinter_darwin(), shown in https://github.com/python/cpython/pull/17753/files#r361956102 -- ___ Python tracker <https://bugs.python.org/issue39

[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2019-12-31 Thread Anthony Wee
Anthony Wee added the comment: It looks like there has been a regression in the fix for this issue. The commit below introduced a NULL check which causes a call to _PyPathConfig_Init() to be skipped if _Py_dll_path == NULL. It seems like the check should be "if (_Py_dll_path !=

[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

[issue39185] Add quiet and detailed verbosity levels to build.bat

2020-01-01 Thread anthony shaw
New submission from anthony shaw : The build.bat script (windows build) has a flag for verbose, which sets the msbuild verbosity level to normal. The default level is minimal. The quiet and detailed levels would also be useful for development. -- components: Windows messages: 359178

[issue39185] Add quiet and detailed verbosity levels to build.bat

2020-01-01 Thread anthony shaw
Change by anthony shaw : -- keywords: +patch pull_requests: +17224 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17791 ___ Python tracker <https://bugs.python.org/issu

[issue39186] Windows installer instructions refer to mercurial

2020-01-01 Thread anthony shaw
New submission from anthony shaw : Very minor, but the instructions in Tools/msi/readme.txt tell the user to ensure hg.exe is in PATH, but the scripts use Git. -- components: Windows messages: 359179 nosy: anthonypjshaw, paul.moore, steve.dower, tim.golden, zach.ware priority: normal

[issue39186] Windows installer instructions refer to mercurial

2020-01-01 Thread anthony shaw
Change by anthony shaw : -- keywords: +patch pull_requests: +17225 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17792 ___ Python tracker <https://bugs.python.org/issu

[issue34946] inspect.getcallargs is marked as deprecated in documentation, but doesn't issue a DeprecationWarning when used

2020-01-03 Thread anthony shaw
anthony shaw added the comment: Resolved by another bpo -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-01-03 Thread Anthony Wee
Change by Anthony Wee : -- pull_requests: +17244 pull_request: https://github.com/python/cpython/pull/17818 ___ Python tracker <https://bugs.python.org/issue29

[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:

[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-01-07 Thread Anthony Wee
Anthony Wee added the comment: Thank you Steve! I'm still seeing python3.dll being loaded from \DLLs\python3.dll. _Py_CheckPython3() uses Py_GetPrefix() as a prefix for \DLLs\python3.dll. It looks like Py_SetPath() sets the _Py_path_config.prefix to "", but I'm not seei

[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-01-07 Thread Anthony Wee
Anthony Wee added the comment: Hm, I'm seeing _Py_CheckPython3() use Py_GetPrefix(), which uses _Py_path_config.prefix? https://github.com/python/cpython/blob/c02b41b1fb115c87693530ea6a480b2e15460424/PC/getpathp.c#L1185 -- ___ Python tr

[issue39374] Key in sort -> Callable Object instead of function

2020-01-17 Thread Anthony Flury
Anthony Flury added the comment: I will submit a documentation only fix for this in the next day or so. -- nosy: +anthony-flury ___ Python tracker <https://bugs.python.org/issue39

[issue39401] Unsafe dll loading in getpathp.c on Win7

2020-01-20 Thread Anthony Wee
New submission from Anthony Wee : On Win7, running Python in the terminal will attempt to load the "api-ms-win-core-path-l1-1-0.dll" from various paths outside of the Python directory and the C:\Windows\System32 directories. This behavior can be verified using Process Monitor (see

[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

[issue39498] Signpost security considerations in library

2020-01-29 Thread anthony shaw
New submission from anthony shaw : Within the documentation, there are some really important security considerations for standard library modules. e.g. subprocess, ssl, pickle, xml. There is currently no "index" of these, so you have to go hunting for them. They're easter

[issue39498] Signpost security considerations in library

2020-01-29 Thread anthony shaw
Change by anthony shaw : -- keywords: +patch pull_requests: +17647 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18272 ___ Python tracker <https://bugs.python.org/issu

[issue39401] [CVE-2020-8315] Unsafe dll loading in getpathp.c on Win7

2020-01-30 Thread Anthony Wee
Anthony Wee added the comment: > Thanks Anthony for the report! I included your name as the reporter, though I > don't see it on any of the pages. No problem! Thanks Steve, Eryk, and Victor for jumping on this! -- ___ Python trac

[issue30155] Add ability to get/set tzinfo on datetime instances in C API

2020-02-10 Thread Anthony Tuininga
Anthony Tuininga added the comment: Any progress on this? -- ___ Python tracker <https://bugs.python.org/issue30155> ___ ___ Python-bugs-list mailing list Unsub

[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

[issue37695] Incorrect error message for `unget_wch(bytes_object)`

2020-03-16 Thread Anthony Sottile
Change by Anthony Sottile : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36478] backport of pickle fixes to Python 3.5.7 uses C99 for loops

2020-03-16 Thread Anthony Sottile
Change by Anthony Sottile : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue35312] lib2to3.pgen2.parse.ParseError is not roundtrip pickleable

2020-03-16 Thread Anthony Sottile
Change by Anthony Sottile : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

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

2020-03-16 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +18379 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19030 ___ Python tracker <https://bugs.python.org/issu

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

2020-03-17 Thread Anthony Sottile
Anthony Sottile added the comment: one example is here: https://github.com/pre-commit/pre-commit/blob/bb6f1efe63c168d9393d520bd60e16c991a57059/pre_commit/store.py#L137-L139 where I would want cleanup in the exceptional case another (related but different) closed-source use case involves

<    1   2   3   4   5   6   7   8   >