[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: The documentation (https://docs.python.org/3/library/stdtypes.html#str.find) does not describe what will be the behaviour if the substring is "". And by the way, as per https://docs.python.org/3/reference/expressions.html#membership-test-operations,

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Changes by Ashok Bakthavathsalam : -- keywords: +patch pull_requests: +3637 stage: -> patch review ___ Python tracker ___

[issue31506] Improve the error message logic for object_new & object_init

2017-09-18 Thread Nick Coghlan
Changes by Nick Coghlan : -- keywords: +easy (C) ___ Python tracker ___ ___

[issue31499] ElementTree crash while cleaning up ParseError

2017-09-18 Thread STINNER Victor
STINNER Victor added the comment: >> The question is more why/how the code didn't crash before? :-) > > Typical case of a Schroedinbug. I don't believe in the chaos :-) I ran a "git bisect" since January 1st, 2017. Attached bug2.py started to crash since the following commit related to

Re: Old Man Yells At Cloud

2017-09-18 Thread bartc
On 18/09/2017 04:23, Steve D'Aprano wrote: On Mon, 18 Sep 2017 11:11 am, Rick Johnson wrote: Speaking in _keystrokes_, and that's what really matters here, a print function is always three more keystrokes than a print statement. Keystrokes only matter if you are hunt'n'peck typing and need

ANN: yacron 0.5.0 released

2017-09-18 Thread Gustavo Carneiro
yacron is a modern Cron replacement that is Docker-friendly - "Crontab" is in YAML format; - Builtin sending of Sentry and Mail outputs when cron jobs fail; - Flexible configuration: you decide how to determine if a cron job fails or not; - Designed for running in Docker, Kubernetes, or 12 factor

[RELEASE] Python 2.7.14

2017-09-18 Thread Benjamin Peterson
I'm happy to announce to the immediate availability of Python 2.7.14, yet another bug fix release in the Python 2.7 series. 2.7.14 includes 9 months of conservative bug fixes from the 3.x branch. Downloads of source code and binaries are at:

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: I am not saying that there is a bug. As Martin points out, "it is worth making the documentation explicit." -- ___ Python tracker

[issue31499] ElementTree crash while cleaning up ParseError

2017-09-18 Thread STINNER Victor
STINNER Victor added the comment: Attached PR 3641 fixes bug1.py and bug2.py crashes. Sadly, I failed to write a reliable unit test using bug2.py. The bug requires to trigger the garbage collector in a specific order which depends on how frames are tracked by the GC... -- versions:

[issue31499] ElementTree crash while cleaning up ParseError

2017-09-18 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch pull_requests: +3636 stage: -> patch review ___ Python tracker ___

[issue31496] IDLE: test_configdialog failed

2017-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, the fix for issue31500 doesn't affect this issue. -- ___ Python tracker ___

[issue31506] Improve the error message logic for object_new & object_init

2017-09-18 Thread Nick Coghlan
Changes by Nick Coghlan : -- components: +Interpreter Core stage: -> needs patch type: -> enhancement versions: +Python 3.7 ___ Python tracker

[issue31506] Improve the error message logic for object_new & object_init

2017-09-18 Thread Nick Coghlan
New submission from Nick Coghlan: As described in https://blog.lerner.co.il/favorite-terrible-python-error-message/, object_new and object_init currently have "object" hardcoded in the error messages they raise for excess parameters: >>> class C: pass ... >>> C(10) Traceback (most recent

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 5 is not valid index of character, but it is valid index of substring. IMHO documenting explicitly miscellaneous particular cases which are not exceptions of general rules just adds a noise. This makes the documentation larger and decrease the chance that

[issue31506] Improve the error message logic for object_new & object_init

2017-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not sure this is easy issue. It requires taking to account many different cases and analyzing many arguments checking code scattered around many files. -- nosy: +serhiy.storchaka ___ Python tracker

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The documentation doesn't mention empty string specially because there is nothing special with empty string. Returned index value is valid. "abcde"[5:5] == "". Issue24243 is about the case of end < start. Not this case. I don't see a bug here. --

[issue31499] ElementTree crash while cleaning up ParseError

2017-09-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: https://bugs.python.org/file47146/test_issue31499.diff ___ Python tracker ___

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: How about "abcde"[5] Traceback (most recent call last): File "python", line 1, in IndexError: string index out of range -- ___ Python tracker

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: @Storchaka, You say `5` is related to the substring. Pray, explain how 5 is related to a null substring? Also, from https://bugs.python.org/msg243710, as per the great Hettinger: Though this is closed as not a bug, feel free to add an example or a

Re: [Tutor] beginning to code

2017-09-18 Thread Rick Johnson
On Sunday, September 17, 2017 at 7:12:46 PM UTC-5, Terry Reedy wrote: > The coinage 'Executable pseudocode' was my description of Python on > comp.lang.python, mirrored to this list, in April 1997, long before > I became a Python (core) dev. Guido did say things like 'human > readable' before

Re: [Tutor] beginning to code

2017-09-18 Thread Rick Johnson
On Sunday, September 17, 2017 at 8:51:38 PM UTC-5, INADA Naoki wrote: > > > > > > > > I would agree that testing any of those for '== True' or > > > the like is pointless redundancy, > > > > But what's wrong with syntactical redundancy when it brings > > _clarity_ to the source code? And why can't

[issue29049] Lazy GC tracking frame

2017-09-18 Thread STINNER Victor
STINNER Victor added the comment: FYI this optimization triggered a bug in the tp_clear slot of ElementTree parsers, bug which was hidden for years in Python 3: bpo-31499. -- ___ Python tracker

[issue31505] assertion failure in _json.make_encoder() in case of a bad encoder() argument

2017-09-18 Thread Oren Milman
New submission from Oren Milman: The following code causes an assertion failure: import _json def _bad_encoder(*args): return None enc = _json.make_encoder(None, None, _bad_encoder, None, 'foo', 'bar', None, None, None) enc(obj='spam', _current_indent_level=4)

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: Look at my suggested changes. It doesn't add noise, IMHO. All I am saying is that the explicit behaviour needs to be documented. I unnecessarily wasted at least 3-4 hours on this "undocumented" behavior. --

[issue31507] email.utils.parseaddr has no docstring

2017-09-18 Thread Mark Dickinson
New submission from Mark Dickinson: While demonstrating email.utils.parseaddr in a recent training course, I discovered it had no docstring (see below). This looks as though it should be an easy fix for a first-time contributor. taniyama:Desktop mdickinson$ ipython Python 3.6.2 (default, Jul

[issue31505] assertion failure in json, in case _json.make_encoder() received a bad encoder() argument

2017-09-18 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch pull_requests: +3638 stage: -> patch review ___ Python tracker ___

[issue31505] assertion failure in json, in case _json.make_encoder() received a bad encoder() argument

2017-09-18 Thread Oren Milman
Changes by Oren Milman : -- title: assertion failure in _json.make_encoder() in case of a bad encoder() argument -> assertion failure in json, in case _json.make_encoder() received a bad encoder() argument ___ Python tracker

Re: speech_to_text python command not working

2017-09-18 Thread pizza python
Hi all. I tried the same command with a different, smaller file. This file is a 90-kilobyte ogg file. The other one was a 26-megabyte ogg file. Wtih this smaller file, there was no error. speech_to_text -u myUsername -p myPassword -f html -i audio-file.ogg transcript.html

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Martin Panter
Martin Panter added the comment: The behaviour for searching for empty strings in Python is inconsistent; see Issue 24243. IMO the behaviour for the (r)find/index methods is sensible, but it is worth making the documentation explicit. The returned indexes you have given (5, 1, and 0) are

The Python-List community

2017-09-18 Thread Leam Hall
A few days ago I pointed out that this list's community had "opportunities to improve". While we still have lots of those opportunities, it is good to see several community members raise the bar in welcoming new folks into the community. Thank you for your help and positive attitude! Leam --

[issue31496] IDLE: test_configdialog failed

2017-09-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: On windows, hs.see(start), followed or not by update_idletasks(), has no effect. Does the fix for #31500 fix this also? -- ___ Python tracker

[issue31499] ElementTree crash while cleaning up ParseError

2017-09-18 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: I tried your pattern, but failed to write a reliable unit test. Can you please write a full patch / test? -- ___ Python tracker

Re: speech_to_text python command not working

2017-09-18 Thread Paul Moore
With that information, my guess would be that the way the web service reports errors has changed, and the Python library is failing to handle errors nicely for you, but the basic functionality still works. So that's somewhat good news, as you can at least handle anything that *would* work, even if

[issue31499] ElementTree crash while cleaning up ParseError

2017-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: def test_issue31499(self): def test(): ... test() test.support.gc_collect() -- ___ Python tracker

[issue31499] ElementTree crash while cleaning up ParseError

2017-09-18 Thread STINNER Victor
STINNER Victor added the comment: test_issue31499.diff: Oh great, it works (to reproduce the crash). I modified your test and included it in my PR, I added you as a co-author of my PR ;-) -- ___ Python tracker

[issue31500] IDLE: Tiny font on HiDPI display

2017-09-18 Thread Cheryl Sabella
Cheryl Sabella added the comment: Tests run on Ubuntu. The menubar is bigger now though, so it's default is different than before. Maybe that was the only way to fix it, but it's now about twice as big as the shell font. -- ___ Python tracker

[issue31500] IDLE: Tiny font on HiDPI display

2017-09-18 Thread Cheryl Sabella
Changes by Cheryl Sabella : Added file: https://bugs.python.org/file47149/configdialogkeys_new.png ___ Python tracker ___

[issue31498] Default values for zero in time.strftime()

2017-09-18 Thread R. David Murray
R. David Murray added the comment: Generally we're just reporting whatever the platform strftime does. Is that what happens in this case? -- nosy: +belopolsky, r.david.murray ___ Python tracker

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-09-18 Thread Nathaniel Smith
Nathaniel Smith added the comment: Doesn't this proposal break every debugger, including pdb? -- ___ Python tracker ___

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread R. David Murray
R. David Murray added the comment: You have to remember that the most useful way to think about python slice indexes is that they point between characters. Consider, for example, that you have a starting index of something, and you are looking backward in the string for a trailing delimiter:

[issue31500] IDLE: Tiny font on HiDPI display

2017-09-18 Thread Cheryl Sabella
Changes by Cheryl Sabella : Removed file: https://bugs.python.org/file47147/configdialog_new.png ___ Python tracker ___

Re: [Tutor] beginning to code

2017-09-18 Thread Chris Angelico
On Mon, Sep 18, 2017 at 10:42 PM, Rick Johnson wrote: > (2) Python is, in essence, converting the source code > syntax of: > > if someObject: > > to: > > if BOOLEAN_VALUE_OF_SOMEOBJECT: > > Which, although the result of such a

[issue31506] Improve the error message logic for object_new & object_init

2017-09-18 Thread Nick Coghlan
Nick Coghlan added the comment: For this issue, I'm not proposing to make any change other than to solve the specific problem reported in the blog post: when the method itself isn't overridden, then the error message should report the name of the most derived class, not "object", to help

[issue31508] Running test_ttk_guionly logs "test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed" warnings

2017-09-18 Thread STINNER Victor
STINNER Victor added the comment: I saw these warnings on: http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.x/builds/96/steps/test/logs/stdio Extract of the pythoninfo: tkinter.TCL_VERSION: 8.6 tkinter.TK_VERSION: 8.6 tkinter.info_patchlevel: 8.6.6 -- I can reproduce the

[issue31021] Clarify programming faq.

2017-09-18 Thread R. David Murray
R. David Murray added the comment: I think there is nothing to do here unless Mark likes my suggestion and/or someone comes up with an even better improvement. -- ___ Python tracker

[issue31443] Possibly out of date C extension documentation

2017-09-18 Thread Christian Heimes
Christian Heimes added the comment: I think it's svnmerge of this commit, which talks about VS 2005. It might have been required to support VS 2003 and 2005. ``` r59290 | christian.heimes | 2007-12-03 14:47:29 +0100 (Mon, 03 Dec 2007) | 3 lines Applied my patch #1455 with some extra fixes

[issue31507] email.utils.parseaddr has no docstring

2017-09-18 Thread Rohit Balasubramanian
Rohit Balasubramanian added the comment: I have submitted a pull request for the changes to email.utils.parseaddr. -- keywords: +patch nosy: +rohitb pull_requests: +3640 stage: -> patch review ___ Python tracker

[issue31510] test_many_processes() of test_multiprocessing_spawn failed on x86-64 Sierra 3.x

2017-09-18 Thread STINNER Victor
New submission from STINNER Victor: The process was killed (SIGKILL). See also bpo-30356. http://buildbot.python.org/all/builders/x86-64%20Sierra%203.x/builds/765/steps/test/logs/stdio == FAIL: test_many_processes

[issue31507] email.utils.parseaddr has no docstring

2017-09-18 Thread R. David Murray
R. David Murray added the comment: Mark: re your training course...if you aren't trying to stay compatible with python2, note that python3 has a much more sophisticated address parser now, that gets called automatically if you use the new policies. -- components: +email nosy: +barry,

[issue31509] test_subprocess hangs randomly on AMD64 Windows10 3.x

2017-09-18 Thread STINNER Victor
New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/1242/steps/test/logs/stdio 0:49:36 [401/405] test_osx_env passed 0:49:38 [402/405] test_fractions passed -- running: test_subprocess (31 sec) 0:49:51 [403/405] test_importlib passed --

[issue31511] test_normalization: test.support.open_urlresource() doesn't handle urllib.error.URLError timeout

2017-09-18 Thread STINNER Victor
New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%203.x/builds/1316/steps/test/logs/stdio == FAIL: test_main (test.test_normalization.NormalizationTest)

[issue31506] Improve the error message logic for object_new & object_init

2017-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What do you expect for: class C: pass object.__new__(C, 1) C.__new__(C, 1) -- ___ Python tracker ___

[issue31500] IDLE: Tiny font on HiDPI display

2017-09-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: The TkFixedFont initially used in Shell and editor has its size set to 10 if initially negative. Users can only replace this with a real font, not another of tk's abstract fonts. On windows, the sizes of the nearly 20 fonts touched by the patch range from 8

[issue31508] Running test_ttk_guionly logs "test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed" warnings

2017-09-18 Thread STINNER Victor
STINNER Victor added the comment: > This is a reminder to me to remove a deprecated API (see issue27319). Running tests should not log deprecation warnings. Either remove the code, or make the warning quiet, no? :-) -- ___ Python tracker

