[issue41732] Custom iterator to memoryview - performance improvement

2020-09-08 Thread Stefan Krah
Stefan Krah added the comment: It would have been nice to have had a chance to look at this, but apparently those days are over. -- ___ Python tracker ___

[issue41742] Request for docs.python.org/3/library/configparser.html#exceptions improvement

2020-09-08 Thread leveque
New submission from leveque : Hi, docs.python.org/3/library/configparser.html#exceptions does not mention KeyError which is mentioned under https://docs.python.org/3/library/configparser.html#mapping-protocol-access and

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 15dcdb211366e0788e831fc2a1f785e6a5ca2749 by Mohamed Koubaa in branch 'master': bpo-1635741: Port the termios to multi-phase init (PEP 489) (GH-22139) https://github.com/python/cpython/commit/15dcdb211366e0788e831fc2a1f785e6a5ca2749 --

[issue41732] Custom iterator to memoryview - performance improvement

2020-09-08 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset b0ac5d75a59c356c44cfc9b25077da3049dd16e9 by dxflores in branch 'master': bpo-41732: add iterator to memoryview (GH-22119) https://github.com/python/cpython/commit/b0ac5d75a59c356c44cfc9b25077da3049dd16e9 -- nosy: +corona10

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-15709 "PEP 3121, 384 Refactoring applied to termios module" as a duplicate of this issue. -- ___ Python tracker ___

[issue41651] Pip: Wrong Showing of Progressbar when Downloading Modules

2020-09-08 Thread Alex
Alex <2423067...@qq.com> added the comment: @cryvate: Okay, and the new issue is crated at . -- ___ Python tracker ___

[issue40624] add support for != (not-equals) in ElementTree XPath

2020-09-08 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch nosy: +ammar2 nosy_count: 3.0 -> 4.0 pull_requests: +21229 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22147 ___ Python tracker

[issue41732] Custom iterator to memoryview - performance improvement

2020-09-08 Thread Stefan Krah
Change by Stefan Krah : -- nosy: -skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15709] PEP 3121, 384 Refactoring applied to termios module

2020-09-08 Thread STINNER Victor
STINNER Victor added the comment: Fixed by: New changeset 15dcdb211366e0788e831fc2a1f785e6a5ca2749 by Mohamed Koubaa in branch 'master': bpo-1635741: Port the termios to multi-phase init (PEP 489) (GH-22139) https://github.com/python/cpython/commit/15dcdb211366e0788e831fc2a1f785e6a5ca2749

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread STINNER Victor
STINNER Victor added the comment: I rejected the PR 19122 which tries to port the _datetime module to the multi-phase initialization API (PEP 489). We need first to enhance the PyCapsule C API to pass the module instance to C functions, somehow. Extension modules calling PyCapsule_New() in

[issue41729] test_winconsoleio fails and hangs on Windows

2020-09-08 Thread Eryk Sun
Eryk Sun added the comment: > Is this line needed with a repeat of 1, or should it be removed? It's not documented what it means to write a key event with wRepeatCount set to 0. It happens to work, but I'd leave it set to 1, which means the key was pressed once. Ideally, there should also

[issue41741] test_peg_generator timed out (25 min) on x86 Gentoo Non-Debug with X 3.9

2020-09-08 Thread STINNER Victor
STINNER Victor added the comment: > Making the timeout bigger can be a possibility, certainly, but this also > means the builder will get stuck more time in race conditions or deadlocks :( Race conditions and deadlocks are less likely than false alarms of builds failed because the timeout

[issue41732] Custom iterator to memoryview - performance improvement

2020-09-08 Thread Dong-hee Na
Dong-hee Na added the comment: Thanks, Diogo for working on this issue. And thank you for the mentoring guido! -- nosy: +gvanrossum resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue41737] Improper NotADirectoryError when opening a file under a fake directory

