[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2010-01-12 Thread Alex
Alex added the comment: Ugh, I haven't had the time to work on this, just wanted to note that this now applies to 2.7 as well since set literals were backported. -- ___ Python tracker <http://bugs.python.org/i

[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2010-01-12 Thread Alex
Alex added the comment: David, I think it should use frozen set since doing it this way could actually increase the time the operation takes (which is certainly not our goal!). Plus marshall.c already handles frozenset, so I don't think it's that much

[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2010-01-12 Thread Alex
Alex added the comment: The patch looks more or less right to me (but I'm far from an expert). It needs tests in the peephole tests though. -- ___ Python tracker <http://bugs.python.org/i

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

2009-05-27 Thread Alex
New submission from Alex : Basically whenever you have a LOAD_CONST opcode, follwed by a LOAD_ATTR you can replace both with a single LOAD_CONST. This optimizes things like ", ".join or "{} {}".format (in my totally unscientific byte code hackery it's about a 30% s

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

2009-05-27 Thread Alex
Alex added the comment: Here's my work so far, it seems to work as described. Except for the fact that pyc creation with anything containign something with this optimization will give a valueerror on bad marshall data, from trying to marshall the method I assume. -- keywords: +

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

2009-05-27 Thread Alex
Alex added the comment: Small update so I don't change whitespace all over the plcae. -- Added file: http://bugs.python.org/file14099/python_const_fold.diff ___ Python tracker <http://bugs.python.org/i

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

2009-05-27 Thread Alex
Alex added the comment: Switch to using memset instead of a forloop. -- Added file: http://bugs.python.org/file14100/python_const_fold.diff ___ Python tracker <http://bugs.python.org/issue6

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

2009-05-27 Thread Alex
Alex added the comment: I now *almost* have PyCFunctions marshalling, they seem to marhshall ok but fail on unmarshalling. I think the whitespace stuff may have crept back in, sorry :( -- Added file: http://bugs.python.org/file14101/python_const_fold.diff

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

2009-05-28 Thread Alex
Alex added the comment: Optimization now works in the shell fine, and marshal.loads(marshal.dumps(''.join)) works fine in the shell. However when I try to run the tests the import of collections.namedtuple causes the ValueError bad marshal data to appear, and I don't know why.

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

2009-05-28 Thread Alex
Alex added the comment: Fully functional. -- Added file: http://bugs.python.org/file14106/python_const_fold.diff ___ Python tracker <http://bugs.python.org/issue6

[issue8758] BUILD_LIST followed by BINARY_SUBSCR can be optimized to a BUILD_TUPLE if all members of the list are constants

2010-05-18 Thread Alex
New submission from Alex : We do the same thing for a BUILD_LIST followed by a COMPARE_OP (in). -- components: Interpreter Core messages: 106008 nosy: alex priority: normal severity: normal status: open title: BUILD_LIST followed by BINARY_SUBSCR can be optimized to a BUILD_TUPLE if

[issue8585] zipimporter.find_module is untested

2010-08-05 Thread Alex
Alex added the comment: Gah, I lost track of this one after I realized the bug I was chasing after (originally thought to be in PyPy's zipimpoter) was actually in Django. I'll try to get to this over the weekend. -- ___ Python trac

[issue6143] IDLE - an extension to clear the shell window

2017-02-13 Thread Alex
Alex added the comment: The ClearWindow.py extension works well with the specified shortcut, How can i invoke it in my source code to clear the window ? Thanks in advance. -- nosy: +Alex type: enhancement -> resource usage versions: +Python 2.7 -Python

[issue17280] path.basename and ntpath.basename functions returns an incorrect file name in Windows 7

2013-02-23 Thread Alex
New submission from Alex: 1. I created file ("C:\Users\Alkor\Desktop\a3434.raw") on my desktop 2. Tried to get the file name from the absolute path Actual result: C:\Users\Alkor>python Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32 Type "

[issue17940] extra code in argparse.py

2013-05-08 Thread Alex
New submission from Alex: In class HelpFormatter, class _Section, format_help(self) (lines 199 & 200), the two lines for func, args in self.items: func(*args) aren't necessary; the results of func are ignored. "func" is applied (again) on the

[issue25975] Weird multiplication

2015-12-29 Thread Alex
New submission from Alex: Hi! I'm nube and just learning, but found weird thing 5 * 1.1 equals 55000.001, but that's not wright. I'm using 3.5.1 Shell. My friend checked - his got the same result. So is it a bug or a feature? -- components: IDLE, Windows m

[issue25975] Weird multiplication

2015-12-29 Thread Alex
Alex added the comment: Wow. Thanks! -- ___ Python tracker <http://bugs.python.org/issue25975> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26181] argparse can't handle positional argument after list (help message is wrong)

2016-01-22 Thread Alex
New submission from Alex: This code is meant to take a filename and a list of integers as arguments. The filename is required, the integers are optional: import argparse parser = argparse.ArgumentParser() parser.add_argument('filename') parser.add_argument('-L', metavar

[issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed)

2021-12-10 Thread Alex Waygood
Alex Waygood added the comment: Another option for code using Python <3.11, that will work without the `from __future__ import annotations` import, is to do something like this: ``` from graphlib import TopologicalSorter x: 'TopologicalSorter[str]' = TopologicalSorter({&quo

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-10 Thread Alex Waygood
Alex Waygood added the comment: My opinion is that supporting `GenericAlias` here would be a bad idea. Associating an implementation of the function with the argument type `list[str]` is ambiguous. Would this implementation be called if any argument of type `list` was supplied, or would it

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-10 Thread Alex Waygood
Alex Waygood added the comment: It would be well worth it to improve the error message, however: ``` >>> from functools import singledispatch >>> @singledispatch ... def func(arg): ... raise NotImplementedError ... >>> @func.register ... def _(arg: list[str])

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-10 Thread Alex Waygood
Alex Waygood added the comment: The above traceback is because the `isinstance(list[str], type)` check at Lib/functools.py:848 evaluates to `True`. Related: #45665. -- ___ Python tracker <https://bugs.python.org/issue46

[issue45665] Problems caused by isinstance(list[int], type) returning True

2021-12-10 Thread Alex Waygood
Alex Waygood added the comment: #46032 is related to this issue. -- nosy: +AlexWaygood ___ Python tracker <https://bugs.python.org/issue45665> ___ ___ Python-bug

[issue46014] functools.singledispatch does not support Union types

2021-12-10 Thread Alex Waygood
Alex Waygood added the comment: This is awesome! Should a note be added to the functools documentation mentioning the new feature? (Genuine question — I'm not sure whether it's necessary myself.) -- ___ Python tracker <https://bu

[issue46013] Confusing period in object.__hash__ doc

2021-12-10 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker <https://bugs.python.org/issue46013> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-11 Thread Alex Waygood
Alex Waygood added the comment: The PR looks good to me. I think it's also important that we document that these types aren't supported, as it's not mentioned anywhere at the moment. Related: Issue34498. -- nosy: +uriyyo ___

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-11 Thread Alex Waygood
Change by Alex Waygood : -- components: +Documentation type: enhancement -> behavior ___ Python tracker <https://bugs.python.org/issue46032> ___ ___ Python-

[issue43794] OpenSSL 3.0.0: Handle UNEXPECTED_EOF_WHILE_READING / wrap SSL_OP_IGNORE_UNEXPECTED_EOF

2021-12-11 Thread Alex Grönholm
Alex Grönholm added the comment: OpenSSL 1.1.1 also handled EOFs strictly, but this behavior was generally suppressed in the ssl module through the default setting of suppress_ragged_eofs=True (thus enabling truncation attacks by default). The PR changes the behavior of existing applications

[issue45684] `functools.singledispatchmethod` does not define `__class_getitem__`

2021-12-12 Thread Alex Waygood
Alex Waygood added the comment: Closing this, as I don't think the use case I presented is strong enough, and there are ultimately more important things to worry about. -- resolution: -> not a bug stage: patch review -> resolved status: ope

[issue45840] Improve cross-references in the data model documentation

2021-12-12 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +28298 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/30077 ___ Python tracker <https://bugs.python.org/issu

[issue45729] [doc] "history and license" link has wrong target

2021-12-12 Thread Alex Waygood
Change by Alex Waygood : -- nosy: -AlexWaygood ___ Python tracker <https://bugs.python.org/issue45729> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45985] AttributeError from @property inadvertantly flows into __getattr__

2021-12-12 Thread Alex Waygood
Change by Alex Waygood : -- versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue45985> ___ ___ Python-bugs-list mailin

[issue46059] Typo in match Statement example

2021-12-13 Thread Alex Waygood
Change by Alex Waygood : -- keywords: +patch nosy: +AlexWaygood nosy_count: 2.0 -> 3.0 pull_requests: +28300 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30079 ___ Python tracker <https://bugs.python.org/i

[issue45840] Improve cross-references in the data model documentation

2021-12-13 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +28302 pull_request: https://github.com/python/cpython/pull/30081 ___ Python tracker <https://bugs.python.org/issue45

[issue45840] Improve cross-references in the data model documentation

2021-12-13 Thread Alex Waygood
Alex Waygood added the comment: Thanks, Serhiy! -- ___ Python tracker <https://bugs.python.org/issue45840> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46064] Permalinks to underscored documentation entries don't work.

2021-12-13 Thread Alex Waygood
Alex Waygood added the comment: I can't reproduce this -- the permalink to __debug__ that I get is the same as the one you have posted here, and works fine for me on my laptop, phone and iPad. -- nosy: +AlexWaygood ___ Python tracker &

[issue46059] Typo in match Statement example

2021-12-13 Thread Alex Waygood
Change by Alex Waygood : -- type: -> behavior versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue46059> ___ ___ Python-bugs-list mai

[issue46066] [doc] TypedDict alternative definition syntax with keyword args is confusing

2021-12-13 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +gvanrossum, kj ___ Python tracker <https://bugs.python.org/issue46066> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46059] Typo in match Statement example

2021-12-14 Thread Alex Waygood
Alex Waygood added the comment: Thanks for the bug report, Vivek! It should be fixed now -- it might take a day or two for the online docs to update. -- ___ Python tracker <https://bugs.python.org/issue46

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2021-12-14 Thread Alex Waygood
Alex Waygood added the comment: The proposed patch appears to have been implemented in https://github.com/python/cpython/commit/97c1adf3935234da716d3289b85f72dcd67e90c2, and there has been no discussion for five years. I think this can now be closed. -- nosy: +AlexWaygood

[issue46076] Document using __slots__ to provide per-attribute docstrings

2021-12-14 Thread Alex Waygood
New submission from Alex Waygood : The ability to add docstrings for individual attributes, by using a dictionary for __slots__ was added in Issue36326. This is a fantastic feature, and deserves better documentation. It appears to currently only be documented in the "What's New&

[issue46076] Document using __slots__ to provide per-attribute docstrings

2021-12-14 Thread Alex Waygood
Change by Alex Waygood : -- keywords: +patch pull_requests: +28332 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30109 ___ Python tracker <https://bugs.python.org/issu

[issue46079] [doc] Broken URL in "Brief Tour of the Standard Library"

2021-12-15 Thread Alex Waygood
Change by Alex Waygood : -- title: Broken URL in tutorial -> [doc] Broken URL in "Brief Tour of the Standard Library" type: -> behavior versions: +Python 3.11, Python 3.9 ___ Python tracker <https://bugs.py

[issue46081] Document the msg argument for assertRaises

2021-12-15 Thread Alex Waygood
Change by Alex Waygood : -- versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue46081> ___ ___ Python-bugs-list mailin

[issue46082] type casting of bool

2021-12-15 Thread Alex Waygood
Alex Waygood added the comment: Hi! Your message here is a little unclear. Are you proposing a new feature (an enhancement), or filing a bug report? In either case, I'm afraid this behavior is very unlikely to change. In general, strings in Python are always considered truthy unless

[issue46085] OrderedDict iterator allocates di_result unnecessarily

2021-12-15 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +rhettinger versions: -Python 3.8 ___ Python tracker <https://bugs.python.org/issue46085> ___ ___ Python-bugs-list mailin

[issue46086] Add ratio_min() function to the difflib library

2021-12-15 Thread Alex Waygood
Alex Waygood added the comment: I am removing 3.10 from the "versions" field, since additions to the standard library are only considered for unreleased versions of Python. -- nosy: +AlexWaygood, tim.peters versions: -Python 3.10

[issue46086] Add ratio_min() function to the difflib library

2021-12-15 Thread Alex Waygood
Change by Alex Waygood : -- nosy: -AlexWaygood ___ Python tracker <https://bugs.python.org/issue46086> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46092] Fix/update missing parameters in function signatures for Built-in Functions documentation.

2021-12-15 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood versions: +Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46092> ___ ___ Python-bug

[issue46092] Fix/update missing parameters in function signatures for Built-in Functions documentation.

2021-12-16 Thread Alex Waygood
Alex Waygood added the comment: It concerns me that help() gives very different results for some of these functions than the signature you'll find in the documentation. I think a beginner would find that highly confusing. If the view is that the slash notation should not be added to

[issue46104] Reduce use of old-style syntax in typing docs

2021-12-16 Thread Alex Waygood
New submission from Alex Waygood : There are a few places in the typing docs where old-style (pre-PEP 526) syntax is used in examples. It doesn't look like these examples have been updated since 2016; it would be good to change them so that they use the newer syntax introduced in PE

[issue46104] Reduce use of old-style syntax in typing docs

2021-12-16 Thread Alex Waygood
Change by Alex Waygood : -- keywords: +patch pull_requests: +28368 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30148 ___ Python tracker <https://bugs.python.org/issu

[issue46104] Reduce use of old-style syntax in typing docs

2021-12-18 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37578] Change Glob: Allow Recursion for Hidden Files

2021-12-18 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 -Python 3.9 ___ Python tracker <https://bugs.python.or

[issue46099] Solaris: Fix pthread_getcpuclockid test

2021-12-18 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.python

[issue31914] Document Pool.(star)map return type

2021-12-18 Thread Alex Waygood
Alex Waygood added the comment: This appears to have been fixed in PR 26560 in the main branch, but it might be nice to backport it to 3.10 and 3.9 -- nosy: +AlexWaygood, mdk stage: -> backport needed type: enhancement -> behavior versions: +Python 3.10, Python 3.9 -Pyth

[issue34643] How to build Release Version of Python in Windows?

2021-12-18 Thread Alex Waygood
Alex Waygood added the comment: Given that there has been no activity on this issue for over three years, I am closing this as "rejected". -- nosy: +AlexWaygood resolution: -> rejected stage: -> resolved status: open -> closed ___

[issue31914] Document Pool.(star)map return type

2021-12-18 Thread Alex Waygood
Alex Waygood added the comment: PR 30191 and PR 30192 are backports -- ___ Python tracker <https://bugs.python.org/issue31914> ___ ___ Python-bugs-list mailin

[issue33567] Explicitly mention bytes and other buffers in the documentation for float()

2021-12-18 Thread Alex Waygood
Change by Alex Waygood : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> needs patch type: -> enhancement versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.or

[issue33449] Documentation for email.charset confusing about the location of constants

2021-12-18 Thread Alex Waygood
Change by Alex Waygood : -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue33

[issue46130] Untranslatable link text in whatsnew/3.10

2021-12-19 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +mdk type: -> behavior ___ Python tracker <https://bugs.python.org/issue46130> ___ ___ Python-bugs-list mailing list Un

[issue46132] Attempting to create an enum with slots silently fails

2021-12-19 Thread Alex Waygood
New submission from Alex Waygood : Attempting to create an enum with __slots__ silently fails. No error is raised if __slots__ are specified, but the usual behaviour of __slots__ does not work as expected. Attributes that are not specified in __slots__ can be freely set: >>>

[issue46104] Reduce use of old-style syntax in typing docs

2021-12-19 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +28424 pull_request: https://github.com/python/cpython/pull/30203 ___ Python tracker <https://bugs.python.org/issue46

[issue46104] Reduce use of old-style syntax in typing docs

2021-12-19 Thread Alex Waygood
Change by Alex Waygood : -- resolution: fixed -> stage: resolved -> patch review status: closed -> open ___ Python tracker <https://bugs.python.or

[issue29971] threading.Lock.acquire() not interruptible on Windows

2021-12-19 Thread Alex Waygood
Change by Alex Waygood : -- stage: -> needs patch versions: +Python 3.11 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue29971> ___ ___ Python-

[issue10789] Lock.acquire documentation is misleading

2021-12-19 Thread Alex Waygood
Alex Waygood added the comment: I am closing this issue. The original topic of discussion (Lock.acquire documentation) has been resolved, and there were other issues opened to discuss the more general issue. There has also been no real activity in this issue thread for a decade

[issue29328] struct module should support variable-length strings

2021-12-19 Thread Alex Waygood
Alex Waygood added the comment: I am closing this issue as "rejected", given the consensus that writing a patch could be a major undertaking, the lack of such a patch, and the fact that there has been no activity on the issue thread (or the python-ideas mailing list) for near

[issue46134] Confusing error message for AttributeError with dataclasses

2021-12-19 Thread Alex Waygood
Alex Waygood added the comment: Thanks for the bug report, Landon! I think I can reproduce this with a slightly shorter code snippet, but I don't think this is a bug: ``` >>> from dataclasses import dataclass, field >>> @dataclass ... class Character: ... sort_

[issue46076] Document using __slots__ to provide per-attribute docstrings

2021-12-19 Thread Alex Waygood
Alex Waygood added the comment: Thanks for taking the time to review and merge :) -- ___ Python tracker <https://bugs.python.org/issue46076> ___ ___ Python-bug

[issue46132] Consider adding __slots__ to enums?

2021-12-19 Thread Alex Waygood
Alex Waygood added the comment: Ah, of course, I'm an idiot — I forgot that a class could not prevent the creation of __dict__ unless the parent class also had __slots__. Thanks, Christian. In which case: consider this a feature request to consider adding __slots__ to enum.Enum: for f

[issue46104] Reduce use of old-style syntax in typing docs

2021-12-19 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43424] Document the `controller.name` field in `webbrowser` module

2021-12-21 Thread Alex Willmer
Change by Alex Willmer : -- nosy: -Alex.Willmer ___ Python tracker <https://bugs.python.org/issue43424> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46159] Segfault when using trace functions in 3.11a3

2021-12-22 Thread Alex Gaynor
Change by Alex Gaynor : -- components: +Interpreter Core nosy: +Mark.Shannon, alex ___ Python tracker <https://bugs.python.org/issue46159> ___ ___ Python-bug

[issue43424] Document the `controller.name` field in `webbrowser` module

2021-12-23 Thread Alex Waygood
Change by Alex Waygood : -- type: security -> enhancement versions: +Python 3.11 -Python 3.10 ___ Python tracker <https://bugs.python.org/issue43424> ___ _

[issue46172] [doc] Outdated description of `license` object

2021-12-24 Thread Alex Waygood
Change by Alex Waygood : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue46172> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46162] Make `builtins.property` generic

2021-12-24 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker <https://bugs.python.org/issue46162> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46175] Zero argument super() does not function properly inside generator expressions

2021-12-24 Thread Alex Walters
New submission from Alex Walters : When zero argument super is used inside a generator expression, it raises 'TypeError: super(type, obj): obj must be an instance or subtype of type'. I can find no information on if this is working as intended, a bug, or a known issue, and the e

[issue4079] urllib.request.Request 'timeout' attribute needs to have a default

2021-12-25 Thread Alex Waygood
Change by Alex Waygood : -- title: urllib.requst.Request 'timeout' attribute needs to have a default -> urllib.request.Request 'timeout' attribute needs to have a default ___ Python tracker <https:/

[issue31914] Document Pool.(star)map return type

2021-12-26 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46170] Improving the error message when subclassing NewType

2021-12-26 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker <https://bugs.python.org/issue46170> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18677] Enhanced context managers with ContextManagerExit and None

2021-12-27 Thread Alex Waygood
Alex Waygood added the comment: Given that this issue has seen no activity for eight years, I am closing it as "rejected". -- nosy: +AlexWaygood resolution: -> rejected stage: -> resolved status: open -> closed ___ Pyt

[issue30420] Clarify kwarg handing for subprocess convenience APIs

2021-12-28 Thread Alex Waygood
Alex Waygood added the comment: The modern docs for these functions seem to: * Document the cwd argument for these functions, following PR 1685 & PR 2253. * Include an **other_popen_kwargs parameter for all these functions. Nick, is there anything left to do here, or can this issue be cl

[issue34498] Python 3.7+ break on singledispatch_function.register(pseudo_type), which Python 3.6 accepted

2021-12-28 Thread Alex Waygood
Alex Waygood added the comment: Guido: Serhiy fixed this very recently in Issue46032. The documentation should probably be improved, however, in my opinion; there's currently nothing officially stating that GenericAlias/NewType/typing aliases are unsupported. Suppor

[issue46191] Conflict between using annotations in singledispatch() and MyPy

2021-12-29 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood, lukasz.langa ___ Python tracker <https://bugs.python.org/issue46191> ___ ___ Python-bugs-list mailing list Unsub

[issue46120] Add note to `typing.Union` that it is recommended to use `|` instead

2021-12-29 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue30420] [doc] subprocess module: Clarify kwarg handing for convenience APIs

2021-12-29 Thread Alex Waygood
Change by Alex Waygood : -- title: Clarify kwarg handing for subprocess convenience APIs -> [doc] subprocess module: Clarify kwarg handing for convenience APIs ___ Python tracker <https://bugs.python.org/issu

[issue38397] __init_subclass__ causes TypeError when used with more standard library metaclasses (such as EnumMeta)

2021-12-29 Thread Alex Waygood
Alex Waygood added the comment: I am closing this, as I believe it was fixed by the addition of **kwds to EnumMeta. Feel free to reopen this if you disagree, @retnikt. -- nosy: +AlexWaygood resolution: -> fixed stage: -> resolved status: open -&g

[issue46191] Conflict between using annotations in singledispatch() and MyPy

2021-12-29 Thread Alex Waygood
Alex Waygood added the comment: I like Serhiy's idea from a type-checking perspective. It would mean we could continue to have sophisticated type inference from mypy/pyright/etc. inside singledispatch function definitions. It would also mean people could use type annotatio

[issue46191] Conflict between using annotations in singledispatch() and MyPy

2021-12-29 Thread Alex Waygood
Alex Waygood added the comment: Yeah, I think I agree with Guido. Mypy only has partial support for singledispatch anyway, and only achieves that through a plugin, so special-casing by type-checkers is inevitable. -- ___ Python tracker <ht

[issue46014] functools.singledispatch does not support Union types

2021-12-30 Thread Alex Waygood
Alex Waygood added the comment: ``` >>> from typing import Optional, get_origin >>> get_origin(Optional[int]) typing.Union ``` ^Because of that, it will work with typing.Optional as well as typing.Union and types.UnionType, yes. I am planning on submitting a docs PR at

[issue40059] Provide a toml module in the standard library

2022-01-01 Thread Alex Grönholm
Change by Alex Grönholm : -- nosy: +alex.gronholm ___ Python tracker <https://bugs.python.org/issue40059> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46224] doc: Fix bisect example using mutable function default

2022-01-02 Thread Alex Waygood
Change by Alex Waygood : -- keywords: +patch stage: -> patch review versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issu

[issue46244] typing._TypeVarLike missing __slots__

2022-01-03 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +gvanrossum, kj ___ Python tracker <https://bugs.python.org/issue46244> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46242] Improve error message when attempting to extend an enum with `__call__`

2022-01-03 Thread Alex Waygood
Change by Alex Waygood : -- title: Improve error message when creating an enum with `__call__` -> Improve error message when attempting to extend an enum with `__call__` ___ Python tracker <https://bugs.python.org/issu

[issue46246] importlib.metadata.DeprecatedList appears to be missing __slots__

2022-01-03 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +jaraco ___ Python tracker <https://bugs.python.org/issue46246> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43224] Add support for PEP 646

2022-01-04 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +gvanrossum, kj ___ Python tracker <https://bugs.python.org/issue43224> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2022-01-04 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45665] Problems caused by isinstance(list[int], type) returning True

2022-01-04 Thread Alex Waygood
Alex Waygood added the comment: `isinstance(list[int], type)` returns `True` in 3.9 as well, so the behaviour has been around for a while. (Not a comment on whether the change is worth making, just a note.) -- ___ Python tracker <ht

[issue45665] Problems caused by isinstance(list[int], type) returning True

2022-01-04 Thread Alex Waygood
Alex Waygood added the comment: Yes, there are a few exceptions to that :( ``` >>> from typing import Annotated >>> x = Annotated[int, "idk some int"] >>> x() 0 >>> isinstance(x, type) False >>> >>> from re import Pattern >&g

[issue45665] Problems caused by isinstance(list[int], type) returning True

2022-01-04 Thread Alex Waygood
Alex Waygood added the comment: I agree with Serhiy. -- ___ Python tracker <https://bugs.python.org/issue45665> ___ ___ Python-bugs-list mailing list Unsub

<    1   2   3   4   5   6   7   8   9   10   >