[issue31500] IDLE: Tiny font on HiDPI display

2017-09-18 Thread Cheryl Sabella
Cheryl Sabella added the comment: Attached screen prints of configdialog. It's messed up. -- Added file: https://bugs.python.org/file47147/configdialog_new.png ___ Python tracker

[issue31500] IDLE: Tiny font on HiDPI display

2017-09-18 Thread Cheryl Sabella
Changes by Cheryl Sabella : Added file: https://bugs.python.org/file47148/configdialogkeys_old.png ___ Python tracker ___

[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2017-09-18 Thread STINNER Victor
STINNER Victor added the comment: Similar issue: bpo-31510. -- ___ Python tracker ___ ___ Python-bugs-list

[issue31370] Remove support for threads-less builds

2017-09-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > eventlet also uses dummy_threading Not sure what you mean by that. eventlet uses the regular try/except import dance around "import threading": https://github.com/eventlet/eventlet/blob/master/eventlet/support/dns/entropy.py#L20-L23

Re: [Tutor] beginning to code

2017-09-18 Thread Rick Johnson
Steve D'Aprano wrote: > [snip: offensive statements] > > Your insistence on adding the entirely superfluous, unnecessary Please acquaint yourself with the definition of superfluous, as in most i have seen, the actual word "unnecessary" is part of the definition. > and distracting "== True" at

[issue31499] ElementTree crash while cleaning up ParseError

2017-09-18 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8afd7ab12d7f8915b549cf04af384b495ec73d22 by Victor Stinner (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash (GH-3641) (#3645)

Re: [Tutor] beginning to code

2017-09-18 Thread Antoon Pardon
Op 18-09-17 om 14:58 schreef Chris Angelico: > On Mon, Sep 18, 2017 at 10:42 PM, Rick Johnson > wrote: >> (2) Python is, in essence, converting the source code >> syntax of: >> >> if someObject: >> >> to: >> >> if

Re: [Tutor] beginning to code

2017-09-18 Thread Chris Angelico
On Mon, Sep 18, 2017 at 11:30 PM, Antoon Pardon wrote: > Op 18-09-17 om 14:58 schreef Chris Angelico: >> On Mon, Sep 18, 2017 at 10:42 PM, Rick Johnson >> wrote: >>> (2) Python is, in essence, converting the source code >>> syntax of:

[issue31499] ElementTree crash while cleaning up ParseError

2017-09-18 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3639 ___ Python tracker ___

[issue31499] ElementTree crash while cleaning up ParseError

2017-09-18 Thread STINNER Victor
STINNER Victor added the comment: New changeset e727d41ffcd91b21ce82026ec8c8381d34a16209 by Victor Stinner in branch 'master': bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash (#3641) https://github.com/python/cpython/commit/e727d41ffcd91b21ce82026ec8c8381d34a16209 --

Re: [Tutor] beginning to code

2017-09-18 Thread Rustom Mody
On Monday, September 18, 2017 at 6:25:09 PM UTC+5:30, Rustom Mody wrote: > On Monday, September 18, 2017 at 5:23:49 PM UTC+5:30, Rick Johnson wrote: > > On Sunday, September 17, 2017 at 8:51:38 PM UTC-5, INADA Naoki wrote: > > > > > > > > > > > > > > I would agree that testing any of those for '==

Re: [Tutor] beginning to code

2017-09-18 Thread Paul Moore
On 18 September 2017 at 14:30, Antoon Pardon wrote: > Well that you reduce an object to a boolean value is not obvious to > begin with. A TypeError because you are treating a non-boolean as > a boolean would have been more obvious to me. More obvious, possibly - that's

lxml 4.0.0 released

2017-09-18 Thread Stefan Behnel
Hi all, lxml 4.0.0 was released yesterday with several new features and enhancements. Thanks to everyone who contributed. lxml is the fastest, most versatile and most widely used tool for processing XML and HTML in Python, supporting XPath, XSLT and many pythonic ways to deal with markup

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Ashok Bakthavathsalam
Changes by Ashok Bakthavathsalam : -- type: behavior -> enhancement ___ Python tracker ___

Re: [Tutor] beginning to code

2017-09-18 Thread Rustom Mody
On Monday, September 18, 2017 at 5:23:49 PM UTC+5:30, Rick Johnson wrote: > On Sunday, September 17, 2017 at 8:51:38 PM UTC-5, INADA Naoki wrote: > > > > > > > > > > > I would agree that testing any of those for '== True' or > > > > the like is pointless redundancy, > > > > > > But what's wrong

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread Vedran Čačić
Vedran Čačić added the comment: This is nonsense. 'abcde'[7:7] is also ''. So the maximal index in fact doesn't exist. What do you think exactly is the property that differentiates 5 from 7 here? -- nosy: +veky ___ Python tracker

Re: Old Man Yells At Cloud

2017-09-18 Thread Ben Bacarisse
Steve D'Aprano writes: > [...] try something more common: > > 1/2 > > Most people aren't expecting integer division, but true division, and silently > returning the wrong result (0 instead of 0.5) is a silent source of > bugs. I'm the sure that expectation depends on

[issue31507] email.utils.parseaddr has no docstring

2017-09-18 Thread Krzysztof Warunek
Krzysztof Warunek added the comment: As well as `parsedate_to_datetime`... I'll work on that -- nosy: +kwarunek ___ Python tracker ___

[issue31506] Improve the error message logic for object_new & object_init

2017-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not so easy to make an error message conforming with error messages for similar types. This may require changing error messages in other code. First, "takes no arguments" instead of "takes no parameters". For normal __new__ and __init__ you never got

[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-18 Thread Leonardo Francalanci
Leonardo Francalanci added the comment: That works! But when I said "also with close_fds=True", I meant that I tried WITHOUT overriding stdin, stdout, and stderr AND setting close_fds=True, but it didn't work. What worked was not overriding stdin/out/err and adding os.set_inheritable(0,

[issue31503] Enhance dir(module) to be informed by __all__ by updating module.__dir__

2017-09-18 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___

Re: Old Man Yells At Cloud

2017-09-18 Thread bartc
On 18/09/2017 15:04, Gregory Ewing wrote: Dennis Lee Bieber wrote: Pascal provides print()/println() [okay, not /statements/ but /procedures/] Actually write/writeln, and although they used parens like procedures, they had special syntax for output formatting that wasn't available to

[issue31508] Running test_ttk_guionly logs "test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed" warnings

2017-09-18 Thread STINNER Victor
New submission from STINNER Victor: 0:33:11 load avg: 4.82 [ 44/405/1] test_ttk_guionly passed -- running: test_subprocess (504 sec) /buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should

[issue10496] Python startup should not require passwd entry

2017-09-18 Thread Chi Hsuan Yen
Changes by Chi Hsuan Yen : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

[issue31506] Improve the error message logic for object_new & object_init

2017-09-18 Thread Nick Coghlan
Nick Coghlan added the comment: Fortunately, the logic is already well encapsulated: there's a "if (excess_args && (case A || case B)) {... report error ...}" check at the start of each of object_new and object_init, where "case A" = "the other function in the object_new/object_init pair has

Re: [Tutor] beginning to code

2017-09-18 Thread Steve D'Aprano
On Mon, 18 Sep 2017 09:53 pm, Rick Johnson wrote: > Tell you what: test your hypothesis on non-programmers and > report back here. Why would someone do that? The purpose of source code is not to communicate with non-programmers. It is to communicate with other programmers. (If the code is

six 1.11.0

2017-09-18 Thread Benjamin Peterson
It's been a while, but six 1.11.0 is now live on PyPI! six is a Python 2&3 compatibility library. Many thanks to the various contributors who did most the work. Here is the changelog for 1.11.0: - Pull request #178: `with_metaclass` now properly proxies `__prepare__` to the underlying

NumExpr patched from 2.6.3 to 2.6.4

2017-09-18 Thread Robert McLeod
This is a quick note to update from the release two days ago that we've pushed NumExpr 2.6.4. The release of 2.6.3 two days ago omitted implementations for the new `ceil` and `floor` functions for the Intel VML when compiled with the Intel MKL. Thanks to Christoph Gohlke for noticing the error

[issue31499] ElementTree crash while cleaning up ParseError

2017-09-18 Thread STINNER Victor
STINNER Victor added the comment: The bug is now fixed in Python 3.6 and master. Thanks for the bug report and analysis, Stefan Behnel! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31498] Default values for zero in time.strftime()

2017-09-18 Thread Denis Osipov
Denis Osipov added the comment: If it's really a bug I could make PR with changes in timemodule.c (in gettmarg() and checktm() functions). But I'm not sure that it's not intended behavior. -- ___ Python tracker

[issue31508] Running test_ttk_guionly logs "test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed" warnings

2017-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a reminder to me to remove a deprecated API (see issue27319). -- ___ Python tracker ___

[issue31370] Remove support for threads-less builds

2017-09-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- keywords: +patch pull_requests: +3641 stage: resolved -> patch review ___ Python tracker ___

[issue31370] Remove support for threads-less builds

2017-09-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- pull_requests: +3642 stage: resolved -> patch review ___ Python tracker ___

[issue31512] Add non-elevated symlink support for dev mode Windows 10

2017-09-18 Thread Vidar Fauske
New submission from Vidar Fauske: As explained in this Microsoft blogpost (https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/), it is possible on newer versions of Windows 10 for non-privileged users to create symlinks when the machine is in developer mode. However, to

[issue31496] IDLE: test_configdialog failed

2017-09-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: If the test only fails with a HiDPI screen, then it must somehow be related. But if the highlight sample is normal size, like the font sample in https://bugs.python.org/file47141/Screenshot_20170917_213616.png then the relationship must not be as simple as I

[issue31500] IDLE: Tiny font on HiDPI display

2017-09-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you Cheryl. That is enough to reject the patch is it is now. The negative sizes are pixels. I think it might be better to multiply them by a systems specific factor, but only when needed. One might wish that the scaling should be handled

[issue31036] building the python docs requires the blurb module

2017-09-18 Thread Ned Deily
Ned Deily added the comment: P.S. I just noticed that I forgot to credit Brett here as the source (from superseded PR 2953) of a good portion of the last round of PRs. Thanks! -- ___ Python tracker

[issue31440] wrong default module search path in help message

2017-09-18 Thread Steve Dower
Steve Dower added the comment: I don't have time right this second to write it all up, but I did so in the past at https://docs.python.org/3/using/windows.html#finding-modules Hopefully the answer you need is somewhere in that. Module search paths are complicated (but eric.snow is going to

[issue31484] Cache single-character strings outside of the Latin1 range

2017-09-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Judging by the numbers, this optimization does not sound worth the hassle. It is quite rare to iterate over all characters in a long text while doing so little work with them that the cost of iteration is significant. By the way: > Sorry for using the word

[issue31370] Remove support for threads-less builds

2017-09-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: https://github.com/python/cpython/pull/3648 restores dummy_threading and _dummy_thread, but deprecates them. -- stage: patch review -> resolved ___ Python tracker

[issue31151] socketserver.ForkingMixIn.server_close() leaks zombie processes

2017-09-18 Thread Ned Deily
Changes by Ned Deily : -- priority: release blocker -> deferred blocker ___ Python tracker ___

[issue31513] Document structure of memo dictionary to enable more advanced __deepcopy__ uses

2017-09-18 Thread Josh Rosenberg
New submission from Josh Rosenberg: At present, the documentation for the copy module doesn't document anything about the memo dictionary for deepcopy except to say that it must be received by custom __deepcopy__ methods and passed along when calling copy.deepcopy, and that it is a

[issue24243] behavior for finding an empty string is inconsistent with documentation

2017-09-18 Thread Vedran Čačić
Vedran Čačić added the comment: Raymond, with respect, I think you're either wrong here, or misleading with a purpose. There is a big difference between any(()) returning False, all(()) returning True, '' in '' returning True, math.factorial(0) returning 1, and set() <= set() returning

[issue24243] behavior for finding an empty string is inconsistent with documentation

2017-09-18 Thread R. David Murray
R. David Murray added the comment: I'm not Raymond, but he is correct. This is an example of "taking advantage of the corner cases", and is something Python does a lot of, especially around strings and slices. The current behavior was carefully considered and has useful properties.

[issue31513] Document structure of memo dictionary to enable more advanced __deepcopy__ uses

2017-09-18 Thread R. David Murray
R. David Murray added the comment: Unless I'm mistaken (and someone will correct me and reopen the issue if I am :) it is intentionally undocumented. A proposal for a documented protocol of some sort is certainly a possibility, but is something that should start with a discussion on the

[issue24243] behavior for finding an empty string is inconsistent with documentation

2017-09-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure why we're arguing over this. Is this actually something that matters in the real world? -- ___ Python tracker

  1   2   >