[issue30640] NULL + 1

2017-06-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In _PyFunction_FastCallDict() if nk == 0, k is set to NULL. After that k + 1 is passed to _PyEval_EvalCodeWithName(). NULL + 1 is an undefined behavior. -- components: Interpreter Core messages: 295786 nosy: haypo, serhiy.storchaka priority: normal

[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-06-12 Thread STINNER Victor
STINNER Victor added the comment: Here are benchmark results. Sorry, but I'm not really convinced that this specialization is worth it. The change adds yet another calling convention where we already have METH_NOARG, METH_VARARGS, METH_O, METH_NOARG | METH_KEYWORDS, METH_FASTCALL... I'm ok

Nikola v7.8.8 is out!

2017-06-12 Thread Chris Warrick
On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.8.8. It fixes some bugs and adds new features. What is Nikola? === Nikola is a static site and blog generator, written in Python. It can use Mako and Jinja2 templates, and input in many

Twisted 17.5 Release Announcement

2017-06-12 Thread Amber Hawkie Brown
On behalf of Twisted Matrix Laboratories, I am honoured to announce the release of Twisted 17.5! The highlights of this release are: - twisted.python.url has been spun out into the new 'hyperlink' package; importing twisted.python.url is now a compatibility alias - Initial support for OpenSSL

[issue30596] Add close() to multiprocessing.Process

2017-06-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I want close() to be deterministic. So I guess we have two simple possibilities: 1) close() raises if the process is still alive 2) close() calls join() implicitly if the process is still alive -- ___ Python

[issue30596] Add close() to multiprocessing.Process

2017-06-12 Thread Jim Jewett
Jim Jewett added the comment: Could join be called in a background thread, or even asynchronously? That seems like mixing paradigms, but ... On Jun 12, 2017 3:15 AM, "Antoine Pitrou" wrote: > > Antoine Pitrou added the comment: > > That's a good question. close()

[issue30639] inspect.getfile(obj) calls object repr on failure

2017-06-12 Thread Thomas Kluyver
New submission from Thomas Kluyver: This came up in IPython & Jedi: several functions in inspect end up calling getfile(). If the object is something for which it can't find the source file, it throws an error, the message for which contains the object's repr. This is problematic for us

[issue30615] [EASY][2.7] test_recursive_repr() of test_xml_etree_c leaks references

2017-06-12 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30638] Additional dependencies and rule for `make regen-all`

2017-06-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: `make regen-all` regenerates many generated files. But not all. 1. Argument Clinic files has their own make target, `make clinic`. Perhaps "clinic" should be a dependency for "regen-all". 2. Lib/token.py and Lib/symbols.py are generated from

[issue30615] [EASY][2.7] test_recursive_repr() of test_xml_etree_c leaks references

