[issue15862] IDLE: startup problem when HOME does not exist

2017-07-09 Thread Louie Lu
Louie Lu added the comment: Terry: How about to support XDG base directory on Unix[1]? [1]: https://wiki.archlinux.org/index.php/XDG_Base_Directory_support -- nosy: +louielu ___ Python tracker

[issue30889] distutils extra_link_args not working because it is added to cmd last. should before -llibs

2017-07-09 Thread Liu Cailiang
New submission from Liu Cailiang: Following is the executed command line (g++ version 5): g++ -pthread -shared -L/conda/lib -Wl,-rpath=/conda/lib,--no-as-needed /tmp/tmp0lfzn4v9/home/ubuntu/pybind11_opencv_numpy/ndarray_converter.o

[issue8231] Unable to run IDLE without write-access to home directory

2017-07-09 Thread Louie Lu
Louie Lu added the comment: How about only taking warning when not able to create dir at GetUserCfgDir(), then take the permission handler in other place? e.g. when user trying to save the config in bad dir, pop-out a dialog to tell it is permission problem or dir not eixsts...etc.

[issue30851] IDLE: configdialog -- fix tkinter Variables

2017-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: After wresting with a test for #30870, I am not sure we will ever have the full tests I would like. Anyway, I concluded that the replacement of font_name is a bug. It did not matter because all pages are created before configuration is read. If any of

[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: All public-facing debian.org FTP services will be shut down on November 1, 2017. See https://www.debian.org/News/2017/20170425. -- nosy: +serhiy.storchaka ___ Python tracker

[issue30887] Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration

2017-07-09 Thread David
David added the comment: I made the syntax error go away by moving the global current_user above the try.. I will have to revisit this one when time permits and write a script that recreates the error. This will probably be later this week. Thanks for your volunteer service. David On Jul

[issue30887] Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration

2017-07-09 Thread Steven D'Aprano
Changes by Steven D'Aprano : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30887] Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration

2017-07-09 Thread Steven D'Aprano
Steven D'Aprano added the comment: Please copy and paste (don't retype from memory!) the *exact* error you are getting. You should be seeing something like: SyntaxWarning: name 'current_user' is used prior to global declaration (at least that's the warning I'm getting in Python 3.5), which

[issue30888] import class not isinstance of the class

2017-07-09 Thread 邱伟略
New submission from 邱伟略: the working directory is like below: bug/ dirc/ __init__.py foo.py foo2.py __init__.py foo1.py in foo.py: ``` class Event(object): pass ``` in foo2.py: ``` from a.foo import Event def fun(): return Event() ``` in

