[issue22812] Documentation of unittest -p usage wrong on windows.
Pam McA'Nulty added the comment: Here's a version of the docs with double quotes -- Added file: http://bugs.python.org/file39033/cpython-22812-discovery-double-quotes-v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22812 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files
Serhiy Storchaka added the comment: Proposed patch converts _dbm and _gdbm modules to Argument Clinic. -- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file39032/dbm_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20184 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17445] Handle bytes comparisons in difflib.Differ
Greg Ward added the comment: OK I've revived my patch and rebased on latest trunk. http://hg.gerg.ca/cpython/rev/13161c1d9c5f Comments welcome. I'll push this in a couple of days if nobody objects. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23964] Update README documentation for IDLE tests.
Changes by Al Sweigart asweig...@gmail.com: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23964 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23964] Update README documentation for IDLE tests.
New submission from Al Sweigart: It took me a while to read through the idle_test documentation to figure out how to run the test. Similar to the Profiler documentation, I've added Instant User's Manual section at the top of the file, as well as edited the text and formatting a bit. -- components: IDLE files: idle_test_readme.patch keywords: patch messages: 241099 nosy: Al.Sweigart priority: normal severity: normal status: open title: Update README documentation for IDLE tests. versions: Python 3.5 Added file: http://bugs.python.org/file39035/idle_test_readme.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23964 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23898] inspect() changes in Python3.4 are not compatible with objects that implement special __bool__, __eq__
mike bayer added the comment: my star went through. let's merge. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23898 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9517] Make test.script_helper more comprehensive, and use it in the test suite
Michael McFadden added the comment: Yes, I did miss that. (Root cause: `git diff` instead of `git diff --staging`) Sorry. I'm learning, and decided to take the git path - might not have been the best choice. I'll submit a new patch shortly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9517 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2931] optparse: various problems with unicode and gettext
Greg Ward added the comment: I've turned ash's test program into a bunch of test cases against Python 3.5 trunk. Is it worth committing them? Yeah, probably. Review comments... +try: +self.parser.error(RUSSIAN_TEXT) +except InterceptedError: +pass Why not self.assertRaises()? Also, when I run the test on its own, it prints ''' Usage: regrtest.py [options] regrtest.py: error: Русский текст --unknown ''' to stderr. Probably need to fiddle with sys.stderr to fix that. Blech. Finally: +try: +import optparse +old_gettext = optparse._ +optparse._ = dummy_gettext + +try: +OptionParser().parse_args([--unknown]) +except SystemExit: +pass +finally: +optparse._ = old_gettext This is a lot easier with mock. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2931 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23963] Windows build error using original openssl source
New submission from Anselm Kruis: I just had an issue rebuilding 2.7.9 with openssl-1.0.1m. Because this openssl version is not yet available from svn.python.org, I used the original source from https://www.openssl.org/source/openssl-1.0.1m.tar.gz. Of course Perl is installed. Problem The build fails, because the created makefile ms/nt.mak contains rules for excluded ciphers (RC5, MDC2, IDEA). The documentation in PCbuild/readme.txt anticipates a similar compile error: You may have to manually remove $(OBJ_D)\i_*.obj from ms\nt.mak if the build process complains about missing files or forbidden IDEA. Obviously manual patching of ms\nt.mak is inconvenient. A clean solution: invoke the openssl Configure script with appropriate arguments: perl Configure no-rc5 no-mdc2 no-idea ... The attached patch changes PCbuild/build_ssl.py to add the no-xxx args to the Configure command line. Python 3.x already contains a similar fix (changeset bcf93e3766e8). -- components: Build files: 2.7-build_ssl.patch keywords: patch messages: 241096 nosy: anselm.kruis, zach.ware priority: normal severity: normal status: open title: Windows build error using original openssl source type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file39034/2.7-build_ssl.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23963 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9517] Make test.script_helper more comprehensive, and use it in the test suite
Michael McFadden added the comment: I'm thinking also, maybe instead of putting script_helper into the test.support namespace, we could move the individual methods and helpers from script_helper into test.support, e.g.: test.support.run_python_until_end vs. test.support.script_helper.run_python_until_end1 Yes, I also agree that this looks better. But as this was first humble patch submission to CPython, I followed David Murry's instructions during my review - which was to move the entire module. I would be opposed to adding the methods directly into __init__.py, I would recommend still moving script_helper into test.support , and adding a list of symbols from script_helper.py into __init__ eg: test/support/__init__.py: from script_helper import run_python_until_end test/some_test.py: from test.support import run_python_until_end I am currently in the PyCon CPython sprint room if you are also here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9517 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23965] test_ssl failure on Fedora 22
Christian Heimes added the comment: I suspect that the FIPS version of OpenSSL can't create a SSLv3 server anymore. -- nosy: +alex, dstufft, giampaolo.rodola, janssen, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23965 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22848] Subparser help does not respect SUPPRESS argument
Matt Long added the comment: I prefer the idea of help=SUPPRESSED resulting in a hidden subcommand. That is, one that does not show up at all in the usage/help output: import argparse parser = argparse.ArgumentParser(prog='myapp') parser.add_argument('--foo', action=CustomAction) sub_parsers = parser.add_subparsers(dest='commands', title='subcommands') sub_parser = sub_parsers.add_parser('sub-command-1', help='sub-command-1 help') sub_parser = sub_parsers.add_parser('sub-command-2', help=argparse.SUPPRESS) sub_parser = sub_parsers.add_parser('sub-command-3') parser.parse_args(['-h']) Would result in: usage: myapp [-h] [--foo FOO] {sub-command-1,sub-command-3} ... optional arguments: -h, --helpshow this help message and exit --foo FOO subcommands: {sub-command-1,sub-command-3} sub-command-1 normal subcommand help Assuming this behavior, what should happen if you request help for a subparser with help=SUPPRESSED? That is, you know the subcommand exists even though it's not mentioned in the usage. I would assume it would show usage as normal (note the description kwarg for sub-command-2): import argparse parser = argparse.ArgumentParser(prog='myapp') parser.add_argument('--foo', action='store_true') sub_parsers = parser.add_subparsers(dest='commands', title='subcommands') sub_parser = sub_parsers.add_parser('sub-command-1', help='sub-command-1 help') sub_parser = sub_parsers.add_parser('sub-command-2', help=argparse.SUPPRESS, description='description of suppressed sub-command-2') sub_parser = sub_parsers.add_parser('sub-command-3') parser.parse_args(['sub-command-2', '-h']) Would result in: usage: myapp sub-command-2 [-h] description of suppressed sub-command-2 optional arguments: -h, --help show this help message and exit An edge case to consider: what should top-level help look like if ALL subparsers are suppressed? It seems like a degenerate scenario, but complete is important, right? The one that feels most correct to me is to follow the current behavior when you call add_subparsers but never call add_parser: import argparse parser = argparse.ArgumentParser(prog='myapp') parser.add_argument('--foo', action='store_true') sub_parsers = parser.add_subparsers(dest='commands', title='subcommands') parser.parse_args(['-h']) Currently results in: usage: myapp [-h] [--foo] {} ... optional arguments: -h, --help show this help message and exit --foo subcommands: {} Another possibility would be to follow the current behavior when you never even call add_subparsers which would of course remove all notion that subcommands are accepted, but that doesn't feel right to me. -- nosy: +mattlong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22848 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13866] {urllib, urllib.parse}.urlencode should not use quote_plus
Changes by Arnon Yaari wiggi...@gmail.com: Removed file: http://bugs.python.org/file39006/issue13866.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13866 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23949] Number of elements display in error message is wrong while unpacking in traceback
Changes by Arnon Yaari wiggi...@gmail.com: Removed file: http://bugs.python.org/file39011/issue23949.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4254] _cursesmodule.c callable update_lines_cols()
R. David Murray added the comment: Thanks for updating. In the doc change you say it updates environment variables, but in the whatsnew change you say it changes constants of the curses module. I believe the whats new version is correct? Also, doc lines should be wrapped to 80 columns. Please omit the NEWS item from the patch...with our current system putting NEWS items in patches just makes the patches get stale really quickly. The committer will add the NEWS item. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4254 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23949] Number of elements display in error message is wrong while unpacking in traceback
Skip Montanaro added the comment: I like the idea of the too many and not enough messages being symmetric. If it's not too hard, I would prefer them to both identify the number of expected and received values. I don't have a recent checkout at hand though, so it's non-trivial for me to produce a patch. The best I can do easily is toss peanuts from the gallery. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17445] Handle bytes comparisons in difflib.Differ
Berker Peksag added the comment: Some small comments: * diff_bytes needs to be documented in the difflib docs and in Doc/whatsnew/3.5.rst. * diff_bytes needs to be added to difflib.__all__ * This looks like a new feature to me, so it would be better to just commit it to the default branch. +except AttributeError: +raise TypeError('all arguments must be bytes, not %r' % s) This could be changed to raise TypeError(...) from None +self.assertTrue( +isinstance(line, bytes), assertIsInstance +try: +list(difflib.unified_diff(a, b, fna, fnb)) +self.fail('expected TypeError') +except TypeError: +pass with self.assertRaises(TypeError): list(difflib.unified_diff(a, b, fna, fnb)) looks more readable to me. -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)
Steve Dower added the comment: Reviewed v8 and it looks good to me. Not a clinic expert, but I assume that it'll fail at build if anything is really wrong. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20172 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23193] Please support numeric_owner in tarfile
Roundup Robot added the comment: New changeset 6b70f16d585a by Eric V. Smith in branch 'default': Issue 23193: Add numeric_owner to tarfile.TarFile.extract() and tarfile.TarFile.extractall(). https://hg.python.org/cpython/rev/6b70f16d585a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23193 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21642] _ if 1else _ does not compile
Steve Dower added the comment: FTR, I think this was a bad fix and we should have just changed the spec to require a space between numeric literals and identifiers. Closing as by design would have been fine in my opinion as well, since the spec says spaces are required when it's ambiguous, and this case looks fairly ambiguous. There's also a bit of a slippery slope here where we now have to fix 0x1and 3 or be very explicit about why it is different. I haven't even mentioned changing the parser in a dot release. That seems somewhat ridiculous. Everyone else who writes a Python parser (all the IDEs and type checkers, other implementations, etc.) would prefer it if we didn't need our tokenisers to look ahead two characters. -- nosy: +steve.dower versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21642 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13866] {urllib, urllib.parse}.urlencode should not use quote_plus
Arnon Yaari added the comment: Fixed Martin's comments. -- Added file: http://bugs.python.org/file39036/issue13866.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13866 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23193] Please support numeric_owner in tarfile
Eric V. Smith added the comment: Thanks everyone for their help, especially Michael for the original patch. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23193 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23965] test_ssl failure on Fedora 22
New submission from Kushal Das: OpenSSL version openssl-1.0.1k-6.fc22.x86_64 ssl.OPENSSL_VERSION 'OpenSSL 1.0.1k-fips 8 Jan 2015' == ERROR: test_protocol_sslv23 (test.test_ssl.ThreadedTests) Connecting to an SSLv23 server with various client options -- Traceback (most recent call last): File /home/kdas/code/python/cpython/Lib/test/test_ssl.py, line 119, in f return func(*args, **kwargs) File /home/kdas/code/python/cpython/Lib/test/test_ssl.py, line 2454, in test_protocol_sslv23 try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, 'SSLv3') File /home/kdas/code/python/cpython/Lib/test/test_ssl.py, line 2203, in try_protocol_combo chatty=False, connectionchatty=False) File /home/kdas/code/python/cpython/Lib/test/test_ssl.py, line 2130, in server_params_test s.connect((HOST, server.port)) File /home/kdas/code/python/cpython/Lib/ssl.py, line 1014, in connect self._real_connect(addr, False) File /home/kdas/code/python/cpython/Lib/ssl.py, line 1005, in _real_connect self.do_handshake() File /home/kdas/code/python/cpython/Lib/ssl.py, line 983, in do_handshake self._sslobj.do_handshake() File /home/kdas/code/python/cpython/Lib/ssl.py, line 628, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:634) == ERROR: test_protocol_sslv3 (test.test_ssl.ThreadedTests) Connecting to an SSLv3 server with various client options -- Traceback (most recent call last): File /home/kdas/code/python/cpython/Lib/test/test_ssl.py, line 119, in f return func(*args, **kwargs) File /home/kdas/code/python/cpython/Lib/test/test_ssl.py, line 2497, in test_protocol_sslv3 client_options=ssl.OP_NO_SSLv2) File /home/kdas/code/python/cpython/Lib/test/test_ssl.py, line 2203, in try_protocol_combo chatty=False, connectionchatty=False) File /home/kdas/code/python/cpython/Lib/test/test_ssl.py, line 2130, in server_params_test s.connect((HOST, server.port)) File /home/kdas/code/python/cpython/Lib/ssl.py, line 1014, in connect self._real_connect(addr, False) File /home/kdas/code/python/cpython/Lib/ssl.py, line 1005, in _real_connect self.do_handshake() File /home/kdas/code/python/cpython/Lib/ssl.py, line 983, in do_handshake self._sslobj.do_handshake() File /home/kdas/code/python/cpython/Lib/ssl.py, line 628, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:634) == FAIL: test_options (test.test_ssl.ContextTests) -- Traceback (most recent call last): File /home/kdas/code/python/cpython/Lib/test/test_ssl.py, line 119, in f return func(*args, **kwargs) File /home/kdas/code/python/cpython/Lib/test/test_ssl.py, line 789, in test_options ctx.options) AssertionError: 2164261887 != 2197816319 -- -- components: Library (Lib) messages: 241109 nosy: christian.heimes, kushal.das priority: normal severity: normal status: open title: test_ssl failure on Fedora 22 versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23965 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4254] _cursesmodule.c callable update_lines_cols()
Arnon Yaari added the comment: Fixed David's comments -- versions: +Python 3.5 -Python 3.2 Added file: http://bugs.python.org/file39037/issue4254.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4254 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4254] _cursesmodule.c callable update_lines_cols()
Changes by Arnon Yaari wiggi...@gmail.com: Removed file: http://bugs.python.org/file38973/patch_4254.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4254 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9517] Make test.script_helper more comprehensive, and use it in the test suite
Michael McFadden added the comment: Uploading new patch that includes the creation of Lib/test/support/script_helper.py -- Added file: http://bugs.python.org/file39038/iss9517_move_script_helpers_py.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9517 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2292] Missing *-unpacking generalizations
Steve Dower added the comment: I have limited expertise in most of these areas, but I looked at starunpack40.diff and have these comments: * tests look to have good coverage of the feature (can't speak to coverage of the parser/compiler code) * parsermodule.c changes comprehension handling, but I thought we pulled this out? * why was dictobject.c.h added? I don't understand clinic thoroughly, but it seems a lot of new code for what was changed in dictobject.c * can the BUILD_(TUPLE|LIST)_UNPACK code in ceval.c share most of the processing? Or is there an unwanted perf impact to that? * whoever applies the patch should regenerate importlib.h themselves - just a reminder Otherwise, I didn't see anything that particularly scared me. Since we apparently don't have anyone willing and with the expertise to thoroughly check the patch, I'd vote for checking it in asap so it has more releases to bake before 3.5 final. -- nosy: +steve.dower ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23937] IDLE start maximized
Al Sweigart added the comment: It is egregious for apps to assume that they are the only thing running I would agree for most apps, but I tend to think of IDEs as something that is generally run full screen. I'll note that Eclipse starts maximized, while PyCharm starts windowed. Though both will remember their state when the program is closed, and resume it the next time it starts. IDLE, however, always follows the width/height info in the config-main.def file. I propose the following: - Remove the Initial Window Size UI elements from the Configure IDLE window (Minimizing the number of choices the user must make on a config page keeps it uncluttered.) - Keep the config-main.def file settings, but have IDLE update it on exit. The next time IDLE starts it will have its previous size. This way if the user maximizes IDLE's window and then exits, it will start maximized the next time IDLE starts. Though I still think starting maximized as the default would be a good idea. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23937 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23949] Number of elements display in error message is wrong while unpacking in traceback
Arnon Yaari added the comment: I couldn't find a way to add 'got %d' to the 'too many values' message. This would either require going over the rest of the iterator (which will take more time and may never return) or trying to figure out if it has a 'len' member. I didn't find any place in the current code that does something like this and writing one myself is too error prone (there are so many cases...). PyObject_Size returns an error if I try to use it for this purpose. I found another message with need more than ... that I improved in the same way. This message is for when trying to execute: a, *(b, c, d) = 1, (2, 3), (4, 5) Now it outputs the message for the star unpacking: ValueError: not enough values to unpack (expected 3, got 2) which is confusing in this use case but still better than before. Oh my! -- Added file: http://bugs.python.org/file39039/issue23949.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23948] Deprecate os.kill() on Windows
John Ehresman added the comment: Part of the issue here is that GenerateConsoleCtrlEvent doesn't work like kill w/ SIGINT does on unix -- it only works if the the target process id is 0 and then it generates the signal in all processes that share the console. An alternate proposal here is to expose the GenerateConsoleCtrlEvent functionality separately and only accept a signal number of 9 and maybe 0 in kill(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23948 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23949] Number of elements display in error message is wrong while unpacking in traceback
Changes by Arnon Yaari wiggi...@gmail.com: Added file: http://bugs.python.org/file39042/issue23949-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)
Larry Hastings added the comment: If * the diff looks clean * it compiles without any *new* (sigh) errors, and * it passes the unit test suite without any *new* (sigh) failures, then the Clinic conversion can generally be considered a success. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20172 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9517] Make test.script_helper more comprehensive, and use it in the test suite
R. David Murray added the comment: I actually originally wanted to do just that (move the script helpers routine into the old support.py) but I was in the minority. test.support was turned into a package exactly so that script_helpers could become a sub-namespace. As I remember, it was Nick Coghlan who championed the sub-namespace position :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9517 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19907] gettext - Non ascii chars in header
Michael McFadden added the comment: This might be fixed by issue17156, which would explain why I can't recreate it. https://github.com/python/cpython/commit/f4273cfd16fa502f0eb8a0a8fd1c537ec63e47db -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19907 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22848] Subparser help does not respect SUPPRESS argument
Matt Long added the comment: Here's a patch for the proposal in my previous comment. As Barry mentioned, it wasn't as straightforward as I had hoped due to parts of the usage text being generated by the state of both self._name_parser_map and self._choices_actions. -- Added file: http://bugs.python.org/file39040/issue22484.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22848 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9517] Make test.script_helper more comprehensive, and use it in the test suite
Christie added the comment: I would recommend still moving script_helper into test.support , and adding a list of symbols from script_helper.py into __init__ Sounds like a great plan to me @flipmcf! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9517 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22848] Subparser help does not respect SUPPRESS argument
R. David Murray added the comment: This patch looks good to me, but I did not go through the argparse logic fully. Paul, can you review this and make sure itliteral_eval makes sense? There is a small concern about user code that provides a Mapping for choices having an attribute collision on _is_help_suppressed, but I think it is probably small enough we can ignore it. Or consider it an undocumented feature. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22848 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19907] gettext - Non ascii chars in header
Michael McFadden added the comment: issue18128 is not related methinks. This ticket: POT-Creation-Date issue18128: PO-Revision-Date -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19907 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23949] Number of elements display in error message is wrong while unpacking in traceback
Arnon Yaari added the comment: I fixed the tests (that's important!) and changed the latter message to specify it is referring to the starred target (the term starred target appears in the docs in simple_stmts.rst). Looks like the number in that message was wrong before! The test looked like this: a, *b, c, d, e = 0, 1, 2 ValueError: need more than 3 values to unpack Need more than 3? Not exactly. The new message looks like this: a, *b, c, d, e = 0, 1, 2 ValueError: not enough values to unpack into starred target (expected at least 4, got 3) -- Added file: http://bugs.python.org/file39041/issue23949-1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13940] imaplib: Mailbox names are not quoted
Maciej Szulik added the comment: Joe is correct, according to the spec the names containing special chars (atom-specials) require names to be quoted (https://tools.ietf.org/html/rfc3501#section-5.1): 1)Any character which is one of the atom-specials (see the Formal Syntax) will require that the mailbox name be represented as a quoted string or literal. I'll be working on a patch for that. -- nosy: +maciej.szulik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13940 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4254] _cursesmodule.c callable update_lines_cols()
Arnon Yaari added the comment: I'm adding patch without the update to Misc/NEWS. I'm not sure why, but the curses doc refers to LINES and COLS as environment variables. In the doc change I referred to them as just variables and used the notation that works for linking to them, using :envvar: -- Added file: http://bugs.python.org/file39044/issue4254-1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4254 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17156] Tools/i18n/pygettext.py doesn't parse unicode string.
Michael McFadden added the comment: Also fixes 19907? -- nosy: +flipmcf ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17156 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23949] Number of elements display in error message is wrong while unpacking in traceback
Changes by Arnon Yaari wiggi...@gmail.com: Added file: http://bugs.python.org/file39043/issue23949-3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21642] _ if 1else _ does not compile
R. David Murray added the comment: My impression is that it was fixed the way it was because it makes the internal tokenizer match the what the tokenize module does. See also issue 3353. As for changing it in a point release, it turns something that was an error into something that isn't, so it was unlikely to break existing working code. Going the other way in the tokenize module *would* have been a backward compatibility issue. If we wanted to change this, it would require a deprecation process, and it hardly seems worth it. I hear you about other tokenizers, though, and that is indeed unfortunate. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21642 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22980] C extension naming doesn't take bitness into account
Nick Coghlan added the comment: Matthias's latest patch looks good to me - I'm filing a separate issue about the fact that the native and cross-platform build info isn't really exposed properly at the Python level, and is confusing in various ways. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22980 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23966] More clearly expose/explain native and cross-build target information
New submission from Nick Coghlan: Discussion of issue 22980 made it clear to me that part of the problem with the cross-build support is that the difference between the build time information exposed in sysconfig and the live system information exposed in the platform module isn't clear. Debian's multiarch triplets (https://wiki.debian.org/Multiarch/Tuples) describe this information well, but it currently isn't readily exposed to Python code. sysconfig.get_config_var(MULTIARCH) only works on Debian derivatives, and even issue 22980 only exposes the information in sysconfig.get_config_var(SOABI) on a subset of platforms. It would be good to extend the triples to cover Windows, and also to expose the *current* system triple at runtime in the platform module (including appropriate normalisation) -- messages: 241129 nosy: barry, bkabrda, doko, ncoghlan, rkuska priority: normal severity: normal status: open title: More clearly expose/explain native and cross-build target information type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23966 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23948] Deprecate os.kill() on Windows
John Ehresman added the comment: GenerateConsoleCtrlEvent has different limitations for CTRL_BREAK_EVENT and CTRL_C_EVENT according to MSDN; I was referring to the CTRL_C_EVENT limitations. Which python level signal handler will CTRL_BREAK_EVENT trigger? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23948 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23948] Deprecate os.kill() on Windows
eryksun added the comment: it only works if the the target process id is 0 and then it generates the signal in all processes that share the console. You can target a process group, which is a subset of the console's attached processes. That's why the console host, conhost.exe, routes dispatching the event through the session CSRSS.EXE, which handles bookkeeping of Windows processes and threads, including groups. CSRSS creates a thread in each target, which starts at kernel32!CtrlRoutine. If a process is being debugged this routine raises a DBG_CONTROL_C or DBG_CONTROL_BREAK exception. Next it calls the registered handlers. The default handler, if called, exits the process with the exit code set to STATUS_CONTROL_C_EXIT (0xC13A): 0:000 u kernel32!DefaultHandler l3 kernel32!DefaultHandler: `76f31290 4883ec28sub rsp,28h `76f31294 b93a0100c0 mov ecx,0C13Ah `76f31299 ff15e1bb0500callqword ptr [kernel32! _imp_RtlExitUserProcess (`76f8ce80)] Example: import os import sys import signal import subprocess import threading STATUS_CONTROL_C_EXIT = 0xC13A p = subprocess.Popen([sys.executable, '-i'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, creationflags=subprocess.CREATE_NEW_PROCESS_GROUP) p.stderr.read(1) # poor man's WaitForInputIdle os.kill(p.pid, signal.CTRL_BREAK_EVENT) watchdog = threading.Timer(5, p.terminate) watchdog.start() exitcode = p.wait() watchdog.cancel() if exitcode 0: exitcode += 2 ** 32 assert exitcode == STATUS_CONTROL_C_EXIT -- nosy: +eryksun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23948 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23949] Number of elements display in error message is wrong while unpacking in traceback
Arnon Yaari added the comment: Sorry, I got confused (which proves the point of the ticket :)) * the need more than 3 values error message wasn't wrong, just confusing. * Including into starred target in the message was incorrect, I removed it. * The message with expected at least ... (when there is a star target) didn't show if there weren't enough values to fill the arguments before the star argument. I fixed this now too and added a test. -- Added file: http://bugs.python.org/file39046/issue23949-4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7159] Urllib2 authentication memory.
Akshit Khurana added the comment: Adding a patch for Python 3+ Some notes: * Adding a new password manager to handle this case * The new handler added in issue 19494 had couple of issues * test passes even if we use the old handler in added test * uses `request.host` instead of `request.full_url` as key for password * The new handler did assume realm = None before and still does. I'm using the same logic for adding keys for adding authenticated urls/realm as for login credentials in basic auth handler. -- keywords: +patch Added file: http://bugs.python.org/file39045/auth.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7159 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22980] C extension naming doesn't take bitness into account
Roundup Robot added the comment: New changeset 11c4f3f936e7 by doko in branch 'default': - Issue #22980: Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include https://hg.python.org/cpython/rev/11c4f3f936e7 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22980 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23967] Make inspect.signature expression evaluation more powerful
New submission from Larry Hastings: Peter's working on converting socket to use Argument Clinic. He had a default that really should look like this: min(SOME_SOCKET_MODULE_CONSTANT, 128) min wasn't something we'd needed before. I thought about it and realized we could do a much better job of simulating the evaluation context of a shared module. Initially I thought, all I needed was to bolster the environment we used for eval() to add the builtins. (Which I've done.) But this wasn't sufficient because we deliberately used ast.literal_eval(), which doesn't support function calls by design for superior security. Or subscripting, or attribute access. We already worked around those I think. But how concerned are we about security? What is the attack vector here? If the user is able to construct an object that has a villainous __text_signature__ on it... surely they could already do as they like? So here's a first draft at modifying the __text_signature__ evaluation environment so it can handle much more sophisticated expressions. It can use anything from builtins, or anything in sys.modules, or anything in the current module; it can call functions, and subscript, and access attributes, and everything. To make this work I had to write an ast printer that produces evaluatable Python code. Note that it's not complete, I know it's not complete, it's missing loads of operators. Assume that if this is a good idea I will add all the missing operators. Nick was worried that *in the future* we might expose a turn this string into a signature function. That might make an easier attack vector. So he asked that the trusted= keyword flag be added, and the full-on eval only happen if the string is trusted. -- assignee: larry components: Library (Lib) files: larry.improved.signature.expressions.1.txt messages: 241140 nosy: larry, ncoghlan, pdmccormick, serhiy.storchaka, yselivanov, zach.ware priority: normal severity: normal stage: patch review status: open title: Make inspect.signature expression evaluation more powerful type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file39047/larry.improved.signature.expressions.1.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23967 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22980] C extension naming doesn't take bitness into account
Roundup Robot added the comment: New changeset df6c73f0e375 by doko in branch 'default': - #22980: fix typo in Lib/test/test_sysconfig.py triplet test https://hg.python.org/cpython/rev/df6c73f0e375 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22980 ___ ___ 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
R. David Murray added the comment: Made some review comments. There also needs to be a documentation change since the docs currently say it is set for insert only. There should be a .. versionchanged directive. This may be small enough not to pass the what's new threshold, but I'd rather add a note and let the person who does the final edit on that document decide, so please add that as well. (You will note that I've changed this to enhancement...it is documented as *only* working for INSERT, so I believe it must be treated as an enhancement to make it work for REPLACE.) -- type: behavior - enhancement versions: -Python 2.7, Python 3.4 ___ 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
[issue22411] Embedding Python on Windows
Steve Dower added the comment: The 3.5 installer contains the option to install the debug binaries, so that side is solved and I'm closing this as fixed. In the video at https://www.youtube.com/watch?v=D9RlT06a1EI I demonstrate how you can build a debug EXE against a release python34.dll without issues (though you lose a bit of debugging support) - in short, use the compiler option to link against the release runtime. -- assignee: - steve.dower resolution: - fixed status: open - closed versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22411 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23948] Deprecate os.kill() on Windows
eryksun added the comment: Which python level signal handler will CTRL_BREAK_EVENT trigger? The CRT maps it to a non-standard signal, SIGBREAK (21). It's defined in the signal module. GenerateConsoleCtrlEvent has different limitations for CTRL_BREAK_EVENT and CTRL_C_EVENT according to MSDN; I was referring to the CTRL_C_EVENT limitations. When creating a process group, the ConsoleFlags value in the process parameters is set to ignore CTRL_C_EVENT. You'll still get a DBG_CONTROL_C exception if a debugger is attached, but otherwise kernel32!CtrlRoutine ignores Ctrl+C. As you say, the docs state that [CTRL_C_EVENT] cannot be generated for process groups. But it *does* work if you remove the ignore flag. This flag gets set/unset by assigning/removing a NULL handler. Here's a revised example to enable Ctrl+C in the child, disable Python's INT handler, and then generate CTRL_C_EVENT to kill the child and verify that the exit code is STATUS_CONTROL_C_EXIT. import os import sys import signal import subprocess import threading STATUS_CONTROL_C_EXIT = 0xC13A p = subprocess.Popen([sys.executable, '-i', '-c', 'import ctypes, signal;' 'kernel32 = ctypes.windll.kernel32;' 'kernel32.SetConsoleCtrlHandler(None, 0);' 'signal.signal(signal.SIGINT, signal.SIG_DFL)'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, creationflags=subprocess.CREATE_NEW_PROCESS_GROUP) p.stderr.read(1) # poor man's WaitForInputIdle os.kill(p.pid, signal.CTRL_C_EVENT) watchdog = threading.Timer(5, p.terminate) watchdog.start() exitcode = p.wait() watchdog.cancel() if exitcode 0: exitcode += 2 ** 32 assert exitcode == STATUS_CONTROL_C_EXIT -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23948 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1284316] Win32: Security problem with default installation directory
Steve Dower added the comment: Closing this as fixed, as the discussions I've had at PyCon have largely suggested that the fix I've implemented is good. In short: * the default (obvious) install will be per-user only into %LocalAppData%\Programs\Python\Python35 - fully modifiable by whoever installed it but inaccessible by other users * the default location for an all-users install will be %ProgramFiles%\Python 3.5 (with redirection for 32-bit processes) - fully modifiable by administrators and usable by all users Obviously users can customize the install location to reduce security, but we can't prevent that. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1284316 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23948] Deprecate os.kill() on Windows
John Ehresman added the comment: Interesting -- I didn't know about removing the ignore flag in the child process. The question is whether this is close enough to the kill w/ SIGINT behavior on unix to use the same name. I think that there are enough differences to warrant a Windows specific function that calls GenerateConsoleCtrlEvent. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23948 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22980] C extension naming doesn't take bitness into account
Matthias Klose added the comment: now fixed on the trunk. opened a new issue #23969 for setting the SOABI on MacOSX. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22980 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18128] pygettext: non-standard timestamp format in POT-Creation-Date
Michael McFadden added the comment: Post-review - new patch -- Added file: http://bugs.python.org/file39050/issue18128.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18128 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18162] Add index attribute to IndexError
Ofer Schwarz added the comment: I'm working on this now (patch hopefully coming soon), and I've hit an interesting issue: PySequence methods take care of negative indexes by adding +len before calling the subclass method (s.t. -1 becomes len-1 etc.). This means that if the subclass raises an exception with the index, it might be the wrong index. This case only happens when index -len, so when I talked it out with Larry he suggested just passing the original index to the subclass in this case. So for index = 0 or index -len the subclass will receive the actual index, and for -len = index 0 the subclass will get index+len. That's a change in behavior, but I actually think it's a good one. The negative-index use case in PySequence is exactly intended for this [-len, 0) use case, and if some subclass wants to do something weird with negative indexes it'd probably want the actual argument anyway. I'm writing my patch with this in it, but it might be worth discussing here if someone disagrees. -- nosy: +blackfawn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18162 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15625] Support u and w codes in memoryview
Steve Dower added the comment: Closing sounds good to me -- nosy: +steve.dower resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15625 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23217] help() function incorrectly captures comment preceding a nested function
Raúl Cumplido added the comment: I am not sure what the expected behavior is. Based on the code on pydoc.py we can find: def getdoc(object): Get the doc string or comments for an object. result = inspect.getdoc(object) or inspect.getcomments(object) So if the doc string is not found it searches for the lines of comments immediately preceding the object's source code. This is why the example from Anupama returns the preceding comment on both python2.7 and python3.5 (not only on python2.7). @rhettinger this seems like a deliberate decision to add as help documentation the preceding comment if the docstring is not found. What were you expecting? Should this be changed? -- nosy: +raulcd ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23217 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19933] Round default argument for ndigits
Roundup Robot added the comment: New changeset e3cc75b1000b by Steve Dower in branch 'default': Issue 19933: Provide default argument for ndigits in round. Patch by Vajrasky Kok. https://hg.python.org/cpython/rev/e3cc75b1000b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19933 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19933] Round default argument for ndigits
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - fixed status: open - closed versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19933 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18162] Add index attribute to IndexError
Ram Rachum added the comment: Looking forward to your patch Ofer! Thanks for working on this! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18162 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23496] Steps for Android Native Build of Python 3.4.2
Ryan Gonzalez added the comment: Can you try to see exactly *which* line of the function is segfaulting? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4254] _cursesmodule.c callable update_lines_cols()
Arnon Yaari added the comment: Adding a test that only calls the function. -- Added file: http://bugs.python.org/file39048/issue4254-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4254 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)
New submission from Matthias Klose: Currently there is only one platform directory for all linux architectures, there are two reasons to have a separate directory for each architecture: - the contents of the files in this directory differ (most prominent case are the RTLD_* constants on various architectures). - The _sysconfigdata.py module is installed in the platdir. A cross build of the extensions in the standard library is done by running the python interpreter for the build machine with the platdir for the host machine. This currently works for cross builds targeting a different os, but not cross building from one linux architecture to another. This would then remove Lib/plat-linux and introduce some Lib/plat-$(PLATFORM_TRIPLET) directories. -- components: Installation files: platdir.diff keywords: patch messages: 241143 nosy: doko, ncoghlan priority: normal severity: normal status: open title: rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) versions: Python 3.5 Added file: http://bugs.python.org/file39049/platdir.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23968 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23883] __all__ lists are incomplete
Joel Taddei added the comment: I took care of the tarfile module. Added the following according to the first message: tarfile.CompressionError tarfile.HeaderError tarfile.ReadError tarfile.open The following were included in __all__ that were not explicitly mentioned in the first message but were denoted as an exported function, exported class, or an exported error. tarfile.main tarfile.TarIter tarfile.StreamError tarfile.ExtractError tarfile.SubsequentHeaderError tarfile.InvalidHeaderError tarfile.EmptyHeaderError tarfile.EOFHeaderError tarfile.TruncatedHeaderError This is my first patch so feedback is highly appreciated. -- keywords: +patch nosy: +taddeimania Added file: http://bugs.python.org/file39051/Issue23883_tarfile_all.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23883 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5438] test_bigmem.test_from_2G_generator uses more memory than expected
Joe Jevnik added the comment: I can look into rewriting the framework to use multiprocessing; however, should we split this into a separate issue or block this one until that work is done. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15625] Support u and w codes in memoryview
Arnon Yaari added the comment: The documentation already specifies that 'u' is deprecated and doesn't mention the 'w' code. I think we can close this issue. -- nosy: +wiggin15 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15625 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23969] please set a SOABI for MacOSX
New submission from Matthias Klose: split out from http://bugs.python.org/issue22980#msg232065 please consider setting the SOABI for MacOSX. Afaics MacOSX is now the only major platform not setting these, at least including the SOABI. The idea is that it would be possible to ship fat wheels, containing extensions for every OS. Not sure what the PLATFORM_TRIPLET would be, maybe just something like macosx, or darwin, if the MacOSX extension itself is a fat build. -- messages: 241146 nosy: doko, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: please set a SOABI for MacOSX ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23969 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23969] please set a SOABI for MacOSX
Changes by Ned Deily n...@acm.org: -- assignee: - ned.deily components: +Build, Macintosh stage: - needs patch versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23969 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7159] Urllib2 authentication memory.
R. David Murray added the comment: Added some review comments. I think the urllib documentation does not really explain how to *use* these classes, and it should, but that is a separate issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7159 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22278] urljoin duplicate slashes
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22278 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23971] dict(list) and dict.fromkeys() doesn't account for 2/3 fill ratio
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +rhettinger type: behavior - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23971 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23971] dict(list) and dict.fromkeys() doesn't account for 2/3 fill ratio
New submission from Larry Hastings: Matt Mackall brought this over to me today. If list l has one million pairs and you do dict(l) it creates the dict, then resizes it to a million elements, then starts adding name/value pairs. But since it's sized to a million elements, it gets beyond its fill ratio comfort level of 666k and resizes. And when you're up to a million elements, the resize is quite slow. It should have internally resized the dict correctly from the beginning such that no resize was necessary. The same is true for dict.fromkeys--passed in a list of 1m elements, it uses an initial size of 1m, not 1.5m. Attached is a sample patch to change the behavior of both these operations so no resizes are needed during the insertions. I haven't checked that it actually fixes the behavior, I just made the change and ran the regression test. (I'm oversubscribed here at the sprints, and am kind of rushing this diff out just to get the conversation rolling.) Benjamin: what do you think? Would it be appropriate to make a change like this in 2.7? Python 3 (or at least 3.5 trunk) is fancy here. It starts with the minimum size of a dict, then iterates until the new size is 1.5*the number of elements. This means the dicts it creates are of the same size as they would be if we'd started with a minsize dict and inserted one element at a time. This might help minimize wear and tear on the small block allocator for smaller dicts. BTW, the internal function _PyDict_NewPresize should really have taken the fill ratio into account too. But, even though it's an internal-only function, it's probably too late to change its behavior. -- components: Interpreter Core messages: 241179 nosy: benjamin.peterson, larry, marmoute, mpm priority: normal severity: normal stage: patch review status: open title: dict(list) and dict.fromkeys() doesn't account for 2/3 fill ratio type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23971 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22980] C extension naming doesn't take bitness into account
Roundup Robot added the comment: New changeset 948745d0d9cf by doko in branch 'default': #22980: fix triplet configure test for powerpc-linux-gnu https://hg.python.org/cpython/rev/948745d0d9cf -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22980 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22137] Test imaplib API on all methods specified in RFC 3501
Maciej Szulik added the comment: Milan one more thing to change in your patch, in all your TCs you're modifying client state, I mean this part: # lets cheat a bit here: client.state = 'SELECTED' It's OK to do that on the mocked server, but this is not acceptable doing on the tested library. It's better to call client.login() to change the state to 'AUTH' properly and only after that, call the actual method under test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22137 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4254] _cursesmodule.c callable update_lines_cols()
Steve Dower added the comment: Arnon has signed the CLA at PyCon, it just hasn't been processed yet. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4254 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4254] _cursesmodule.c callable update_lines_cols()
Roundup Robot added the comment: New changeset 132b5376bf34 by Steve Dower in branch 'default': Issue #4254: Adds _curses.update_lines_cols() Patch by Arnon Yaari https://hg.python.org/cpython/rev/132b5376bf34 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4254 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2292] Missing *-unpacking generalizations
Changes by Neil Girdhar mistersh...@gmail.com: Added file: http://bugs.python.org/file39059/starunpack41.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23883] __all__ lists are incomplete
Martin Panter added the comment: Regarding tarfile: Two of the extra errors are documented, so I agree they should be added: * tarfile.StreamError * tarfile.ExtractError However I’m not so sure about main(), TarIter, and the HeaderError subclasses. They aren’t mentioned in the documentation. At least main() and TarIter are just implementation details I think. There are other documented items that should be added in my opinion. These would not be picked up by the proposed test, although they would be picked up by making the test like in revision 10b0a8076be8. * ENCODING * USTAR/GNU/PAX/DEFAULT_FORMAT -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23883 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23703] urljoin() with no directory segments duplicates filename
Roundup Robot added the comment: New changeset fc0e79387a3a by Berker Peksag in branch 'default': Issue #23703: Fix a regression in urljoin() introduced in 901e4e52b20a. https://hg.python.org/cpython/rev/fc0e79387a3a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23703 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18162] Add index attribute to IndexError
Changes by Ofer Schwarz os.uran...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file39055/indexerror.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18162 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18162] Add index attribute to IndexError
Changes by Ofer Schwarz os.uran...@gmail.com: Added file: http://bugs.python.org/file39056/indexerror.tests ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18162 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17445] Handle bytes comparisons in difflib.Differ
Terry J. Reedy added the comment: Now the review button appears for the big patch. Lets see if another submission makes it appear for the smaller version. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17445] Handle bytes comparisons in difflib.Differ
Augie Fackler added the comment: Changes to 3.4 aren't going to help Mercurial. Given that bytes formatting is new in 3.5, I won't be attempting a port that supports a version of Python 3 any older than 3.5. At this point, just a difflib.diff_bytes method in 3.5 would be sufficient to satisfy my needs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23970] Update distutils.msvccompiler for VC14
New submission from Steve Dower: Because of the compiler change, we need to rework the detection of MSVC for Python 3.5. I took the opportunity to clean up the entire module and remove msvc9compiler, and updated the tests. -- assignee: steve.dower components: Windows files: msvccompiler_1.patch keywords: patch messages: 241173 nosy: steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: patch review status: open title: Update distutils.msvccompiler for VC14 type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file39058/msvccompiler_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23970 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17445] Handle bytes comparisons in difflib.Differ
Terry J. Reedy added the comment: I tried the [Create Patch] button. Two problems: the result is about 90% concerned with other issues; it is not reviewable on Rietveld. I will unlink it and upload a cut-down version. Wtiht the test changes suggested by Berker, I agree that it is time to apply this, with whatever decision we make about 3.4. I am sympathetic to the notion that there is a regression from 2.x. There is precedent for adding a feature to fix a bug (in difflib, a new parameter for SequenceMatcher, for 2.7 3 (or thereabouts)). However, doing so was contentious (discussed on pydev) and not meant to be routine. The bug being fixed had been reported (as I remember) on four separate issues by four people and seconded by other people, so we really wanted the fix in 2.7. Would the following compromise work for Mercurial? The patch already adds a new private function _check_types. For 3.4, also add _diff_bytes as a private function. Merge both into 3.5. Create a 3.5 patch that makes _diff_bytes public by renaming it to diff_bytes, adds the new tests, and documents the new feature. The What's New entry could mention that the function was added privately in 3.4.4. -- stage: patch review - commit review Added file: http://bugs.python.org/file39057/13161c1d9c5-difflibf.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23703] urljoin() with no directory segments duplicates filename
Berker Peksag added the comment: Thanks! -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23703 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18128] pygettext: non-standard timestamp format in POT-Creation-Date
Barry A. Warsaw added the comment: @rdm: I'm pretty sure you're right about nobody noticing. :) Make it so! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18128 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17445] Handle bytes comparisons in difflib.Differ
Changes by Terry J. Reedy tjre...@udel.edu: Added file: http://bugs.python.org/file39053/13161c1d9c5f.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22189] collections.UserString missing some str methods
Joe Jevnik added the comment: I have added a patch to add these to UserString. I also wrote a test case that would check the UserString, UserList, and UserDict's methods to make sure that new methods to str, list, or dict (or the removal of one of those methods from the User* version) will cause a test failure. -- keywords: +patch nosy: +ll Added file: http://bugs.python.org/file39054/userobjectmethods.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22189 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18162] Add index attribute to IndexError
Changes by Ofer Schwarz os.uran...@gmail.com: Added file: http://bugs.python.org/file39060/indexerror_all.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18162 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7159] Urllib2 authentication memory.
Akshit Khurana added the comment: Updated patch with review changes -- Added file: http://bugs.python.org/file39062/auth10.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7159 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6818] remove/delete method for zipfile/tarfile objects
Dave Sawyer added the comment: The zipfile way to delete or rename would be to just change the index. It really doesn't want to be re-written as it is designed to span disks. Many old versions of files can be scattered within the zip. In addition self-extracting zip files will have executable code in the front of the zip. To make a zip smaller, it's desirable to have a filter function. There were points brought up about zip with overlapping data blocks (and you could envision saving space by having many identical files share the same compressed block... but this is not legal zip. A file info header block must precede EACH individual file data block. This is brought home by there being only a length field in the info header. -- Added file: http://bugs.python.org/file39061/mywork.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6818 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23969] please set a SOABI for MacOSX
Ned Deily added the comment: what about iOS? isn't __APPLE__ there defined too? It is but we currently don't have any iOS-specific checks snywhere in CPython. I have an additional patch to handle iOS here but I didn't want to break builds until adding full support for iOS as part of Issue23670. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23969 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23670] Modifications to support iOS as a cross-compilation target
Matthias Klose added the comment: not reviewing everything, but - libffi_ios* will be bitrot. I understand that you'll need an unreleased version, however I would much prefer that any additional patches are added in the repo, and maybe then patching libffi from the iOS build system. This way the code will see updates when libffi is updated. - I don't like the copies of Setup.*. Again this will bitrot. Please see http://bazaar.launchpad.net/~doko/python/pkg3.4-debian/view/head:/rules search for define __post_configure Basically this patches Setup.dist to build a bunch of extensions statically. Can you use something similar, or improve that? - the change to setup.py might deserve a comment. - are constants in plat-ios really the same for every architecture? - how is the gnu triplet / quadruplet called for iOS? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23670 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com