2020-09-08 Thread Danny Lin
Danny Lin added the comment: I'm not so familiar about the spec. If such behavior is confirmed due to implementation difference across OSes, and it's also not desirable to change the mapping of the OS error to Python exception, we can simplify left it as-is. However, this behavior

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-08 Thread Petr Viktorin
Petr Viktorin added the comment: We need this bug solved for 3.9.0 rc2. Łukasz, you're the one to make the call about the approach; how can we make your job easier? My view is: - Victor's PR 21961 is going in the right direction. But, as far as I know (correct me if I'm wrong), Victor

[issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot()

2020-09-08 Thread Petr Viktorin
Petr Viktorin added the comment: IMO, a slot should be exposed if there is some reason for exposing it. bpo-41073 talks about tp_dealloc, which is already exposed as Py_tp_dealloc. Recently, Py_bf_* slots were exposed (but not as part of the limited API), in bpo-40724 which links to the

[issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP

2020-09-08 Thread Zachary Ware
Change by Zachary Ware : -- Removed message: https://bugs.python.org/msg376478 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP

2020-09-08 Thread Zachary Ware
Change by Zachary Ware : -- Removed message: https://bugs.python.org/msg371208 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue41729] test_winconsoleio fails and hangs on Windows

2020-09-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: I was assuming that the default was 1, not 0. But now that CI tests pass code as is, I will leave it alone. -- ___ Python tracker ___

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-08 Thread Petr Viktorin
Petr Viktorin added the comment: I also looked into Mercurial. They have a large list of modules [0] that don't work with the lazy-loading scheme. I don't think adding one more should be a big problem for them; but we'll reach out to them and confirm that. [0]

[issue41732] Custom iterator to memoryview - performance improvement

2020-09-08 Thread Diogo Flores
Diogo Flores added the comment: Thank you Dong-hee Na and Victor. @Stefan Krah: I am sorry that you didn't had the chace to try out the patch before it got merged, however iff you are curious about the any aspect of the implementation (or the motivation behind it) I am happy to discuss it

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +21231 pull_request: https://github.com/python/cpython/pull/22149 ___ Python tracker ___

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread STINNER Victor
STINNER Victor added the comment: > Python/_warnings.c I'm not sure if it's a good idea to convert the _warnings module to multi-phase init, since it uses a state stored in the interpreter: /* Given a module object, get its per-module state. */ static WarningsState *

[issue41732] Custom iterator to memoryview - performance improvement

2020-09-08 Thread STINNER Victor
STINNER Victor added the comment: Thanks Diogo Flores, it's a nice optimization! Stefan Krah: "It would have been nice to have had a chance to look at this, but apparently those days are over." The PR has been approved by two core developers. It's a nice optimization, I don't see what is

[issue41736] test_site: test_s_option() failed on AMD64 Windows8.1 Refleaks 3.7

2020-09-08 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41730] Show deprecation warnings for tkinter.tix

2020-09-08 Thread E. Paine
E. Paine added the comment: +1 I think this would be very helpful as the only places I can find its deprecation are a small note at the top of the Tix Python docs [https://github.com/python/cpython/commit/bd63353] and a news entry a long way down the 3.6 release notes

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread STINNER Victor
STINNER Victor added the comment: 2020-06-22 16:58: "List of the 58 C extensions using the legacy API (...)" UPDATE: 56% of Modules/*.c modules are converted (48 on 85). Since June, 21 extension modules have been converted. There are now 37 remaining extensions which still use

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +21230 pull_request: https://github.com/python/cpython/pull/22148 ___ Python tracker ___

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 52a2df135c0470b1dbf889edc51b7c556ae4bc80 by Mohamed Koubaa in branch 'master': bpo-1635741: Convert _sha256 types to heap types (GH-22134) https://github.com/python/cpython/commit/52a2df135c0470b1dbf889edc51b7c556ae4bc80 --

[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread David Williams
New submission from David Williams : The Python documentation contains unnecessarily verbose and gendered language which does not enhance clarity, and rather, serves as non-inclusive to the LGTBQ community For example: https://www.python.org/dev/peps/pep-3136/ "Introduction The break

[issue41744] NuGet python.props only works in python nuget, not other variants

2020-09-08 Thread Vaclav Slavik
New submission from Vaclav Slavik : NuGet automatically includes .props file from the build directory in the target using the package, but only if the file has the correct name: it must be $(id).props. This means that Python's support for this only works correctly in the python nuget

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset f315142ddc61e54a59028db562aec5f62db783e1 by Victor Stinner in branch 'master': bpo-1635741: Port mashal module to multi-phase init (#22149) https://github.com/python/cpython/commit/f315142ddc61e54a59028db562aec5f62db783e1 --

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset bb083d33f7ffe93cee9e1f63d1e526dc81a6e34f by Victor Stinner in branch 'master': bpo-1635741: Port _string module to multi-phase init (GH-22148) https://github.com/python/cpython/commit/bb083d33f7ffe93cee9e1f63d1e526dc81a6e34f --

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-08 Thread Petr Viktorin
Petr Viktorin added the comment: That is interesting. The original post here doesn't mention that the problem occurs in Mercurial's "make all", specifically when building documentation, in the command: /usr/bin/python3.9 gendoc.py "hgrc.5" > hgrc.5.txt.tmp Could you confirm `make all`

[issue41703] Most bytecode changes are absent from Python 3.9 What's new

2020-09-08 Thread Mark Shannon
Change by Mark Shannon : -- assignee: -> Mark.Shannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41744] NuGet python.props only works in python nuget, not other variants

2020-09-08 Thread Vaclav Slavik
Change by Vaclav Slavik : -- keywords: +patch pull_requests: +21233 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22154 ___ Python tracker ___

[issue41744] NuGet python.props only works in python nuget, not other variants

2020-09-08 Thread Steve Dower
Change by Steve Dower : -- versions: +Python 3.10, Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process

2020-09-08 Thread Irit Katriel
Irit Katriel added the comment: We've decided for now to leave the code's behavior as it is (the alternatives are worse) and to keep only the test improvements. See discussion on PR 22142. -- versions: +Python 3.10 -Python 3.9 ___ Python tracker

[issue41744] NuGet python.props only works in python nuget, not other variants

2020-09-08 Thread Steve Dower
Steve Dower added the comment: Thanks for the contribution! I think I only ever tested this with the 64-bit package... :) Could you make it so that we include the file under both names? Just for anyone (like me) who has hard-coded the python.props name and parametrised the directory name.

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-08 Thread Manuel Jacob
Manuel Jacob added the comment: I couldn’t reproduce the problem with a freshly compiled Python 3.9.0rc1 on Arch Linux. Was this ever reproduced on a non-Red Hat system? -- nosy: +mjacob ___ Python tracker

[issue41703] Most bytecode changes are absent from Python 3.9 What's new

2020-09-08 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +21232 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22151 ___ Python tracker ___

[issue41703] Most bytecode changes are absent from Python 3.9 What's new

2020-09-08 Thread Mark Shannon
Mark Shannon added the comment: https://bugs.python.org/issue39320 has a change note: https://docs.python.org/3.9/whatsnew/changelog.html#python-3-9-0-beta-3 -- ___ Python tracker

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-08 Thread Julian Berman
New submission from Julian Berman : The following code succeeds "silently", which seems undesirable: from inspect import signature def two(): return 2 bound = signature(two).bind() bound.arguments["does_not_exist"] = 12 two(*bound.args, **bound.kwargs) where the

[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread STINNER Victor
STINNER Victor added the comment: Hi, https://www.python.org/dev/peps/pep-3136/ is not really directly part of Python. The document is hosted at https://github.com/python/peps/ and was authored by Matt Chisholm. I suggest you to propose a PR on the PEP document and try to get it reviewed

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-08 Thread Manuel Jacob
Manuel Jacob added the comment: I was running "make all" and I also ran the documentation generator command without an error. However, I tried it again and now it failed the same way as reported. With a debug build, I get "Python/Python-ast.c:231: get_ast_state: Assertion `state != NULL'

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-08 Thread Julian Berman
Change by Julian Berman : -- nosy: +yselivanov versions: -Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list

[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2020-09-08 Thread Martijn Pieters
Martijn Pieters added the comment: Might it be better to just *drop* the AutoProxy object altogether? All that it adds is a delayed call to MakeProxyType(f"AutoProxy[{typeid}]", exposed) (with exposed defaulting to public_methods(instance)), per instance per process. It could be replaced

[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread David Williams
David Williams added the comment: Thanks Victor, I will submit a change request for both of the documents you specified. https://www.python.org/dev/peps/pep-3136/ https://github.com/python/devguide/issues/605 Steven, it sounds like we agree to the change proposal, which is to remove

[issue41733] ContextVar get value is unexpected

2020-09-08 Thread Yury Selivanov
Yury Selivanov added the comment: > my expected result is all objects should be different, because the code runs > in different context. Contexts "branch", so if you store something in the context before asyncio.run it will store it in the current thread state. And then asyncio.run will

[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread Steven D'Aprano
Steven D'Aprano added the comment: Hello David, I really don't think you speak for the entire LGBTQ community. You don't speak for me or my wife. You mention two issues here: "First is that break and continue don't allow the programmer to do anything, they cause the program control flow

[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread David Williams
David Williams added the comment: Thanks also for your input and feedback, Ammar. -- ___ Python tracker ___ ___ Python-bugs-list

[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread Ammar Askar
Ammar Askar added the comment: The other issue aside, changing "If the programmer wishes to move to the next iteration of an outer enclosing loop, or terminate multiple loops at once, he or she has a few less-than elegant options." to "If the programmer wishes to move to the next

[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread Ammar Askar
Change by Ammar Askar : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41539] print blocks with multiprocessing and buffered output

2020-09-08 Thread Irit Katriel
Irit Katriel added the comment: You're right, this is a different issue. I debugged it a bit and I think the race may be between your print statement and the util._flush_std_streams() in Popen.__init__() of Lib/multiprocessing/popen_fork.py. --

[issue41703] Most bytecode changes are absent from Python 3.9 What's new

2020-09-08 Thread Mark Shannon
Mark Shannon added the comment: The change note for 33387 incorrectly referred to 32949 -- stage: patch review -> ___ Python tracker ___

[issue41539] print blocks with multiprocessing and buffered output

2020-09-08 Thread Irit Katriel
Irit Katriel added the comment: This may be relevant: https://stackoverflow.com/questions/9337711/subprocess-popen-not-thread-safe It points to print() being not thread safe and suggests to use sys.stdout.write instead. That worked for me with your script. --

[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Tue, Sep 08, 2020 at 06:23:58PM +, David Williams wrote: > Steven, it sounds like we agree to the change proposal, which is to > remove gendered language from the documentation. What? Did you even read what I wrote? --

[issue41525] Python '--help' has corrupted text.

2020-09-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 58de1dd6a8677bd213802c19204b827cb7134695 by Serhiy Storchaka in branch 'master': bpo-41525: Make the Python program help ASCII-only (GH-21836) https://github.com/python/cpython/commit/58de1dd6a8677bd213802c19204b827cb7134695 --

[issue41525] Python '--help' has corrupted text.

2020-09-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +21237 pull_request: https://github.com/python/cpython/pull/22163 ___ Python tracker ___

[issue41525] Python '--help' has corrupted text.

2020-09-08 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +21236 pull_request: https://github.com/python/cpython/pull/22162 ___ Python tracker

[issue41525] Python '--help' has corrupted text.

2020-09-08 Thread William Pickard
Change by William Pickard : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41525] Python '--help' has corrupted text.

2020-09-08 Thread miss-islington
miss-islington added the comment: New changeset 9171dc2827650a1a3c20dee994145e335befa00e by Miss Islington (bot) in branch '3.8': bpo-41525: Make the Python program help ASCII-only (GH-21836) https://github.com/python/cpython/commit/9171dc2827650a1a3c20dee994145e335befa00e --

[issue41525] Python '--help' has corrupted text.

2020-09-08 Thread miss-islington
miss-islington added the comment: New changeset 11a82c7220a29aa1cabd6a1b042742b44c9c9b91 by Miss Islington (bot) in branch '3.9': bpo-41525: Make the Python program help ASCII-only (GH-21836) https://github.com/python/cpython/commit/11a82c7220a29aa1cabd6a1b042742b44c9c9b91 --

[issue19438] Where is NoneType in Python 3?

2020-09-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would support adding NoneType back to the types module. Am not sure why it was ever removed. It has a much reason to exists as types.FunctionType which is a clear, well-named short-cut for "type(lambda :None)". -- nosy: +rhettinger

[issue19438] Where is NoneType in Python 3?

2020-09-08 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch nosy: +adelfino nosy_count: 3.0 -> 4.0 pull_requests: +21235 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22161 ___ Python tracker

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-08 Thread Julian Berman
Julian Berman added the comment: As a secondary behavior here, which is actually the one that matters more for my use case, the following seems surprising as well: import inspect s = inspect.signature(lambda **kwargs: kwargs).bind() s.arguments["foo"] = 12 will similarly silently drop "foo"

[issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process

2020-09-08 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 3fd69991f47a6672c510fafd76bf183f17ac52ec by Irit Katriel in branch 'master': bpo-38762: Extend logging.test_multiprocessing to cover missing cases. (GH-22142) https://github.com/python/cpython/commit/3fd69991f47a6672c510fafd76bf183f17ac52ec

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2020-09-08 Thread Chary Chary
Chary Chary added the comment: Dear all, are there any plans to move this quite old issue forward? I stumbled across this issue, because I found that at the moment there is no out of the box solution to use  tempfile.NamedTemporaryFile in Windows in such scenario (which is often used in unit

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: > No, I am not proposing any modification to the ASDL parsers nor > the ASDL definition language. I am proposing a modification to > the internal data structures we use internally to carry sequences > of ASDL types. Thanks for the clarification. Carry

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Guido van Rossum
Guido van Rossum added the comment: I know it's moot now, but still -- what benefit do we get from using a "standard" like ASDL? All our tooling for it is custom for Python only. -- ___ Python tracker

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > I know it's moot now, but still -- what benefit do we get from using a > "standard" like ASDL? All our tooling for it is custom for Python only. I think there are other tools or implementations of Python that use standard parsers for our ASDL file.

[issue41748] HTMLParser: parsing error

2020-09-08 Thread Ademar Nowasky Junior
Change by Ademar Nowasky Junior : -- type: crash -> security ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41747] dataclasses: generated method's using the wrong qualname

2020-09-08 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : $ cat t.py from dataclasses import dataclass @dataclass class Foo: bar: int Foo() $ python t.py Traceback (most recent call last): File "/home/isidentical/cpython/cpython/t.py", line 7, in Foo() TypeError: __create_fn__..__init__() missing 1

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Let me know if I'm misunderstanding the proposal. Are you proposing a non-standard ASDL extension to that won't work with existing ASDL parsers? I thought the entire point of ASDL is that it was standard, portable, and had a fixed number of types

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: The problem with asdl_seq_int was that it was hard-coded since there was no entity that transpods data between different traversers / node visitors. PR 20193 tries to implement a general-purpose metadata system to eliminate that issue, and can be easily

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > That's a possibility, but that would incur in a lot of new extra code, and > some asdl_seq items in the parser contain non-standard types that only PEG > uses, so is not possible to auto-generate them. Well, since the extra code will be autogenerated,

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: That all makes sense (including the full migration). -- ___ Python tracker ___ ___

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread mohamed koubaa
Change by mohamed koubaa : -- pull_requests: +21238 pull_request: https://github.com/python/cpython/pull/22164 ___ Python tracker ___

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread mohamed koubaa
Change by mohamed koubaa : -- pull_requests: +21239 pull_request: https://github.com/python/cpython/pull/22165 ___ Python tracker ___

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-08 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 3ff6975e2c0af0399467f234b2e307cc76efcfa9 by Mohamed Koubaa in branch 'master': bpo-1635741: port scproxy to multi-phase init (GH-22164) https://github.com/python/cpython/commit/3ff6975e2c0af0399467f234b2e307cc76efcfa9 --

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Guido van Rossum
Guido van Rossum added the comment: I guess some of my gripes about ASDL have to do with our tooling. For example I find it annoying that the 'kind' enums overlap, so if I have a void* that I know points to an AST node I can't look at the kind to tell what it is. Anyway, regarding Pablo's

[issue41749] Little improve on imghdr library

2020-09-08 Thread Emmanuel Arias
New submission from Emmanuel Arias : For the `what()` function, the `file` parameter is always needed. In despite of that users can use `h` for send a bytes stream to detect the kind of the image, the `file` parameter is need. Don't have sense ask for `file` parameter when this parameter will

[issue19438] Where is NoneType in Python 3?

2020-09-08 Thread Andrés Delfino
Andrés Delfino added the comment: types.NoneType was removed here: https://github.com/python/cpython/commit/c9543e42330e5f339d6419eba6a8c5a61a39aeca#diff-0f021aec4e35b86a3160d44069dec997 The thing of adding NoneType to types that is somewhat unpleasing to me is that it's named exactly as the

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I know it's moot now, but still -- what benefit do we get > from using a "standard" like ASDL? The "standard" part of it isn't important. AFAICT, ASDL has a low adoption rate and is not maintained. IMO, the part that matters is that ADSL was

[issue41747] dataclasses: generated method's using the wrong qualname

2020-09-08 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41749] Little improve on imghdr library

2020-09-08 Thread Emmanuel Arias
Change by Emmanuel Arias : -- keywords: +patch pull_requests: +21240 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22166 ___ Python tracker ___

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Let me know if I'm misunderstanding the proposal. Are you proposing a > non-standard ASDL extension to that won't work with existing ASDL parsers? No, I am not proposing any modification to the ASDL parsers nor the ASDL definition language. I am

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: We already have a specialized type for int (actually an enumeration); typedef struct { Py_ssize_t size; void *elements[1]; } asdl_seq; typedef struct { Py_ssize_t size; int elements[1]; } asdl_int_seq; Why not just include these in the

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Why not just include these in the Python-ast.h and auto-generate them in the > asdl_c.py That's a possibility, but that would incur in a lot of new extra code, and some asdl_seq items in the parser contain non-standard types that only PEG uses, so

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Well, since the extra code will be autogenerated, guess it wouldn't be much > problematic. It will because it means that generic functions that receive asdl_seq an need to cast aliased pointers because they will still receive asdl_seq* items and

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : Casting incorrect elements pulled from asdl_seq objects has been a pain when developing the new PEG parser and is a source of spooky-bug-at-a-distance problems in which the consequences of an incorrect casting from void* are felt much later. I

[issue41747] dataclasses: generated method's using the wrong qualname

2020-09-08 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +21234 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22155 ___ Python tracker ___

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Within standard ASDL, the sequences already have an ASDL type. Here's a snippet that shows both builtin types and derived types: start = Program(stmt* procs, expr* calls) stmt = Procedure(identifier name, identifier* params, bool is_test, stmt body)

[issue41734] Refactor b32{encode,decode} tests

2020-09-08 Thread Paul Ganssle
Paul Ganssle added the comment: I agree with Filipe here — I think the b32encode/b32decode tests were originally written before subtests were available, and this PR has this and other real improvements. I understand why you'd want to have a policy of "no refactoring for its own sake", but

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Well, since the extra code will be autogenerated, guess it wouldn't be much > problematic. But I see about the PEG thing. On the other hand, having explicit types for the sequences will allow us to get compile errors instead of runtime errors for

[issue41748] HTMLParser: parsing error

2020-09-08 Thread Ademar Nowasky Junior
New submission from Ademar Nowasky Junior : HTML tags that have a attribute name starting with a comma character aren't parsed and break future calls to feed(). The problem occurs when such attribute is the second one or later in the HTML tag. Doesn't seems to affect when it's the first