[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: We already know that setting StringVar font_name triggers a change to changes. We also know that manually clicking or Up or Down triggers <>, which sets font_name and redraws the box. The challenge is to do something that will trigger the virtual event.

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2017-07-09 Thread Anthony Sottile
Anthony Sottile added the comment: pypy seems to have this right (though I don't know enough about their internals to know if cpython can benefit from their patch) $ venvpypy/bin/pythonPython 2.7.10 (3260adbeba4a, Apr 19 2016, 17:42:20) [PyPy 5.1.0 with GCC 4.8.4] on linux2 Type "help",

[issue30171] Emit ResourceWarning in multiprocessing Queue destructor

2017-07-09 Thread STINNER Victor
STINNER Victor added the comment: Another example: http://bugs.python.org/issue30886#msg298014 "The problem is that multiprocessing.Queue.join_thread() does nothing since the thread wasn't started by a subprocess." -- ___ Python tracker

[issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x

2017-07-09 Thread STINNER Victor
STINNER Victor added the comment: The problem is that multiprocessing.Queue.join_thread() does nothing since the thread wasn't started by a subprocess. See also bpo-30171: Emit ResourceWarning in multiprocessing Queue destructor. -- ___ Python

[issue30887] Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration

2017-07-09 Thread David
David added the comment: when I do anything like this: import flask ... class User.. . . . try: current_user except NameError: global current_user current_user = User(request.form['parameter1'], request.form['parameter2'], '') I get the error that current_user_user was

[issue30887] Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration

2017-07-09 Thread David
New submission from David: when I do anything like this: import flask ... try: current_user except NameError: global current_user current_user = User(request.form['parameter1'], request.form['parameter2'], '') I get the error that the_user was 'used' before the global

[issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x

2017-07-09 Thread STINNER Victor
STINNER Victor added the comment: While trying to reproduce the bug, I got: test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... /usr/home/haypo/cpython/Lib/test/support/__init__.py:1515: ResourceWarning: unclosed gc.collect() ok --

[issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x

2017-07-09 Thread STINNER Victor
STINNER Victor added the comment: Previous issue which fixed QueueListenerTest of test_logging is bpo-30131: commit 8ca2f2faefa8dba323a2e4c4b86efb633d7a53cf Author: Victor Stinner Date: Wed Apr 26 15:56:25 2017 +0200 bpo-30131: test_logging now joins queue

[issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x

2017-07-09 Thread STINNER Victor
STINNER Victor added the comment: The load average was 3.15: 0:04:33 load avg: 3.15 [176/406] test_logging failed (env changed) -- Another fail on AMD64 FreeBSD CURRENT Non-Debug 3.x:

[issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x

2017-07-09 Thread STINNER Victor
New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/557/steps/test/logs/stdio test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 3 sec

[issue24845] IDLE functional/integration testing

2017-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: The problem with this proposal, and with writing complete unittests, is that event_generate seems to be badly broken. I have spent hours doing experiments that mostly fail. I have read Stackoverflow questions and there seems to be no dependable rule for

[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 7ab334233394070a25344d481c8de1402fa12b29 by terryjreedy in branch '3.6': [3.6] bpo-30870: IDLE: Change sample font when select by key-up/down (GH-2617) (#2640) https://github.com/python/cpython/commit/7ab334233394070a25344d481c8de1402fa12b29

[issue30393] test_readline hangs

2017-07-09 Thread Martin Panter
Martin Panter added the comment: Thanks for the information. That narrows the problem down, but I still don’t exactly know why it hangs. A good workaround may be to put a timeout in the “select” call for a second or so, and if it times out, raise an exception which will fail the test but let

[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2705 ___ Python tracker ___ ___

[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: If one scrolls with the mousewheel or scrollbar, the selection does not change and the example should not change, and I presume it will not with the patch. If one presses up or down, the selection does change, just as if one clicked, and the example should

[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset bb2bae84d6b29f991b757b46430c3c15c60059e9 by terryjreedy (Louie Lu) in branch 'master': bpo-30870: IDLE: Change sample font when select by key-up/down (#2617) https://github.com/python/cpython/commit/bb2bae84d6b29f991b757b46430c3c15c60059e9

[issue30885] test_subprocess hangs on AMD64 Windows8.1 Refleaks 3.x

2017-07-09 Thread STINNER Victor
STINNER Victor added the comment: I checked last builds up to build #20, it seems like build 44 is the first time that test_subprocess hangs. -- ___ Python tracker

[issue30885] test_subprocess hangs on AMD64 Windows8.1 Refleaks 3.x

2017-07-09 Thread STINNER Victor
New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/44/steps/test/logs/stdio running: test_mmap (3165 sec), test_subprocess (8003 sec) 3:03:20 [405/406/1] test_mmap passed (3186 sec) -- running: test_subprocess (8026 sec)

[issue30183] [HPUX] compilation error in pytime.c with cc compiler

2017-07-09 Thread STINNER Victor
STINNER Victor added the comment: Oh ok, a lot of tests fail on HP-UX. We are far from supporting HP-UX. 331 tests OK. 41 tests failed: test_asyncio test_asyncore test_c_locale_coercion test_calendar test_cmd_line test_cmd_line_script test_datetime test_distutils test_email

[issue30884] regrtest -jN --timeout=TIMEOUT should kill child process running longer than TIMEOUT seconds

2017-07-09 Thread STINNER Victor
STINNER Victor added the comment: regrtest command line of this buildbot build, it uses --timeout 11700: D:\buildarea\3.x.ware-win81-release.refleak\build>"D:\buildarea\3.x.ware-win81-release.refleak\build\PCbuild\amd64\python_d.exe" -u -Wd -E -bb -m test -uall -rwW --slowest --timeout 1200

[issue30884] regrtest -jN --timeout=TIMEOUT should kill child process running longer than TIMEOUT seconds

2017-07-09 Thread STINNER Victor
New submission from STINNER Victor: "regrtest -jN --timeout=TIMEOUT" should kill a child process if it runs longer than TIMEOUT seconds. Maybe not exactly TIMEOUT, but TIMEOUT x 1.2? Example:

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2017-07-09 Thread sedrubal
sedrubal added the comment: What is the problem with using the patch by moritz (https://bugs.python.org/issue14156#msg162342) and change the unit test to this: class TestFileTypeWB(TempDirMixin, ParserTestCase): ... successes = [ ..., ('-x - -', NS(x=sys.stdout.buffer,

[issue29766] --with-lto still implied by --enable-optimizations in Python 2.7

2017-07-09 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: > bpo-29766: Do not force --with-lto to true for --enable-optimizations > (#1858) > > This fixes a faulty backport to the Python 2.7 branch only of > http://bugs.python.org/issue28032. Details in the bpo-29766. This commit is

[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-09 Thread STINNER Victor
New submission from STINNER Victor: http://buildbot.python.org/all/builders/s390x%20Debian%203.6/builds/530/steps/test/logs/stdio ERROR: test_ftp (test.test_urllib2net.OtherNetworkTests) (url='ftp://ftp.debian.org/debian/README') ERROR: test_ftp_basic (test.test_urllib2net.TimeoutTest)

[issue24845] IDLE functional/integration testing

2017-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: To clarify the 'tk introspection' I did not like was asking a widget for its children, getting a list of tk ids, and then testing the widgets by id. I prefer keeping and and directly using a python reference. I was not referring querying a widget for its

[issue30882] Built-in list disappeared from Python 2.7 intersphinx inventory

2017-07-09 Thread Christoph Deil
New submission from Christoph Deil: We have a project where we sub-class `list`. Since recently our docs build is failing because the intersphinx inventory entry for `list` on Python 2.7 doesn't exist any more. I think this is a regression, because Python 2.7 is supposed to be stable and

[issue30876] SystemError on importing module from unloaded package

2017-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is easy to replace the SystemError with a recursive import of the missing parent package. It is enough to remove raising the SystemError. The other effect of this change is that relative import from the top-level module now raises ImportError "attempted

[issue30876] SystemError on importing module from unloaded package

2017-07-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2704 ___ Python tracker ___ ___

[issue10438] list an example for calling static methods from WITHIN classes

2017-07-09 Thread Ian
Ian added the comment: I agree that the use case is probably rare. I agree that to someone intimately familiar with the "self-consistent rules" of Python, the correctness of the C.f() approach is probably obvious. However, your documentation says: Static methods in Python are similar to

[issue30868] IDLE: Improve configuration tests with mock Save.

2017-07-09 Thread Cheryl Sabella
Cheryl Sabella added the comment: `git log` is the magic command. I won't be able to do it justice because it has too many options, but here are a few. `git log` shows all commit message history on the current branch. `git log -p` (p for patch) shows the actual diffs `git log -p --

[issue29854] Segfault when readline history is more then 2 * history size

2017-07-09 Thread Berker Peksag
Berker Peksag added the comment: New changeset 68c3724651776f4ae90ed24d70cef6fd45bc7db5 by Berker Peksag (Nir Soffer) in branch '3.5': [3.5] bpo-29854: Fix segfault in call_readline() (GH-728) https://github.com/python/cpython/commit/68c3724651776f4ae90ed24d70cef6fd45bc7db5 --

[issue30878] The staticmethod doesn't properly reject keyword arguments

2017-07-09 Thread SylvainDe
SylvainDe added the comment: Thanks Serhiy Storchaka ! This issue seems to affect (all) other Python versions. Should we proceed to a cherry-pick ? -- ___ Python tracker

[issue30836] test_c_locale_coercion fails on AIX

2017-07-09 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___

[issue24845] IDLE functional/integration testing

2017-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: A different take on the proposal: A functional integration test for IDLE should open IDLE, rename .idlerc, open a new file, insert some text, and, for instance, at some point open the options dialog for testing. As part this, the font face change would

[issue30876] SystemError on importing module from unloaded package

2017-07-09 Thread Nick Coghlan
Nick Coghlan added the comment: OK, so at least for 3.7, we'll replace the SystemError with a recursive import of the missing parent package, just as we'd expect to see with an absolute import. I'm classing this as "Won't fix" for the native import system in 2.7 - folks wanting the fix there

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

2017-07-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker