[issue44064] Python39/lib/logging/__init__.py SyntaxError: cannot delete starred

2021-05-06 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: "del t, v, tb" is perfectly legal Python syntax. It's whatever tool is showing a syntax error there (jedi, apparently) that's buggy. % python3.9 Python 3.9.4 (default, Apr 9 2021, 09:47:14) [Clang 12.0.0 (clang-1200.0.32.29)]

[issue44103] Python 3.10 docs are visually broken

2021-05-10 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : In the 3.10 docs (but not 3.11 or 3.9) I see an extra copy of the table of contents at the top of the page. Attached a screenshot. -- assignee: docs@python components: Documentation files: Screen Shot 2021-05-10 at 9.11.51 AM.png messages: 393416

[issue44103] Python 3.10 docs are visually broken

2021-05-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: > Can it be related to Sphinx version That's a good guess since Sphinx 4 was released on May 8. I'm not sure if Python would immediately pick that up though. -- ___ Python tracker <https:/

[issue44103] Python 3.10 docs are visually broken

2021-05-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks, hard refresh does fix it. -- ___ Python tracker <https://bugs.python.org/issue44103> ___ ___ Python-bugs-list mailin

[issue44152] [not a bug] .isupper() does not support Polytonic Greek (but .islower() does)

2021-05-16 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue44152> ___ ___ Python-bugs-list

[issue44261] SocketType documentation misleading

2021-05-29 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I propose to deprecate socket.SocketType. There's no reason to publicly expose _socket.socket separately from socket.socket, the only type that moat users should care about. SocketType isn't needed for type checking; socket.socket is itself a clas

[issue44293] PEP 585 breaks inspect.isclass

2021-06-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The reason for this is that types.GenericAlias.__getattribute__ delegates to the alias's origin (in the `ga_getattro` function). As a result, `list[int].__class__` calls `list.__class__` and returns `type`. And the implementation of `isinstance(obj,

[issue44353] PEP 604 NewType

2021-06-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: https://github.com/python/typing/issues/746 has some previous discussion of implementing NewType as a class (motivated by __repr__), including benchmarks. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44397] Add Linked Linked module

2021-06-11 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Closing as a duplicate of issue42575. Adding a linked list data structure to Python is in any case probably better discussed on the python-ideas mailing list and then in a PEP. -- nosy: +Jelle Zijlstra resolution: -> duplicate stage: -> re

[issue44414] from __future__ import annotations breaks profiler's handling of dataclasses

2021-06-13 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker <https://bugs.python.org/issue44414> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: It could be useful for C extensions that want to support PEP 585 for their types, such as numpy's array type. -- nosy: +Jelle Zijlstra ___ Python tracker <https://bugs.python.org/is

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: They'd still need runtime support from GenericAlias to allow users to write `numpy.ndarray[int]` at runtime. -- ___ Python tracker <https://bugs.python.org/is

[issue44453] Documented return type of sysconfig.get_path() is wrong

2021-06-18 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : https://docs.python.org/3/library/sysconfig.html#sysconfig.get_path says it returns None if the name is not found, but the implementation (https://github.com/python/cpython/blame/main/Lib/sysconfig.py) uses [] and will raise KeyError instead. Noticed by

[issue44453] Documented return type of sysconfig.get_path() is wrong

2021-06-18 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +25370 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26785 ___ Python tracker <https://bugs.python.org/issu

[issue44447] Syntax Error not as detailed as shown

2021-06-18 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- components: +Parser -Regular Expressions nosy: +lys.nikolaou, pablogsal type: performance -> behavior ___ Python tracker <https://bugs.python.org/issu

