[issue24896] It is undocumented that re.UNICODE affects re.IGNORECASE
New submission from Leif Arne Storset: A non-ASCII string does not match a regular expression case-insensitively unless the UNICODE flag is set. This seems reasonable, but the documentation seems to imply that this is not the case. The example: import re # Does not match re.compile(uнеоднозначность, re.IGNORECASE) \ .findall(uНеоднозначность) # Matches re.compile(uнеоднозначность, re.IGNORECASE | re.UNICODE) \ .findall(uНеоднозначность) (In Python 3, it does not match if re.ASCII is given.) The documentation (2.7) says: re.UNICODE Make \w, \W, \b, \B, \d, \D, \s and \S dependent on the Unicode character properties database. (https://docs.python.org/2/library/re.html#re.UNICODE) My regex does not use any of those escapes, yet the regex changes behavior with the UNICODE flag. This leads to confusion when the regex doesn't match. The documentation is very specific about the behavior that changes with the flag, implying that behavior not mentioned is unaffected. Of course, it's easy to guess the correct (hopefully) solution. Still, I suggest changing the documentation to mention that re.IGNORECASE is affected. Looking at the source code, there seems to be further consequences (it mentions Unicode locale) which may also warrant a mention. If you do want to avoid specifics, however, even a hand-wavy reference to something like match according to Unicode would help, because it implies that not only the escapes change behavior. In Python 3, there is a counterpart to the 2.7 problem: re.ASCII makes our Cyrillic string not match. Again, this behavior makes intuitive sense, but the documentation seems to indicate something different: re.ASCII Make \w, \W, \b, \B, \d, \D, \s and \S perform ASCII-only matching instead of full Unicode matching. This is only meaningful for Unicode patterns, and is ignored for byte patterns. … re.IGNORECASE Perform case-insensitive matching; expressions like [A-Z] will match lowercase letters, too. This is not affected by the current locale and works for Unicode characters as expected. re.ASCII does appear to affect re.IGNORECASE. Since this is the non-default case, however, I'm not sure it's worth calling it out. I'd be happy even if only the 2.7 docs change. -- assignee: docs@python components: Documentation messages: 248829 nosy: Leif Arne Storset, docs@python priority: normal severity: normal status: open title: It is undocumented that re.UNICODE affects re.IGNORECASE versions: Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24896 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24054] Invalid syntax in inspect_fodder2.py (on Python 2.x)
Changes by David Edelsohn dje@gmail.com: -- nosy: +David.Edelsohn -David Edelsohn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24054 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16885] SQLite3 iterdump ordering
Gerhard Häring added the comment: http://bugs.python.org/issue20463 is related. -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16885 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24877] Bad Password for file using zipfile module
Changes by shiva prasanth kesavarapu.s...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24877 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24054] Invalid syntax in inspect_fodder2.py (on Python 2.x)
R. David Murray added the comment: Example: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/10098/steps/test/logs/stdio -- nosy: +r.david.murray stage: resolved - needs patch status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24054 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24870] Optimize coding with surrogateescape and surrogatepass error handlers
R. David Murray added the comment: Since you already have to rewrite the string to do the escaping, I would judge it worth the extra effort to piece string together as binary, but I can understand wanting to use % notation. The performance issue seems to prevent that, though, and there's no guarantee the proposed optimization will get applied to 3.4, or even 3.5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24870 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3783] dbm.sqlite proof of concept
Gerhard Häring added the comment: This wiki page is out of date. It appears that SQlite is now threadsafe by default: http://www.sqlite.org/threadsafe.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3783 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24896] It is undocumented that re.UNICODE affects re.IGNORECASE
R. David Murray added the comment: I think it would be reasonable to add re.IGNORECASE to the list of things affected, since it obviously does switch between using the unicode database and not doing so. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24896 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23606] ctypes.util.find_library(c) no longer makes sense
Steve Dower added the comment: I've been ignoring this because I wasn't assigned... Here's the options. If we make it load ucrtbase.dll directly (which does still have named exports, and also uses the API schema on Windows 10): * some code that uses it will need updating (due to API changes since VC9/VC10) * code may need to change depending on OS updated (which could change the ucrtbase exports) * much existing code using this will probably work If we leave it as is: * all existing uses will obviously fail, nothing subtle * users will either substitute the name themselves, find an equivalent stdlib function, or use a supported Windows API Having just written that out, I still think not supporting it is best, but I do need to write it up in the porting info still. Any other thoughts? -- assignee: - steve.dower ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23606 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10740] sqlite3 module breaks transactions and potentially corrupts data
R. David Murray added the comment: It's not a backward compatible change, so we'll need a migration strategy if we want to apply this (and I'd certainly like to). -- versions: +Python 3.6 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10740 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24054] Invalid syntax in inspect_fodder2.py (on Python 2.x)
David Edelsohn added the comment: Also http://buildbot.python.org/all/builders/s390x%20Debian%203.x/builds/2/steps/test/logs/stdio http://buildbot.python.org/all/builders/s390x%20Debian%203.x/builds/2 Comments Issue #24054: decouple linecache tests from inspect tests Patch from David D. Riddle Changed files Lib/test/test_linecache.py -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24054 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10740] sqlite3 module breaks transactions and potentially corrupts data
R. David Murray added the comment: Excellent. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10740 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24054] Invalid syntax in inspect_fodder2.py (on Python 2.x)
David Edelsohn added the comment: This patch causes a new failure on many of the buildbots. -- nosy: +David Edelsohn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24054 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24892] bytes.join() won't take it's own type as the argument
R. David Murray added the comment: In case I wasn't clear: bytes-like object join's argument is *an iterable of bytes-like objects*, not an iterable of ints. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24892 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24892] bytes.join() won't take it's own type as the argument
R. David Murray added the comment: I said *enough* motivation. doing b'x'.join(b'anything') is a very uncommon operation (as is the equivalent string case). There is no parallel to the bytearray constructor, since that constructor does not take an iterable of byte-like objects as its input, it takes an iterable of ints, as you point out. There is no parallel to slice assignment, since a slice is by definition a bytes like object (that's why using the slice notation in the comprehension to the argument of join works). The inconsistency is entirely a consequence of the fact that if you iterate a bytes-like object you get integers. So, join's behavior is consistent with that, and as I said, *I* don't see enough motivation to make a special case exception here. Others may disagree. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24892 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24736] argparse add_mutually_exclusive_group do not print help
Alexandre Badez added the comment: @paul: thanks, I'm very surprised because the parsing work well. It's just the display that do not. Moreover it's not said in the documentation that you cannot nest groups. So maybe we should update the documentation and/or improve the module ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24736 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10740] sqlite3 module breaks transactions and potentially corrupts data
Gerhard Häring added the comment: Please note that after the mentioned commit, I restored backwards compatibility with commit https://github.com/ghaering/pysqlite/commit/796b3afe38cfdac5d7d5ec260826b0a596554631 Now the only difference is that the implicit commits *before* DDL statements are gone. I consider these a bug anyway. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10740 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19065] sqlite3 timestamp adapter chokes on timezones
R. David Murray added the comment: Can you expand on why you are -1, Gerhard? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19065 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24790] Idle: improve stack viewer
Can İbanoğlu added the comment: Alright, here goes my first patch. I just did what you have pointed out :) -- keywords: +patch Added file: http://bugs.python.org/file40213/issue24790.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24790 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24892] bytes.join() won't take it's own type as the argument
Brett Cannon added the comment: I agree with David. Concatenating ints to a bytes object doesn't work when you directly work with ints and bytes, and so I don't think bytes.join should special case it (Zen of Python: Special cases aren't special enough to break the rules). Thanks for the idea anyway, Timothy. -- nosy: +brett.cannon resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24892 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24790] Idle: improve stack viewer
Can İbanoğlu added the comment: Thank you very much for your thorough input, it is very much appreciated! Actually one of the first things that I tried was to return stack[1:] to remove the target but your suggestion is much better. I did try it and it does work and I will provide a patch as soon as I get home. I'll start probing the second one then. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24790 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24847] Can't import tkinter in Python 3.5.0rc1
Steve Dower added the comment: Larry - PR for you at https://bitbucket.org/larry/cpython350/pull-requests/6/issue-24847-removes-vcruntime140dll/diff The buildbots are happy with this change, and so am I. Zach also had a look at the Tcl and Tk patches, and I've already heard back from upstream that they like the change but need it expanded before they'll take it (that won't affect what we need for our builds though). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24847 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24895] indentation fix in ceval.c
Brett Cannon added the comment: Thanks for the patch, Laurent. Can any other core devs remembered if we explicitly untabbed the C source in 2.7? I know we did in Python 3, but I can't remember if we did it in Python 2 to make patches easier. -- nosy: +brett.cannon stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24895 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24895] indentation fix in ceval.c
Laurent Coustet added the comment: by the way, the rest of the code did not contain any tab in ceval.c. They were added by 17d3bbde60d2 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24895 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24895] indentation fix in ceval.c in python 2.7
Changes by STINNER Victor victor.stin...@gmail.com: -- title: indentation fix in ceval.c - indentation fix in ceval.c in python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24895 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24790] Idle: improve stack viewer
Can İbanoğlu added the comment: I have also prepared a patch for the second item but I don't know if I should regenerate the patch after you have committed the first patch so I'm sitting on it now. I also didn't update the ACKS and NEWS files, should I? Here's what I did for the second item, just in case you spot something I shouldn't be doing: sublist = [] if frame.f_globals is not frame.f_locals: item = VariablesTreeItem(locals, frame.f_locals, self.flist) -sublist.append(item) -item = VariablesTreeItem(globals, frame.f_globals, self.flist) +else: +item = VariablesTreeItem(globals, frame.f_globals, self.flist) sublist.append(item) return sublist -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24790 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24895] indentation fix in ceval.c
R. David Murray added the comment: I couldn't remember either. Antoine should know, he did the work/commit. -- nosy: +pitrou, r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24895 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24790] Idle: improve stack viewer
Can İbanoğlu added the comment: Come to think of it, maybe I should send both the second and third items in one patch? I could just call the GetSubList method if the VariablesTreeItem is being created for locals. Is that a bad approach to take? Sorry for the sheer number of questions :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24790 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24895] indentation fix in ceval.c
Antoine Pitrou added the comment: The Python 3 code doesn't have tabs. I'm assuming Benjamin took the original patch instead of trying to backport the Python 3 commit. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24895 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8987] Distutils doesn't quote Windows command lines properly
R. David Murray added the comment: So I think the only objection to committing this as a bug fix would be the unfortunately real possibility that doing so will break someone's workaround. My *guess* is that such a workaround would most likely take the form of replacing _nt_quote_args as the one example we have in had did. So I'm in favor of fixing this. I've added some people to nosy who might have an opinion and even perhaps some way to look for other examples of people coping with this (in open source code bases that also target windows). I haven't reviewed the patch yet but I will. -- nosy: +barry, dstufft, ncoghlan, steve.dower ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8987 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24790] Idle: improve stack viewer
Terry J. Reedy added the comment: NEWS patches should be omitted from submitted .diff or .patch files because a) NEWS is so volatile that merge conflicts applying the .diff are likely; b) NEWS is different between versions, so that forward merge conflicts are possible (usual for Idle items, so I apply them separately) and b) committers tend to rewrite then anyway. I will later prepare and separately commit one entry for this issue. ACKS is more stable within and between versions, so including a acks patch is ok. But then the patch must be prepared for 3.4 and 2.7 specifically, and I want to know ahead of time if there will be a 3.4 to 3.5 or 3.5 to 3.6 merge conflict. You can include it or leave it out (easier). I tested both the .patch and diff in msg248849. When putting code or diffs in messages, please include function/class/method names or lineno. With this patch, SubList always return a list of one item. Note that we can always use frame.f_locals, whether it is or is not f_globals. I am not exactly sure what you meant by your your last question, but it lead me to the answer. When a tree item with + is clicked, the corresponding GetSubList method is called. What we want FrameTreeItem.GetSubList to do, instead of returning a list of (now 1) VariablesTreeItem, is to return what VariablesTreeItem.GetSubList would (when clicked subequently). Replace most of the body of the former (FrameTI.GSL) with the body of the latter (VarTI.GSL), with 'self.object' replaced by 'frame.f_locals'. Class VariablesTreeItem will then be obsolete. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24790 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24710] Class name hardcoded in TracebackException.from_exception()
Robert Collins added the comment: So I'm still ambivalent at best about this - this interface hasn't been designed for subclassing - I'm sure there is a bunch more stuff that would be needed. What /is/ needed feature wise here is a sideways extension mechanism for doing filtering and transformation of frames. I'd be much happier about looking at subclassability after we had that in place. Anyhow, since I did apply the change this issue was specifically about (the third hunk in the patches), I'm going to close this now. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24710 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20362] longMessage attribute is ignored in unittest.TestCase.assertRegexpMatches etc
Changes by Robert Collins robe...@robertcollins.net: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20362 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8987] Distutils doesn't quote Windows command lines properly
Steve Dower added the comment: Switching distutils.spawn to simply use subprocess.Popen (probably keeping the explicit path search) looks good to me. Quoting rules are different when you call with shell=True (aka cmd.exe /c), since then you also need to escape ^, | and (with a ^), but if it's being passed directly to the process (via CreateProcess) you don't need to do this. Popen doesn't appear to handle this correctly either. Because of the backwards compatibility concerns, realistically I think we can only fix this in 3.6 at this stage. The issue has existed for too long to convince Larry to take it for 3.5.0, and changing the behaviour of either distutils or subprocess between .0 and .1 feels risky to me. (Adding Brett in case he's motivated to take the opportunity to definitively learn and implement Windows's quoting rules and becoming the first person in the world to achieve it. Sounds like his kind of thing :) ) -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8987 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24054] Invalid syntax in inspect_fodder2.py (on Python 2.x)
Robert Collins added the comment: I can't see how the patch could have caused the Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_symbol.py, line 44, in test_real_grammar_and_symbol_file os.stat(TEST_PY_FILE))) AssertionError: False is not true : symbol stat: os.stat_result(st_mode=33206, st_ino=108649341010373284, st_dev=164288, st_nlink=1, st_uid=0, st_gid=0, st_size=2095, st_atime=1438992962, st_mtime=1438992962, st_ctime=1438992962) test_py stat: os.stat_result(st_mode=33206, st_ino=71213169107987373, st_dev=164288, st_nlink=1, st_uid=0, st_gid=0, st_size=2209, st_atime=1439969830, st_mtime=1439969831, st_ctime=1439969830) failure, so I'm going to ignore that - its a size change in the output file. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24054 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24054] Invalid syntax in inspect_fodder2.py (on Python 2.x)
Robert Collins added the comment: So it looks like one failure is: FAIL: test_getline (test.test_linecache.GoodUnicode) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_linecache.py, line 63, in test_getline self.assertEqual(line, cached_line) AssertionError: 'á\n' != '�\n' - á + � and the other is: == ERROR: test_getline (test.test_linecache.GoodUnicode) -- Traceback (most recent call last): File /home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/test_linecache.py, line 58, in test_getline for index, line in enumerate(fp): File /home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/encodings/ascii.py, line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) We need to figure out if the failure is spurious/local capabilities (e.g. we should skip the test here) or a bug in the test. Where can I find out more about the config of the buildbots? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24054 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24893] Idle occasionally gets mouse position wrong for selections
Changes by Mark Roseman m...@markroseman.com: -- nosy: +markroseman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24893 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20362] longMessage attribute is ignored in unittest.TestCase.assertRegexpMatches etc
Roundup Robot added the comment: New changeset 738de9a9a3ea by Robert Collins in branch '3.5': Issue #20362: Honour TestCase.longMessage correctly in assertRegex. https://hg.python.org/cpython/rev/738de9a9a3ea New changeset 977e60f597de by Robert Collins in branch 'default': Issue #20362: Honour TestCase.longMessage correctly in assertRegex. https://hg.python.org/cpython/rev/977e60f597de -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20362 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21192] Idle: Print filename when running a file from editor
Raymond Hettinger added the comment: I've found this to be a serious usability regression and think it should be reverted right-away. It makes IDLE unsuitable for evening showing turtle demos to kids. For adults in my classes, it was also confusing because unlike the old restart-bar it fails to make a clean distinction between sessions and making it clear that old variable definitions have be forgotten. The issue is even more acute because cmd-p can cycle through statements in previous sessions. -- nosy: +rhettinger resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21192 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24893] Idle occasionally gets mouse position wrong for selections
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - terry.reedy nosy: +ned.deily, ronaldoussoren, terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24893 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20362] longMessage attribute is ignored in unittest.TestCase.assertRegexpMatches etc
Robert Collins added the comment: Thanks for the patch, applied to 3.5 and 3.6. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20362 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24054] Invalid syntax in inspect_fodder2.py (on Python 2.x)
Robert Collins added the comment: Debian is green again and I think windows will do so to. -- stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24054 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24889] Idle: always start with focus
Mark Roseman added the comment: I reproduced your problem on Windows, and verified that it wasn't an issue on either Mac or Linux. Your fix however, didn't change anything for me (on a Windows 7 VM). I tried a few other things (raising the window, playing with various wm attributes, etc.) with no luck. The fact that it works ok when run directly from the command prompt got me thinking, and I eventually tracked down what is preventing IDLE from becoming the front application. It's actually an internal Windows feature, that's designed to prevent background applications from all of a sudden putting up windows that interfere with what you're doing in the foreground, instead putting a notification in the task bar and making you click that or the window itself. The mechanism used is to prevent applications from coming to the front on their own if they don't do so very shortly after they're first launched. So when you launch a Python shell (e.g. from a command prompt), the delay it takes you to type import idlelib.idle plus the launch time exceeds this timeout, and Windows decides it won't allow it to put the window in the foreground. You can change the timeout (or set it to 0 to disable the feature) via the registry key HKEY_CURRENT_USER\Control Panel\Desktop\ForegroundLockTimeout (you need to restart after). With that change, your fix worked for me. You can Google around for ForegroundLockTimeout for additional info. There's not realistically an easy way to get around it in IDLE itself (for obvious reasons, given the purpose of the feature). I'm guessing this will affect few people as much as it does you, constantly starting and stopping IDLE from within Python. If the fix works on your system, especially without mucking with that registry key, that should cover it. The fix doesn't cause any harm on Mac or Linux. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24889 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8987] Distutils doesn't quote Windows command lines properly
R. David Murray added the comment: There are two features of this I have questions about. If I'm understanding correctly, if passed a quoted string you are not re-quoting it, but you are always stripping a trailing slash even if it is inside quotes. For the first, that seems wrong. Either we should be quoting the quotes, or we should assume that if passed a string that starts and ends with quotes, that it is already fully quoted, and not change it. For the second, doesn't that potentially change the semantics of the string passed in? You can't actually know that the backslash is part of a path, nor can you be sure that a trailing backslash is not significant even if it is a path. And in fact if there is a backslash before a double quote, arguably that is supposed to be a double quote that doesn't end the string (see point one above). I tried list2cmdline, and what it does is to backslash escape appropriately, including preserving blackslashes that are in front of double quotes, and does not add surrounding quotes if there are no internal blanks. I think list2cmdline is correct here (and it has certainly seen a lot of use), and I think we should either replicate its logic or just use it. Now, subprocess calls CreateProcess, while distutils calls os.spawnv, but my understanding is that the quoting rules are the same (that is, that the CRT's _spawnv ultimately calls CreateProcess with the arguments joined by blanks). Since issue 8972 has been resolved by fixing the broken behavior, I think we should just use list2cmdline. We could leave _nt_quote_args alone and replace the call to it in _spawn_nt with: cmd = [list2cmdline([arg]) for arg in cmd] or we could put the fix in _nt_quote_args. The backward compatibility calculus is...not obvious :( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8987 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8987] Distutils doesn't quote Windows command lines properly
Mark Lawrence added the comment: As far as I'm concerned distutils on Windows is a farce so do what you like with it. It usually can't pick up the version of VS that you know is correct and is installed, the error messages are less than useless, so the only damage that I see is something that is even more broken than it all ready is. Alternatively it gets slightly further before bombing with yet another useless message. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8987 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22680] Blacklist FunctionTestCase from test discovery
Changes by Robert Collins robe...@robertcollins.net: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22680 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24897] Add new attribute decorator (akin to property)?
New submission from Emanuel Barry: This is an issue that came up quite often when creating code where you want the class' namespace to hold the instance attributes. I've often seen (and written) code like this: class Foo: def __init__(self): self._x = 42 @property def x(self): return self._x As an attempt to populate the class namespace with what should normally be available on the instance. In all my projects now I use my own custom decorator to get around that. class attribute: def __init__(self, func): self.func = func def __get__(self, instance, owner): if instance is None: return self return self.func.__get__(instance, owner) This permits instances to override attributes set as such, like this: class Bar: def __init__(self): self.x = 42 @attribute def x(self): pass # placeholder I figured I might as well suggest the idea. I'm not attached to the name, and it's more for completion's sake rather than hard necessity. -- messages: 248869 nosy: ebarry priority: normal severity: normal status: open title: Add new attribute decorator (akin to property)? versions: Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24897 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24897] Add new attribute decorator (akin to property)?
Ethan Furman added the comment: Could you give an actual use-case demo, and how it's different from @property? Could just be that I'm tired, but I'm not seeing the advantages of @attribute. -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24897 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24897] Add new attribute decorator (akin to property)?
Emanuel Barry added the comment: The only significant difference is that it lets the instance overwrite the attribute (it doesn't have __set__ or __delete__). For example (using fractions.Fraction to demonstrate), the following: def __new__(cls, numerator=0, denominator=None, _normalize=True): # ... self._numerator = numerator self._denominator = denominator @property def numerator(a): return a._numerator @property def denominator(a): return a._denominator would become: def __new__(cls, numerator=0, denominator=None, _normalize=True): # ... self.numerator = numerator self.denominator = denominator @attribute def numerator(a): pass @attribute def denominator(a): pass This is more of an aesthetic enhancement rather than a functional one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24897 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24898] Documentation for str.find() is confusing
New submission from Ted Lemon: The documentation for str.find() on python.org, for all current versions, says: Return the lowest index in the string where substring sub is found, such that sub is contained in the slice s[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 if sub is not found. I think that what is meant here is this: Return the lowest index in a string s where substring sub is found, such that if a is the returned index, and b == a + len(sub), sub is contained in the slice s[a:b]. Optional arguments start and end are interpreted as in slice notation. Return -1 if sub is not found. -- assignee: docs@python components: Documentation messages: 248872 nosy: Ted Lemon, docs@python priority: normal severity: normal status: open title: Documentation for str.find() is confusing versions: Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24898 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24893] Idle occasionally gets mouse position wrong for selections
Mark Roseman added the comment: Watched that video clip - yikes, that is bad. I tried playing around to reproduce it, but haven't had any success yet, though did find another weird thing. If you have a bunch of short lines without any blanks, sometimes when you click well to the right of all of them, the cursor will end up at the beginning of one of the lines, rather than at the end of them. This wasn't consistent but did happen maybe 1/10th of the time. Guido was running on a Mac. Were the other examples where you saw this missing by several lines also all on Mac? (Not to say that means it's a Mac only bug, but...) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24893 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24893] Idle occasionally gets mouse position wrong for selections
Ned Deily added the comment: A wild guess: could it be dependent on the screen resolution, in particular if a Mac Retina display is in use? It also could depend on the version of Tk; from the screenshot it is clear that Guido was not using a python.org version of 3.4 so the out-of-date Apple-supplied Tk *might* be in use. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24893 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24893] Tk occasionally mispositions Text() insert cursor on mouse click.
Terry J. Reedy added the comment: Guido, we are looking at the PyCon 2014 keynote video where the text cursor was misplaced relative to the mouseclick, trying to guess the reason. Do you still have the Mac laptop you used? If so, have you upgraded its python? The hideous moment is at 7:10. Guido clicked after '.split' to position the blinking insert cursor there, to add 'lines' to the method name. There was no reason to select anything. The cursor appeared instead on the blank line 4 lines above. Guido was able to move the text cursor with arrow keys, as normal, to the desired position. Serhiy or Kevin, have either of you seen or heard of this problem? Earlier in the video, there are Display boxes offering resolution choices of 800x600, 1024x768, and 1280x1024. I presume that this indicates 'not Retina'. I suspect the OS or tk they jointly control the text cursor. Minimal code for experiments is: import tkinter as tk root = tk.Tk() text = tk.Text() text.pack() root.mainloop() Running the above on Win7, I tried Mark's experiment. Clicking near the end of a line consistently put the cursor at the end of the line. Clicking near the right edge of the box, at least 50 columns away, consistently put the cursor at the beginning of *some* line, but not necessarily the one 'clicked' on. I looked at idlelib.EditorWindow for anything that might possibly affect tk processing of left button clicks. I only found 2 items. if macosxSupport.isAquaTk(): text.bind(Control-Button-1,self.right_menu_event) If the problem were Mac-specific, this might warrant a look. self.text.event_add(set-line-and-column, KeyRelease, ButtonRelease) The cursor is positioned on buttom press, before release. -- assignee: terry.reedy - components: +Tkinter nosy: +gvanrossum, serhiy.storchaka, wordtech stage: - test needed title: Idle occasionally gets mouse position wrong for selections - Tk occasionally mispositions Text() insert cursor on mouse click. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24893 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24898] Documentation for str.find() is confusing
Georg Brandl added the comment: The slice clause is talking about the additional arguments. A clearer version could be Return the lowest index in the string where substring sub is found within the slice s[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 if sub is not found. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24898 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21192] Idle: Print filename when running a file from editor
Terry J. Reedy added the comment: How about 'RESTART: Shell' and 'RESTART: name of file' to make it clear that old definitions are forgotten in both cases while new definitions are added in the second case. I do not understand the comment about turtledemo as it runs separately from Idle. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21192 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24894] iso-8859-11 missing from codecs table
New submission from Ezio Melotti: In https://docs.python.org/3/library/codecs.html#standard-encodings iso8859_11 appears to be missing. 'thai' seems a valid alias for this encoding, but there might be others. cp874 also covers the thai alphabet, but it's a different encoding. Note that iso8859_12 is also missing, but that is expected. See also https://en.wikipedia.org/wiki/ISO/IEC_8859#The_Parts_of_ISO.2FIEC_8859 -- assignee: docs@python components: Documentation, Unicode keywords: easy messages: 248819 nosy: docs@python, ezio.melotti, haypo priority: normal severity: normal stage: needs patch status: open title: iso-8859-11 missing from codecs table type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24894 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16958] The sqlite3 context manager does not work with isolation_level=None
Gerhard Häring added the comment: I'm +1 on deprecating the connection manager -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16958 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20463] sqlite dumpiter dumps invalid script when virtual tables are used
Gerhard Häring added the comment: apsw contains code that handles the issues with dumping SQLite databases very well. I plan to integrate this code into pysqlite. We can then later port the fix to the sqlite3 module. See https://github.com/ghaering/pysqlite/issues/10 for the tasks and https://github.com/rogerbinns/apsw/blob/master/tools/shell.py#L1012 for the apsw code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20463 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11691] sqlite3 Cursor.description doesn't set type_code
Gerhard Häring added the comment: There is no guarantee that all any column in a SQlite resultset always has the same type. That's why I decided to err on the side of setting the type code to undefined. Closing as wontfix. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11691 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24887] Sqlite3 has no option to provide open flags
Gerhard Häring added the comment: It requires switch to the v2 open function of the SQLite C API. While we're at it, we can also enable URI filenames. -- assignee: - ghaering nosy: +ghaering versions: +Python 3.6 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19065] sqlite3 timestamp adapter chokes on timezones
Gerhard Häring added the comment: I'm -1 on adding timezone to the adapters. -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19065 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16379] SQLite error code not exposed to python
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16379 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21250] sqlite3 doesn't have unit tests for 'insert or [algorithm]' functionality.
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21250 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16864] sqlite3.Cursor.lastrowid isn't populated when executing a SQL REPLACE statement
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16864 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24895] indentation fix in ceval.c
New submission from Laurent Coustet: https://hg.python.org/cpython/rev/17d3bbde60d2 introduced a patch using tabs for indentation in ceval.c. Attached patch just make the code more consistent by using spaces instead of tabs for indentation. Related to: http://bugs.python.org/issue4753 -- components: Interpreter Core files: cpython2.7_indentfix_ceval.diff keywords: patch messages: 248827 nosy: Laurent Coustet priority: normal severity: normal status: open title: indentation fix in ceval.c versions: Python 2.7 Added file: http://bugs.python.org/file40212/cpython2.7_indentfix_ceval.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24895 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9303] Migrate sqlite3 module to _v2 API to enhance performance
Gerhard Häring added the comment: The externally maintained version of the sqlite3 module has now been switched to the v2 statement API. pysqlite is for Python 2.7 only. I'd suggest to revisit this for Python 3.6 and then try to port most fixes from pysqlite to the sqlite3 module. -- resolution: - postponed versions: +Python 3.6 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9303 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24870] Optimize coding with surrogateescape and surrogatepass error handlers
INADA Naoki added the comment: Why are bytes being escaped in a binary blob? The reason to use surrogateescape is when you have data that is mostly text, should be processed as text, but can have occasional binary data. That wouldn't seem to apply to a database binary blob. Since SQL may contain binary data. data = bytes(range(256)) cursor.execute(uINSERT INTO t (blob_col) values (%(data)s), {data: data}) DB driver should escape properly for SQL syntax, then decode with surrogateescape for % operator. bytes in Python 3.5 supports % operator so I can use it instead of unicode %. But I'll continue to support Python 3.4 for some years. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24870 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23606] ctypes.util.find_library(c) no longer makes sense
Changes by Christoph Gohlke cgoh...@uci.edu: -- nosy: +cgohlke ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23606 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24895] indentation fix in ceval.c in python 2.7
Roundup Robot added the comment: New changeset ea2f6fd04307 by Benjamin Peterson in branch '2.7': remove tabs from ceval.c (closes #24895) https://hg.python.org/cpython/rev/ea2f6fd04307 -- nosy: +python-dev resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24895 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com