[issue17972] inspect module docs omits many functions

2018-01-03 Thread Paul Rudin
Paul Rudin added the comment: If some are to be considered private then the questions are: which ones and how to fix. Presumably renaming to start with "_" might break existing code, so maybe adding an __all__, and just including the public objects is better? That could

[issue32491] base64.decode: linebreaks are not ignored

2018-01-03 Thread Martin Panter
Martin Panter added the comment: I wrote an incremental base-64 decoder for the "codecs" module in Issue 27799, which you could use. It just does some preprocessing using a regular expression to pick four-character chunks before passing the data to a2b_base64. Or maybe

[issue32455] PyCompile_OpcodeStackEffect() and dis.stack_effect() are not particularly useful

2018-01-03 Thread Larry Hastings
Larry Hastings added the comment: > 1. This will actually simplify the code for calculating the stack size. Simplify whose code, the caller or the callee? It seems like it's simplifying the life of the callee (PyCompile_OpcodeStackEffectEx) at the expense of pushing

[issue32455] PyCompile_OpcodeStackEffect() and dis.stack_effect() are not particularly useful

2018-01-03 Thread Larry Hastings
Change by Larry Hastings : -- nosy: +vstinner ___ Python tracker ___ ___

[issue32455] PyCompile_OpcodeStackEffect() and dis.stack_effect() are not particularly useful

2018-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1. This will actually simplify the code for calculating the stack size. Instead of supporting special cases for jumping instructions in stackdepth_walk() you could just write something like new_depth = depth +

[issue32491] base64.decode: linebreaks are not ignored

2018-01-03 Thread R. David Murray
R. David Murray added the comment: This reduces to the following: >>> from binascii import a2b_base64 as f >>> f(b'MTIzND\nU2Nzg5\n') b'123456789' >>> f(b'MTIzND\n') Traceback (most recent call last): File "", line 1, in binascii.Error: Incorrect padding That is,

[issue32455] PyCompile_OpcodeStackEffect() and dis.stack_effect() are not particularly useful

2018-01-03 Thread Larry Hastings
Larry Hastings added the comment: The rationale: without this information, it is impossible for anybody else to write a bytecode compiler / assembler, because when you create a code object you have to specify its stack depth. I used this information for my "maynard"

[issue32491] base64.decode: linebreaks are not ignored

2018-01-03 Thread Gregory P. Smith
New submission from Gregory P. Smith : I've tried reading various RFCs around Base64 encoding, but I couldn't make the ends meet. Yet there is an inconsistency between base64.decodebytes() and base64.decode() in that how they handle linebreaks that were used to collate the

[issue32455] PyCompile_OpcodeStackEffect() and dis.stack_effect() are not particularly useful

2018-01-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: What was the rationale for exposing these interfaces in the first place? If they're not useful, I'd rather deprecate and remove them. -- nosy: +benjamin.peterson ___ Python tracker

[issue15982] asyncore.dispatcher does not handle windows socket error code correctly (namely WSAEWOULDBLOCK 10035)

2018-01-03 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue since David Vitek proposed a patch. -- resolution: duplicate -> status: closed -> open ___ Python tracker

[issue32477] Move jumps optimization from the peepholer to the compiler

2018-01-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, on the other hand, the change you're proposing is hardly necessary, unless it actually demonstrates a noticeable improvement on some workload. So perhaps we should leave the peepholer alone until someone has a better idea. --

[issue32477] Move jumps optimization from the peepholer to the compiler

2018-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I think it's valuable to have a separate C module for optimizations, instead > of cramming them in compiler.c. This would require major rewriting. PR 5077 adds just two functions in compile.c. But they use 4 structures

[issue32346] Speed up slot lookup for class creation

2018-01-03 Thread Guido van Rossum
Guido van Rossum added the comment: I don't recall what I meant to use tp_cache for, but everything I can find about it says it's unused, so let's kill it if we can. I guess the ABI requires that we keep the slot around until we find a new use for it? --

[issue32428] dataclasses: make it an error to have initialized non-fields in a dataclass

2018-01-03 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > There is no real conflict with PEP 526 though. PEP 526 introduces ClassVar so > the type checker can be made to understand. PEP 557 allows omitting ClassVar > in case you don't care about type checkers. So I think we should stick with

[issue32428] dataclasses: make it an error to have initialized non-fields in a dataclass