[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-22 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I agree that this is a bug. `types.Union` is also missing a __getitem__ implementation. And `typing.Union` supports pickling while `types.Union` doesn't: >>> pickle.loads(pickle.dumps(int | str)) Traceback (most recent call last): File

[issue44524] __name__ attribute in typing module

2021-06-28 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra, kj ___ Python tracker <https://bugs.python.org/issue44524> ___ ___ Python-bugs-list mailing list Unsub

[issue44521] str.removeprefix(): add strict: bool

2021-06-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: ValueError would seem to be the right exception to use. If this parameter were to be added (I'm not convinced that it should be), I'd prefer to call it something more specific than "strict", since "strict" can mean lots of th

[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-29 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Mypy is definitely not going to support direct access to `__parameters__`; what Guido is referring to is whether usage of types.Union that would require `__parameters__` at runtime is accepted by mypy. For example, this: from typing import TypeVar T

[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-29 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I'd also be OK with returning a `types.GenericAlias(int | list[T], str)`, which might be simpler. It doesn't matter for static type checkers, and runtime type checkers can extract what they n

[issue44646] hash() of the unity type is not consistent with equality

2021-07-15 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker <https://bugs.python.org/issue44646> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44353] PEP 604 NewType

2021-07-19 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: > Using `from __future__ import annotations` it should work Not in type aliases or generic bases. (And if Larry's co_annotations PEP is accepted, it would break in normal annotations too.) I'd prefer to get rid of this sort of subtle differe

[issue44353] PEP 604 NewType

2021-07-19 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This is what I got last year (copied from the typing issues): In [83]: from typing import NewType In [84]: nt = NewType("nt", int) In [85]: class NewTypeClass: ...: def __init__(self, name, supertype): ...: self.n

[issue44353] PEP 604 NewType

2021-07-19 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Does that work if you try to union two NewTypes? -- ___ Python tracker <https://bugs.python.org/issue44353> ___ ___ Python-bug

[issue44353] PEP 604 NewType

2021-07-20 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I found that replacing __call__ on the NewType class with an identity function written in C makes things faster instead: In [54]: %timeit ntc2(1) 79 ns ± 0.37 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each) In [55]: %timeit ntc(1) 126 ns

[issue44737] Mapping from to collections.abc

2021-07-25 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This sounds like a bug in the third-party library you're using, not in Python itself. Could you report this bug to the library? According to https://docs.python.org/3.9/library/collections.html, aliases like collections.Mapping were removed fro

[issue44732] Rename types.Union to types.UnionType

2021-07-25 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I agree that UnionType is marginally better so we should rename it. It doesn't seem worth doing if this doesn't make it in in time for 3.10, though. With the advent of PEP 604 typing.Union will hopefully become irrelevant. -- nosy: +Jell

[issue44925] [docs] Confusing deprecation notice for typing.IO

2021-08-18 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker <https://bugs.python.org/issue44925> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44524] __name__ attribute in typing module

2021-08-19 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I don't think we need to support Annotated as a base class. PEP 593 is titled "Flexible function and variable annotations", and base classes are neither of those things. None of the examples in the PEP or the implementation use Annotated

[issue45121] Regression in 3.9.7 with typing.Protocol

2021-09-07 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra, kj ___ Python tracker <https://bugs.python.org/issue45121> ___ ___ Python-bugs-list mailing list Unsub

[issue45943] kids10yrsap...@gmail.com

2021-11-30 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue40397] Refactor typing._GenericAlias

2020-05-08 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The most recent change here caused a regression. The following file: ``` from typing import Generic, TypeVar, Union class CannotTransform(Exception): pass T = TypeVar("T") E = TypeVar("E", bound=Exception) class Ok(Generic[T]): pass

[issue40397] Refactor typing._GenericAlias

2020-05-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks Serhyi! I can confirm that the issue I posted is fixed. -- priority: release blocker -> normal ___ Python tracker <https://bugs.python.org/issu

[issue40826] Segfaults on io.FileIO(0).name in 3.9

2020-05-30 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : $ gdb ./python ... (gdb) r ... Python 3.9.0b1 (tags/v3.9.0b1:97fe9cfd9f8, May 30 2020, 05:26:48) ... >>> import io >>> io.FileIO(0).name 0 >>> Program received signal SIGSEGV, Segmentation fault. _PyInterpreterState_G

[issue42339] official embedded Python fails to import certain modules

2020-11-12 Thread Jelle Geerts
New submission from Jelle Geerts : This problem happened with 'python-3.8.6-embed-amd64.zip' when trying to import certain modules. Note that this problem does NOT happen with Python from 'python-3.7.9-embed-amd64.zip' (its output is also attached below). It happened

[issue42339] official embedded Python fails to import certain modules

2020-11-14 Thread Jelle Geerts
Jelle Geerts added the comment: Problem still occurs with newer KB3118401 installed (instead of KB2999226). But good news: Installing update KB3063858 (or the older KB2533623) resolves the issue. That update adds the new kernel32.dll functions SetDefaultDllDirectories, AddDllDirectory, and

[issue42339] official embedded Python fails to import certain modules

2020-11-14 Thread Jelle Geerts
Jelle Geerts added the comment: > Mixed-language output is awkward. A common _Py_FormatMessage function could > be added in 3.10 that tries getting an error message in English before trying > to get it in the user's default language. I agree that in general mixed-language can

[issue42339] official embedded Python fails to import certain modules

2020-11-16 Thread Jelle Geerts
Jelle Geerts added the comment: Thanks to you too, Steve! *tips imaginary hat* -- ___ Python tracker <https://bugs.python.org/issue42339> ___ ___ Python-bug

[issue33482] codecs.StreamRecoder.writelines is broken

2019-05-22 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +13416 stage: test needed -> patch review ___ Python tracker <https://bugs.python.org/issue33482> ___ ___ Python-

[issue33482] codecs.StreamRecoder.writelines is broken

2019-05-22 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +13417 ___ Python tracker <https://bugs.python.org/issue33482> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37384] Compiling Python 3.7.3 from source and getting all sorts of errors on Debian?

2019-06-24 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: As Ned and Christian hinted, the issue might be related to --enable-optimizations. Have you tried compiling without that flag? -- nosy: +Jelle Zijlstra ___ Python tracker <https://bugs.python.org/issue37

[issue30896] BytesWarning in re module when compiling certain bytes patterns

2017-07-10 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: This code in sre_parse (line 738 and down): warnings.warn( 'Flags not at the start of the expression %s%s' % ( source.string[:20], # truncate lo

[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

2017-07-15 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I'm also concerned that the slowness of namedtuple creation is causing people to avoid using it. I can see why we wouldn't want a complicated solution like using Argument Clinic, but it's not clear to me why Serhiy's approach in namedtu

[issue28638] Optimize namedtuple creation

2017-07-16 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- pull_requests: +2796 ___ Python tracker <http://bugs.python.org/issue28638> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28638] Optimize namedtuple creation

2017-07-17 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Should we consider a C-based implementation like https://github.com/ll/cnamedtuple? It could improve speed even more, but would be harder to maintain and test and harder to keep compatible. My sense is that it's not worth it unless benchmarks s

[issue28638] Optimize namedtuple creation

2017-07-17 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- resolution: rejected -> ___ Python tracker <http://bugs.python.org/issue28638> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue28638] Optimize namedtuple creation

2017-07-18 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I benchmarked some common namedtuple operations with the following script: #!/bin/bash echo 'namedtuple creation' ./python -m timeit -s 'from collections import namedtuple' 'x = namedtuple("x", ["a", "b&quo

[issue28638] Optimize namedtuple creation

2017-07-18 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks Joe! I adapted your benchmark suite to also run my implementation. See https://github.com/JelleZijlstra/cnamedtuple/commit/61b6fbf4de37f8131ab43c619593327004974e52 for the code and results. The results are consistent with what we've seen before.

[issue30984] traceback.print_exc return value documentation

2017-07-21 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: The documentation for traceback.format_tb says "Return a list of “pre-processed” stack trace entries extracted from the traceback object tb. It is useful for alternate formatting of stack traces. The optional limit argument has the same meaning a

[issue29691] Some tests fail in coverage Travis check

2017-03-06 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I'll look into creating a PR when I have some time. It would also be useful to tweak the Travis/coverage configuration so that it fails loudly if one of the tests doesn't pass in the coverage check. --

[issue29825] PyFunction_New() not validate code object

2017-03-17 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I don't think this is a bug; it is known and expected that you can do all kinds of bad things by writing bytecode manually. (You can already make Python write to random memory by giving it LOAD_FAST or STORE_FAST opcodes with incorrect offsets.) This do

[issue29847] Path takes and ignores **kwargs

2017-03-18 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: pathlib.Path.__new__ takes **kwargs, but doesn't do anything with them (https://github.com/python/cpython/blob/master/Lib/pathlib.py#L979). This doesn't appear to be documented. This feature should presumably be either documented or removed

[issue29847] Path takes and ignores **kwargs

2017-03-20 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks, I'll add a PR. This doesn't need to be documented, right? -- ___ Python tracker <http://bugs.python.o

[issue29162] pyshell.py: name 'sys' is not defined

2017-03-26 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- pull_requests: +735 ___ Python tracker <http://bugs.python.org/issue29162> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29935] list and tuple index methods should accept None parameters

2017-03-29 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I agree with George that supporting None here is the better option. This problem also applies to collections.deque. tuple, list, and deque all have very similar index implementations, and it would be nice to merge their argument parsing boilerplate

[issue29974] typing.TYPE_CHECKING doc example is incorrect

2017-04-03 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The example is actually correct; I just confirmed by running it in my shell. Type annotations on local variables are not evaluated at runtime; see PEP 526. -- nosy: +Jelle Zijlstra ___ Python tracker <h

[issue30174] Duplicate code in pickletools.py

2017-04-26 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: The bytes1 ArgumentDescriptor is duplicated in pickletools.py. -- messages: 292364 nosy: Jelle Zijlstra, alexandre.vassalotti priority: normal pull_requests: 1408 severity: normal status: open title: Duplicate code in pickletools.py

[issue30218] shutil.unpack_archive doesn't support PathLike

2017-04-30 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: According to PEP 519, it should. I'll submit a PR soon. -- components: Library (Lib) messages: 292642 nosy: Jelle Zijlstra, brett.cannon, tarek priority: normal severity: normal status: open title: shutil.unpack_archive doesn't suppor

[issue30218] shutil.unpack_archive doesn't support PathLike

2017-04-30 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- pull_requests: +1476 ___ Python tracker <http://bugs.python.org/issue30218> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30235] Validate shutil supports path-like objects, update docs accordingly

2017-05-02 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- pull_requests: +1501 ___ Python tracker <http://bugs.python.org/issue30235> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30241] Add contextlib.AbstractAsyncContextManager

2017-05-02 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: It would be useful to have an abstract base class for asynchronous context managers, similar to the existing contextlib.AbstractContextManager. We can then also add this class to typing and use it as a PEP 544 Protocol. I have code ready for

[issue30241] Add contextlib.AbstractAsyncContextManager

2017-05-02 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- pull_requests: +1520 ___ Python tracker <http://bugs.python.org/issue30241> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30266] AbstractContextManager should support __method__ = None

2017-05-03 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: Like other ABCs, contextlib.AbstractContextManager should support the pattern where setting a method to None disables structural subtyping, which was introduced across the standard library in issue 25958. Ivan Levkivskyi suggested making

[issue30266] AbstractContextManager should support __method__ = None

2017-05-03 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- pull_requests: +1546 ___ Python tracker <http://bugs.python.org/issue30266> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30406] async and await should be keywords in 3.7

2017-05-19 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: According to PEP 492, async and await should be full keywords in Python 3.7, but this hasn't been implemented yet. I have a patch ready that I'll submit as a PR soon. -- components: Interpreter Core messages: 293976 nosy: Jell

[issue30406] async and await should be keywords in 3.7

2017-05-19 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- pull_requests: +1763 ___ Python tracker <http://bugs.python.org/issue30406> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30359] Annotating a function as returning an (async) context manager?

2017-05-20 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker <http://bugs.python.org/issue30359> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30424] make pydoc-topics fails

2017-05-21 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: Running `make pydoc-topics` in Doc/ on master fails with $ make pydoc-topics sphinx-build -b pydoc-topics -d build/doctrees -D latex_elements.papersize= . build/pydoc-topics Running Sphinx v1.6.1 making output directory... loading pickled environment

[issue30424] make pydoc-topics fails

2017-05-21 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> needs patch versions: +Python 3.7 ___ Python tracker <http://bugs.python.org/i

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-23 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Even with the patch, I don't think it's safe to modify os.environ while it's being accessed concurrently in another thread. The other thread's modification could arrive while the dict() call in your patch is running (in CPython the GIL mi

[issue30484] Garbage Collector can cause Segfault whilst iterating dictionary items

2017-05-29 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I could reproduce this on 3.4, but not on 3.3, 2.7, or master. -- nosy: +Jelle Zijlstra versions: +Python 3.4 ___ Python tracker <http://bugs.python.org/issue30

[issue30518] Import type aliases from another module

2017-05-30 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This is likely an issue with the setup of your project, not with type aliases. You haven't given enough information to tell me what the real problem is. I'm not sure what you mean by "I still can't compile 'Blocks'"

[issue30266] AbstractContextManager should support __method__ = None

2017-06-09 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks for doing the merge and backport! -- ___ Python tracker <http://bugs.python.org/issue30266> ___ ___ Python-bugs-list m

[issue30623] python-nightly import numpy fails since recently

2017-06-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The error is /home/travis/virtualenv/python3.7-dev/lib/python3.7/site-packages/numpy/core/multiarray.cpython-37m-x86_64-linux-gnu.so: undefined symbol: PyTraceMalloc_Untrack. On a quick look I couldn't find any recent changes in CPython related to tracem

[issue30623] python-nightly import numpy fails since recently

2017-06-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Sounds like the issue is with numpy, not CPython, so there's little reason to keep this CPython bug open. -- ___ Python tracker <http://bugs.python.org/is

[issue30406] async and await should be keywords in 3.7

2018-03-18 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +5900 ___ Python tracker <https://bugs.python.org/issue30406> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33482] codecs.StreamRecoder.writelines is broken

2018-05-13 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : codecs.StreamRecoder.writelines is implemented as: def writelines(self, list): data = ''.join(list) data, bytesdecoded = self.decode(data, self.errors) return self.writer.write(data) It can't take a list of byt

[issue33482] codecs.StreamRecoder.writelines is broken

2018-05-13 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +6465 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33482> ___ ___ Py

[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : https://docs.python.org/3.7/library/stdtypes.html#mutable-sequence-types lists .copy() among the methods provided by mutable sequences. However, MutableSequence does not actually define .copy(): https://github.com/python/cpython/blob/master/Lib

[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Makes sense. I can provide a patch to the docs. -- ___ Python tracker <https://bugs.python.org/issue33519> ___ ___ Python-bug

[issue31698] Add REQ_NAME to the node.h API

2017-10-04 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : See https://github.com/python/cpython/pull/1669#pullrequestreview-67229284 -- assignee: Jelle Zijlstra components: Interpreter Core messages: 303739 nosy: Jelle Zijlstra, yselivanov priority: low severity: normal status: open title: Add REQ_NAME to

[issue31698] Add REQ_NAME to the node.h API

2017-10-08 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +3900 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31698> ___ ___ Py

[issue31965] Incorrect documentation for multiprocessing.connection.{Client, Listener}

2017-11-06 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : https://docs.python.org/3/library/multiprocessing.html#multiprocessing.connection.Client claims that there is an "authenticate" argument, but it does not exist in the implementation (https://github.com/python/cpython/blob/master/Lib/multi

[issue33519] Should MutableSequence provide .copy()?

2018-05-17 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +6623 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33519> ___ ___ Py

[issue31861] aiter() and anext() built-in functions

2018-06-14 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Do these really need to be builtins? They seem too specialized to be widely useful; I've personally never needed them in any async code I've written. It would make more sense to me to put them in a module like operators. -- nosy: +Jell

[issue34648] Confirm the types of parameters of traceback.format_list and traceback.StackSummary.from_list post-3.5

2018-09-24 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: > How people can get Iterable[FrameSummary] as an input and pass it to > format_list()? If I want to format a traceback, but omit traceback lines that refer to a particular module (for example, code for a coroutine runner), I could write `forma

[issue28603] traceback module can't format/print unhashable exceptions

2016-12-13 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I ran into this bug through Thrift-generated exception classes (also reported there as https://issues.apache.org/jira/browse/THRIFT-4002). I've added a few potential solutions: - issue28603-listset.patch turns the seen set into a list if hashing

[issue28603] traceback module can't format/print unhashable exceptions

2016-12-13 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : Added file: http://bugs.python.org/file45871/issue28603-ignore.patch ___ Python tracker <http://bugs.python.org/issue28603> ___ ___ Python-bug

[issue28603] traceback module can't format/print unhashable exceptions

2016-12-13 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : Added file: http://bugs.python.org/file45872/issue28603-list.patch ___ Python tracker <http://bugs.python.org/issue28603> ___ ___ Python-bug

[issue28962] Crash when throwing an exception with a malicious __hash__ override

2016-12-13 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: $ cat baderror.py class BadError(Exception): def __init__(self): self.i = 0 def __hash__(self): self.i += 1 return self.i e = BadError() raise e from e $ ./python.exe -V Python 3.5.2+ $ ./python.exe baderror.py Segmentation

[issue28967] copy.copy fails on threading.local subclass

2016-12-13 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: Calling copy.copy on a threading.local subclass copies attributes over correctly in Python 2.7, but creates an empty object in Python 3.3-3.5 and fails with a pickle-related error in 3.6. Marking this as a release blocker and assigning to Ned because this

[issue28967] copy.copy fails on threading.local subclass

2016-12-13 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This might be due to issue22995. -- ___ Python tracker <http://bugs.python.org/issue28967> ___ ___ Python-bugs-list mailin

[issue29198] AsyncGenerator is missing from typing

2017-01-07 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: PEP 525 async generators weren't added to typing.py, probably by oversight. I sent pull requests to typing and typeshed on GitHub to add an AsyncGenerator class and stub: - https://github.com/python/typing/pull/346 - https://github.com/python/typeshed

[issue29198] AsyncGenerator is missing from typing

2017-01-07 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : Added file: http://bugs.python.org/file46203/asyncgenerator2.patch ___ Python tracker <http://bugs.python.org/issue29198> ___ ___ Python-bug

[issue29205] col_offset for AsyncFunctionDef AST nodes is wrong

2017-01-08 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: The col_offset attribute for ast.AsyncFunctionDef objects points to the "def" keyword, not to the "async" keyword that actually starts the node. Test case: In [18]: code = 'async def f(): pass' In [19]: tree = ast.parse(code)

[issue29205] col_offset for AsyncFunctionDef AST nodes is wrong

2017-01-08 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The col_offset is actually correct when there is a decorator: In [26]: code = '@decorator\nasync def f(): pass' In [27]: tree = ast.parse(code) In [28]: tree.body[0].col_offset Out[28]: 0 The same issue appears with async for and async with: In

[issue29205] col_offset for AsyncFunctionDef AST nodes is wrong

2017-01-08 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- keywords: +patch Added file: http://bugs.python.org/file46215/issue29205.patch ___ Python tracker <http://bugs.python.org/issue29

[issue29198] AsyncGenerator is missing from typing

2017-01-08 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : Added file: http://bugs.python.org/file46219/asyncgenerator3.patch ___ Python tracker <http://bugs.python.org/issue29198> ___ ___ Python-bug

[issue29198] AsyncGenerator is missing from typing

2017-01-08 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : Added file: http://bugs.python.org/file46220/typingindentation.patch ___ Python tracker <http://bugs.python.org/issue29198> ___ ___ Python-bug

[issue29310] Document typing.NamedTuple default argument syntax

2017-01-18 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: Document https://github.com/python/typing/pull/338 I should have a patch in the next few days; creating this issue to remind myself. -- assignee: Jelle Zijlstra components: Documentation messages: 285740 nosy: Jelle Zijlstra priority: normal

<    1   2   3   4   5   6   >