2017-06-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset 41af942e57f9a450cf273ef6b72a21380c6ba8d1 by Victor Stinner (Stéphane Wirtel) in branch '2.7': bpo-30615: Fix the leak reference in Modules/_elementtree.c (#2129) https://github.com/python/cpython/commit/41af942e57f9a450cf273ef6b72a21380c6ba8d1

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-06-12 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +2184 ___ Python tracker ___ ___

[issue30589] With forkserver, Process.exitcode does not get signal number

2017-06-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've merged a fix for Python 3.7. Since the fix is a bit delicate, I don't want to risk regression by merging it into 3.6 and 3.5. Closing now. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5,

[issue30589] With forkserver, Process.exitcode does not get signal number

2017-06-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset dfd5f34634f9c505945e9348b4b799544680a7cf by Antoine Pitrou in branch 'master': Fix bpo-30589: improve Process.exitcode with forkserver (#1989) https://github.com/python/cpython/commit/dfd5f34634f9c505945e9348b4b799544680a7cf --

[issue30636] Add PYTHONCOERCECLOCALE to the help of the command line

2017-06-12 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- pull_requests: +2185 ___ Python tracker ___ ___

[issue30636] Add PYTHONCOERCECLOCALE to the help of the command line

2017-06-12 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: yep, I see that, I fix it asap -- ___ Python tracker ___ ___

[issue30636] Add PYTHONCOERCECLOCALE to the help of the command line

2017-06-12 Thread Nick Coghlan
Nick Coghlan added the comment: I just noticed that there's a line-wrapping problem in the patch as-merged. The output ends up being: PYTHONCOERCECLOCALE: if this variable is set to 0, it disables the locale coercion behavior It should either match the immediately preceding settings, which

[issue28414] SSL match_hostname fails for internationalized domain names

2017-06-12 Thread Nick Lamb
Nick Lamb added the comment: I endorse njs' recommended fix here. Don't try to get clever, this is a security component, it should be the dumbest it can be possibly be while being correct, because if it's smarter it will probably be wrong. -- nosy: +tialaramex

[issue30624] selectors should use bare except clauses

2017-06-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I see that on 3.6 except BaseException: is used, so the backport should not be necessary. -- resolution: -> fixed stage: backport needed -> resolved status: open -> closed versions: -Python 3.5, Python 3.6 ___

[issue30624] selectors should use bare except clauses

2017-06-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset ced36a993fcfd1c76637119d31c03156a8772e11 by Giampaolo Rodola in branch 'master': bpo-30624 remaining bare except (#2108) https://github.com/python/cpython/commit/ced36a993fcfd1c76637119d31c03156a8772e11 --

[issue30637] Syntax error reported on compile(...), but not on compile(..., ast.PyCF_ONLY_AST)

2017-06-12 Thread Hrvoje Nikšić
New submission from Hrvoje Nikšić: Our application compiles snippets of user-specified code using the compile built-in with ast.PyCF_ONLY_AST flag. At this stage we catch syntax errors and perform some sanity checks on the AST. The AST is then compiled into actual code using compile() and run

[issue23404] 'make touch' does not work with git clones of the source repository

2017-06-12 Thread Nick Coghlan
Nick Coghlan added the comment: Moving to deferred blocker and taking 3.6 off the affected versions list, since the 3.6 What's New has now been updated appropriately. Items still to be done: - make a similar change to the 3.5 What's New on the 3.5 branch - update the maintenance release

[issue30615] [EASY][2.7] test_recursive_repr() of test_xml_etree_c leaks references

2017-06-12 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- pull_requests: +2183 ___ Python tracker ___ ___

[issue23404] 'make touch' does not work with git clones of the source repository

2017-06-12 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset e1b690370fd8f93bef1e69eeea2695f95a7cfff5 by Nick Coghlan in branch '3.6': bpo-23404: `make regen-all` What's New entry (#2128) https://github.com/python/cpython/commit/e1b690370fd8f93bef1e69eeea2695f95a7cfff5 --

[issue30636] Add PYTHONCOERCECLOCALE to the help of the command line

2017-06-12 Thread Nick Coghlan
Changes by Nick Coghlan : -- resolution: -> fixed stage: -> resolved status: open -> closed type: -> enhancement ___ Python tracker

[issue30636] Add PYTHONCOERCECLOCALE to the help of the command line

2017-06-12 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 7d1017d9ed3285857e827635eda966da246dcd5f by Nick Coghlan (Stéphane Wirtel) in branch 'master': bpo-30636: Add PYTHONCOERCECLOCALE to the help of the command line (GH-2125)

[issue23404] 'make touch' does not work with git clones of the source repository

2017-06-12 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for that Victor. I started to review the PR, and then realised my suggestions were going to be extensive enough that it made more sense to post an alternate PR for you to review: https://github.com/python/cpython/pull/2128 --

[issue23404] 'make touch' does not work with git clones of the source repository

2017-06-12 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +2182 ___ Python tracker ___ ___

Re: Generate PDF with Tamil font problem

2017-06-12 Thread Steve D'Aprano
On Mon, 12 Jun 2017 05:51 pm, ccubed...@gmail.com wrote: > On Saturday, 5 March 2011 10:50:25 UTC+5:30, sath...@e-ndicus.com wrote: >> Hi All, >> >>I am using python's reportlab to print some unicode Tamil characters >> ''. I added necessary unicode font to reportlab. But It >> prints the

[issue30634] ctypes.cast(obj, ctypes.c_void_p) invalid return in linux_x64

2017-06-12 Thread Eryk Sun
Eryk Sun added the comment: It's undocumented that cast() should work to directly convert Python strings to pointers. Even when it seems to work, it's a risky thing to depend on because there's no source ctypes data object to reference. Thus there's neither _b_base_ nor anything in _objects

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-06-12 Thread Yury Selivanov
Yury Selivanov added the comment: See also issue 29970. -- ___ Python tracker ___ ___ Python-bugs-list

[issue29679] Add @contextlib.asynccontextmanager

2017-06-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed stage: -> resolved status: open -> closed type: -> enhancement ___ Python tracker

[issue23404] 'make touch' does not work with git clones of the source repository

2017-06-12 Thread STINNER Victor
STINNER Victor added the comment: I wrote https://github.com/python/cpython/pull/2127 to document "make regen-all". I'm not sure that it's the correct way to document such build change in minor 3.6 releases. Can someone please take a look? -- ___

[issue23404] 'make touch' does not work with git clones of the source repository

2017-06-12 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +2181 ___ Python tracker ___ ___

[issue9566] Compilation warnings under x64 Windows

2017-06-12 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue30635] Leak in test_c_locale_coercion

2017-06-12 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +2180 ___ Python tracker ___ ___

[issue30636] Add PYTHONCOERCECLOCALE to the help of the command line

2017-06-12 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- pull_requests: +2179 ___ Python tracker ___ ___

[issue30636] Add PYTHONCOERCECLOCALE to the help of the command line

2017-06-12 Thread Stéphane Wirtel
New submission from Stéphane Wirtel: Add the description of PYTHONCOERCECLOCALE in the command line. -- messages: 295763 nosy: matrixise, ncoghlan priority: normal severity: normal status: open title: Add PYTHONCOERCECLOCALE to the help of the command line versions: Python 3.7

[issue27425] Tests fail because of git's newline preferences on Windows

2017-06-12 Thread STINNER Victor
STINNER Victor added the comment: I'm happy to see this "old" issue now fixed :-) -- ___ Python tracker ___

[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-12 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___

[issue11822] Improve disassembly to show embedded code objects

2017-06-12 Thread STINNER Victor
STINNER Victor added the comment: Thanks Serhiy, it works and I like the result :-) >>> def f(): ... def g(): ... return 3 ... return g ... >>> import dis; dis.dis(f) 2 0 LOAD_CONST 1 (", line 2>) 2 LOAD_CONST 2 ('f..g')

[issue30635] Leak in test_c_locale_coercion

2017-06-12 Thread STINNER Victor
STINNER Victor added the comment: Likely a leak in the implementation of the PEP 538, commit 6ea4186de32d65b1f1dc1533b6312b798d300466, bpo-28180. -- nosy: +haypo ___ Python tracker

[issue30635] Leak in test_c_locale_coercion

2017-06-12 Thread Stéphane Wirtel
New submission from Stéphane Wirtel: ./python -m test -R 3:3 test_c_locale_coercion -m test_external_target_locale_configuration Mon 12 Jun 2017 10:57:14 AM CEST Run

[issue30635] Leak in test_c_locale_coercion

2017-06-12 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- nosy: +ncoghlan ___ Python tracker ___ ___

[issue30634] ctypes.cast(obj, ctypes.c_void_p) invalid return in linux_x64

2017-06-12 Thread fooofei
New submission from fooofei: module:ctypes pyversion: 2.7.13 python platform : win32, linux_x86_x64 I use ctypes.cast(v,ctypes.c_void_p).value to get address of 'helloworld' and u'helloworld' internal buffer address. the result is both right in win32,but not in linux. 'helloworld' is right,

[issue30633] Python 3.6.1 installation issues on OpenSuse 42.1: ModuleNotFoundError: No module named 'encodings'

2017-06-12 Thread Andreas Jung
New submission from Andreas Jung: Installing Python 3.6.1 from the sources on OpenSuse 42.1 gives me: o Python/mystrtoul.o Python/mysnprintf.o Python/peephole.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o

[issue30632] IDLE: add unittest to test_autocomplete

2017-06-12 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +2178 ___ Python tracker ___ ___ Python-bugs-list

[issue23033] Disallow support for a*.example.net, *a.example.net, and a*b.example.net in certificate wildcard handling.

2017-06-12 Thread Christian Heimes
Christian Heimes added the comment: It's probably not a good idea to port it to 3.6. It's a backwards incompatible change. -- ___ Python tracker ___

[issue30632] IDLE: add unittest to test_autocomplete

2017-06-12 Thread Louie Lu
New submission from Louie Lu: Add unittest to test_open_completions, test_fetch_copmletions, and test_get_entity in test_autocomplete -- assignee: terry.reedy components: IDLE messages: 295755 nosy: louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: add

[issue30571] Add integer formatting code for fixed-width signed arithmetic (2's complement)

2017-06-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The idea is that modifier (such as "!" would require a width argument (the > signed representation only make sense in fixed width concepts as every > assembly language programmer knows). Its presence would also imply the "0". I would use the precision

[issue30571] Add integer formatting code for fixed-width signed arithmetic (2's complement)

2017-06-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is a recurring need in my teaching of Python to hardware engineers. The whole point of having a binary format code is to show which bits are set. For negative values, that need is not being served by the current option. And it makes it awkward

Re: Generate PDF with Tamil font problem

2017-06-12 Thread ccubed2k4
On Saturday, 5 March 2011 10:50:25 UTC+5:30, sath...@e-ndicus.com wrote: > Hi All, > >I am using python's reportlab to print some unicode Tamil characters > ''. I added necessary unicode font to reportlab. But It > prints the output as '' (in reverse order). This issue > happens for

[issue30571] Add integer formatting code for fixed-width signed arithmetic (2's complement)

2017-06-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Concur with Mark. Similar issues already were raised multiple times on mailing lists and the conclusion is that explicit wrapping integers to specific range is better. Different behavior for integers out of range is needed in different applications.

[issue27240] 'UnstructuredTokenList' object has no attribute '_fold_as_ew'

2017-06-12 Thread Zhang Wenbo
Zhang Wenbo added the comment: I think I find a case which can reproduct this bug: the UnstructuredTokenList has a ValueTerminal which is long enough(its encoded word is longer than policy.maxlen ) and not at the beginning. For examples, the following subjects can cause this bug: - 'Re:

[issue30596] Add close() to multiprocessing.Process

2017-06-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: That's a good question. close() methods on other objects tend to avoid taking an infinite amount of time :-) But then, Process objects are different enough that they don't need to follow that rule. -- ___ Python

Re: Strang thing in tkinter, and pdb too?

2017-06-12 Thread Christian Gollwitzer
Am 12.06.17 um 06:03 schrieb Terry Reedy: On 6/11/2017 10:06 PM, jf...@ms4.hinet.net wrote: D:\Temp\widget-tour-py3>python canvasruler.py can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure

[issue30571] Add integer formatting code for fixed-width signed arithmetic (2's complement)

2017-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: -1 from me. Using `format(x % 2**8, '08b')` seems both short enough to be easy to use, and long enough to remind one that there's something a little bit unnatural going on here, given that two's complement isn't something that makes sense for arbitrary-sized

[issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange

2017-06-12 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> backport needed versions: +Python 3.6, Python 3.7 ___ Python tracker ___

[issue29478] email.policy.Compat32(max_line_length=None) not as documented

2017-06-12 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: patch review -> backport needed ___ Python tracker ___

[issue29478] email.policy.Compat32(max_line_length=None) not as documented

2017-06-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset b459f7482612d340b88b62edc024628595ec6337 by Mariatta (mircea-cosbuc) in branch 'master': [email] bpo-29478: Fix passing max_line_length=None from Compat32 policy (GH-595)

Re: Strang thing in tkinter, and pdb too?

2017-06-12 Thread jfong
Terry Reedy於 2017/06/12 UTC+8 12:04:18PM wrote: > Right. I got this with IDLE tests before using ttk. Good luck tracing > this to its origin. A little progress. If I remove temp.destroy() at line 34 then that message is gone. hmm...trying to find another way of doing it:-) --Jach Fong --

[issue28994] Misc fixes and cleanups in error handling C code

2017-06-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0cc43df05e36655220468953e838169966b94ebd by Serhiy Storchaka in branch '2.7': [2.7] bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (GH-2034) (#2123)

[issue30603] textwrap: declining indent level has no test case

2017-06-12 Thread Emily Morehouse
Emily Morehouse added the comment: Good catch. We should also add additional tests for a declining indentation level with a blank line and a declining indentation with a whitespace only line, as it is a pattern followed throughout the dedent tests. It should be noted that PR 2014 is the

[issue28994] Misc fixes and cleanups in error handling C code

2017-06-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7d8c1ebd86ce27b28736c5e97fef58ec60b8ef31 by Serhiy Storchaka in branch '3.5': [3.5] bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (GH-2034) (#2122)

[issue27240] 'UnstructuredTokenList' object has no attribute '_fold_as_ew'

2017-06-12 Thread Zhang Wenbo
Changes by Zhang Wenbo : -- nosy: +Zhang Wenbo ___ Python tracker ___ ___

[issue28994] Misc fixes and cleanups in error handling C code

2017-06-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d89dc844d288ee2e403272f3e4552eed6911cafd by Serhiy Storchaka in branch '3.6': [3.6] bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (GH-2034) (#2121)

<    1   2