2018-01-03 Thread Guido van Rossum
Guido van Rossum added the comment: > > I liked the original design better, where things without annotations would > > just be ignored. What changed? > With the original proposal the ignored variables without annotations will > behave as class variables. This "conflicts"

[issue32489] Allow 'continue' in 'finally' clause

2018-01-03 Thread Guido van Rossum
Guido van Rossum added the comment: I think this should be accepted once the code is reviewed. -- ___ Python tracker ___

[issue32477] Move jumps optimization from the peepholer to the compiler

2018-01-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > But some peephole optimizations will work with the intermediate fixed-size > representations used by the compiler, before generating the concrete bytecode. Then perhaps the goal should be to make the peephole operate on that intermediate

[issue32477] Move jumps optimization from the peepholer to the compiler

2018-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually moving any of remaining optimizations (including two optimizations that are moved by this issue and two other that are left) slightly increases the complexity. But instead the optimizations become more general. At the

[issue32490] subprocess: duplicate filename in exception message

2018-01-03 Thread Jakub Wilk
New submission from Jakub Wilk : Python 3.6.4 (default, Jan 3 2018, 21:10:22) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import subprocess >>> subprocess.call('nonexistent') Traceback (most recent call last): File "", line

[issue32449] MappingView must inherit from Collection instead of Sized

2018-01-03 Thread Yahya Abou Imran
Yahya Abou Imran added the comment: I'm sorry, It's already done... https://bugs.python.org/issue32467 -- ___ Python tracker

[issue32489] Allow 'continue' in 'finally' clause

2018-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See the patch against PR 5006 at https://github.com/serhiy-storchaka/cpython/pull/2. -- ___ Python tracker

[issue32449] MappingView must inherit from Collection instead of Sized

2018-01-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Maybe I have to open a new one? No need. Just continue here. -- ___ Python tracker

[issue32489] Allow 'continue' in 'finally' clause

2018-01-03 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : A 'continue' statement is illegal in the 'finally' clause due to a problem with the current implementation. After resolving issue17611 it will be easy to remove this restriction. -- assignee: serhiy.storchaka

[issue15982] asyncore.dispatcher does not handle windows socket error code correctly (namely WSAEWOULDBLOCK 10035)

2018-01-03 Thread David Vitek
David Vitek added the comment: It doesn't look like the fix for issue #16133 fixed this problem, or perhaps it only fixed it for asynchat but not asyncore. I have attached a patch (against python 2, since this is where I needed it fixed). The patch treats WSA flavors

[issue32485] Multiprocessing dict sharing between forked processes

2018-01-03 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +davin ___ Python tracker ___ ___

[issue32477] Move jumps optimization from the peepholer to the compiler

2018-01-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: > This is a step to getting rid of the peepholer. There is no goal to get rid of the peepholer optimizer. Please don't invent this as a requirement. If some optimization are more easily performed upstream, then go ahead and

[issue32471] Add an UML class diagram to the collections.abc module documentation

2018-01-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is a nice looking diagram. Nice work. The existing table is great when you care about knowing what a particular ABC does, but the diagram nicely gives an overview of whole ecosystem all at once. If the collections.abc

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2018-01-03 Thread Michael Felt
Michael Felt added the comment: On 24/02/2017 09:44, Michael Haubenwallner wrote: > Michael Haubenwallner added the comment: > > Let's switch to github-based patches to discuss about: > https://github.com/python/cpython/compare/2.7...haubi:issue27435/2.7 > > For the

[issue32471] Add an UML class diagram to the collections.abc module documentation

2018-01-03 Thread Brett Cannon
Brett Cannon added the comment: I should mention that over on python-ideas people found the open source code to plantuml, so I think the format is acceptable for use in the docs. -- ___ Python tracker

[issue32488] Fatal error using pydoc

2018-01-03 Thread Ned Deily
Ned Deily added the comment: Glad you solved the immediate problem. Under the covers, pydoc (either pydoc2 or pydoc3) tries to import all the modules associated with the interpreter instance it's running under - from the Python standard library plus any additional

[issue31113] Stack overflow with large program

2018-01-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka dependencies: +co_stacksize estimate can be highly off ___ Python tracker

[issue32455] PyCompile_OpcodeStackEffect() and dis.stack_effect() are not particularly useful

2018-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: After resolving issue24340 I'm going to add PyCompile_OpcodeStackEffect() that takes an additional integer argument, and add an optional tristate argument to dis.stack_effect(). If it is True, return the effect when jump, if it

[issue32473] Readibility of ABCMeta._dump_registry()

2018-01-03 Thread Yahya Abou Imran
Change by Yahya Abou Imran : -- keywords: +patch pull_requests: +4963 stage: -> patch review ___ Python tracker ___

[issue32455] PyCompile_OpcodeStackEffect() and dis.stack_effect() are not particularly useful

2018-01-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue32488] Fatal error using pydoc

2018-01-03 Thread Dave Opstad
Dave Opstad added the comment: I think this was my mistake; when I used pydoc3 instead of pydoc it ran to completion. Please feel free to close this; sorry for the noise. -- ___ Python tracker

[issue32488] Fatal error using pydoc

2018-01-03 Thread R. David Murray
Change by R. David Murray : -- components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker ___

[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-03 Thread Michael Felt
Michael Felt added the comment: On 03/01/2018 18:03, Xavier de Gaye wrote: > Xavier de Gaye added the comment: > > The following patch may be less invasive and more explicit: > > diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c > index

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2018-01-03 Thread Neil Schemenauer
Neil Schemenauer added the comment: On 2017-12-29, Mark Shannon wrote: > One point I didn't cover is jumping to a new line in the debugger. > Implementing that reliably for finally blocks with code > duplication is tricky and would mean adding a number of marker >

[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-03 Thread Michael Felt
Michael Felt added the comment: Ignore my last comment - I have a headache. If I could edit/delete it I would. aka "reset 2018 - here I come!" -- ___ Python tracker

[issue32488] Fatal error using pydoc

2018-01-03 Thread Dave Opstad
New submission from Dave Opstad : I'm running 3.6.4 on Mac OS X 10.13.2, bash shell. Doing: $ pydoc modules causes: Please wait a moment while I gather a list of all available modules... Fatal Python error: PyThreadState_Get: no current thread Abort trap: 6

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2018-01-03 Thread Christian Heimes
Christian Heimes added the comment: I'm working on a hashing algorith v2.0 PEP. New hashing constructors and modules will have an allow_optimization flag and oid attribute. Once finalized and implemented, hashlib.pbkdf2_hmac() will support digestmod and digest constructors

[issue32346] Speed up slot lookup for class creation

2018-01-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: What exactly is tp_cache? Apparently it was added by Guido in https://github.com/python/cpython/commit/687ae00460da9cac04eb1ba8f6f5ab4db25fbfc2 but never used (at least officially). commit 687ae00460da9cac04eb1ba8f6f5ab4db25fbfc2 Author:

[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-03 Thread Michael Felt
Michael Felt added the comment: On 03/01/2018 14:41, David Edelsohn wrote: > David Edelsohn added the comment: > > _ALL_SOURCE is overkill. It probably is too big a club for this regression. Maybe. Clearly it is a big club. The documentation - if you

[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: The following patch may be less invasive and more explicit: diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 38b6c80e6b..e0bb4ba869 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -9325,7 +9325,11 @@

[issue32428] dataclasses: make it an error to have initialized non-fields in a dataclass

2018-01-03 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Just to clarify the previous comment, I still think that flagging this @dataclass class C: x = field() is important, since simply ignoring a ``field()`` will be too confusing (especially for ``attrs`` users). The previous comment

[issue32428] dataclasses: make it an error to have initialized non-fields in a dataclass

2018-01-03 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > I liked the original design better, where things without annotations would > just be ignored. What changed? With the original proposal the ignored variables without annotations will behave as class variables. This "conflicts" with

[issue32484] ImportError for gdbm 1.14

2018-01-03 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___

[issue32487] assertRaises should return the "captured" exception

2018-01-03 Thread R. David Murray
R. David Murray added the comment: This has been proposed and rejected before, for example in issue 28135. If you want to pursue it you'll need to start a thread on python-ideas. -- nosy: +r.david.murray resolution: -> duplicate stage: needs patch -> resolved

[issue32487] assertRaises should return the "captured" exception

2018-01-03 Thread Facundo Batista
New submission from Facundo Batista : Sometimes it's nice to do extra checks on the error raised and captured by self.assertRaises call. Yes, the same can be achieved using assertRaises as a context manager and then accessing the `exception` attribute in the context

[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-03 Thread David Edelsohn
David Edelsohn added the comment: _ALL_SOURCE is overkill. It probably is too big a club for this regression. However, the AIX header definition of fsid compatible with the current Python posixmodule.c code is bracketed by _ALL_SOURCE. AFAICT, the change to posixmodule.c

[issue32390] AIX (xlc_r) compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: The _ALL_SOURCE feature test macro is set by the AC_USE_SYSTEM_EXTENSIONS macro in configure.ac. It is not clear why the _ALL_SOURCE macro is currently needed by Python. The _ALL_SOURCE feature test macro is defined here:

[issue32346] Speed up slot lookup for class creation

2018-01-03 Thread INADA Naoki
INADA Naoki added the comment: How about reusing tp_cache instead of adding new slot? -- ___ Python tracker ___

[issue32485] Multiprocessing dict sharing between forked processes

2018-01-03 Thread Christian Heimes
Christian Heimes added the comment: Don't worry about your choice of words. We usually use the C definition of the term crash. An exception is just a bug, but a segfault may be a security issue. -- ___ Python tracker

[issue32461] the first build after a change to Makefile.pre.in uses the old Makefile

2018-01-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: Two problems: * It is not clear whether one should re-run make after the Makefile file has been updated since the (stale when not using GNU make) Makefile is run to completion. * The 'Makefile' target is remade twice when Makefile.pre.in

[issue32456] PYTHONIOENCODING=undefined doesn't work in Python 3

2018-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The "undefined" encoding exists. -- ___ Python tracker ___

[issue32486] tail optimization for 'yield from'

2018-01-03 Thread Robert Smart
New submission from Robert Smart : When a generator procedure ends with "yield from" it would be nice if this was handled efficiently (just replace the generator with the new source). Because it is natural to push things back into a generator with def

[issue32456] PYTHONIOENCODING=undefined doesn't work in Python 3

2018-01-03 Thread STINNER Victor
STINNER Victor added the comment: Can't we check if the encoding exists using codecs.lookup() before using it to emit a better error message? Look at initfsencoding() in the C code which implements such check. -- ___

[issue32485] Multiprocessing dict sharing between forked processes

2018-01-03 Thread André Neto
André Neto added the comment: You are right, it does not segfault (sorry for the abuse of language). It raises an exception while accessing the shared dictionary. The exception varies but typically is: Traceback (most recent call last): File "multiprocessbug.py",

[issue32456] PYTHONIOENCODING=undefined doesn't work in Python 3

2018-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for solving this puzzle Martin. The question is whether we need to do something for improving error reporting in this case or just close this issue with a resolution "not a bug" or "won't fix". --

[issue15450] Allow dircmp.subdirs to behave well under subclassing

2018-01-03 Thread Mitar
Change by Mitar : -- pull_requests: +4962 ___ Python tracker ___ ___ Python-bugs-list

[issue32485] Multiprocessing dict sharing between forked processes

2018-01-03 Thread Christian Heimes
Christian Heimes added the comment: Does it it actually crash (segfault) or are you merely getting an exception? I'm just getting bunch of exception: Traceback (most recent call last): File "multiprocessing_crash.py", line 155, in

[issue32485] Multiprocessing dict sharing between forked processes

2018-01-03 Thread André Neto
New submission from André Neto : I'm working on a project where I need to share state between several processes (forked using gunicorn). I'm using dictionaries obtained from a multiprocessing SyncManager to achieve this. The issue is that if I have multiple forked

[issue15450] Allow dircmp.subdirs to behave well under subclassing

2018-01-03 Thread Mitar
Change by Mitar : -- nosy: +mitar ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue12932] filecmp.dircmp does not allow non-shallow comparisons

2018-01-03 Thread Mitar
Change by Mitar : -- nosy: +mitar ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29708] support reproducible Python builds

2018-01-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +Ray Donnelly ___ Python tracker ___ ___

[issue29708] support reproducible Python builds

2018-01-03 Thread Alexandru Ardelean
Alexandru Ardelean added the comment: Thank you for the heads-up. I did not follow-up too in-depth on the resolution. I just stumbled over this last night. Will keep an eye for 3.7, and see about 2.7. -- ___ Python tracker