[issue24000] More fixes for the Clinic mapping of converters to format units
Roundup Robot added the comment: New changeset 36d5e04b6cfa by Larry Hastings in branch 'default': Issue #24000: Improved Argument Clinic's mapping of converters to legacy https://hg.python.org/cpython/rev/36d5e04b6cfa -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24000 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24000] More fixes for the Clinic mapping of converters to format units
Larry Hastings added the comment: I think this is a definite improvement, so I've checked it in so I can move on. If you guys still want to talk about it, we can still change it before we hit beta. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24000 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24098] Multiple use after frees in obj2ast_* methods
paul added the comment: ping -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1322] Deprecate platform.dist() and platform.linux_distribution() functions
Marc-Andre Lemburg added the comment: Thanks, Berker, your patch looks fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1322 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22906] PEP 479: Change StopIteration handling inside generators
Nick Coghlan added the comment: A couple of minor comments: * self.fail with an appropriate error message is a clearer way to indicate an incorrect logic path has been hit in a test case * the details of the exception chaining don't quite look right, as I believe raise X from Y sets both the cause and the context, with the suppress_context attribute set to turn off the display of the latter. I suggest checking that in Python code to confirm ny recollection, and then adjusting the test and implementation if necessary to match the Python level equivalent -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23042] ctypes module doesn't build on FreeBSD, RHEL (x86) - Undefined symbol ffi_call_win32
Marc-Andre Lemburg added the comment: Here's a patch which I have tested on Linux, FreeBSD and Mac OS X. It solves the problem with compiling in Windows calls on non-Windows platforms and resynchronizes the ffi_raw_call() function with the ffi_call() implementation. Both functions had the same issue and the only difference between the two is the use of ffi_prep_args_raw instead of ffi_prep_args. As with davin's patch, this would need to be tested on Windows. -- Added file: http://bugs.python.org/file39321/ffi.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23042 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7267] format method: c presentation type broken in 2.7
Serhiy Storchaka added the comment: May be just emit a warning in -3 mode? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7267 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24146] ast.literal_eval doesn't support the Python ternary operator
New submission from Larry Hastings: ast.literal_eval() supports all Python operators, yes? No. It doesn't support if/else, Python's ternary operator. Is there a reason it does not? I think it probably should. -- messages: 242760 nosy: benjamin.peterson, georg.brandl, larry priority: normal severity: normal stage: needs patch status: open title: ast.literal_eval doesn't support the Python ternary operator type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24146 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16392] import crashes on circular imports in ext modules
Brett Cannon added the comment: https://www.python.org/dev/peps/pep-0489/ is trying to come up with a redesign of extension module loading and no one has submitted a patch for the documentation (although Stefan has inlined proposed wording in a comment). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16392 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C
Benjamin Peterson added the comment: I don't mind if you fix it in 2.7, too. (Sorry, I get a lot of bug related emails...) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21520] Erroneous zipfile test failure if the string 'bad' appears in pwd
Larry Hastings added the comment: Checked in, with the filter function on a separate line, to 3.4. Also merged into 3.5. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21520 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24146] ast.literal_eval doesn't support the Python ternary operator
R. David Murray added the comment: Right, this isn't a bug, it is that literal_eval is intended only to support *literals*, not expressions. See also issue 22525. -- nosy: +r.david.murray resolution: - not a bug stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24146 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C
Changes by Larry Hastings la...@hastings.org: -- assignee: ghaering - larry resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C
Serhiy Storchaka added the comment: Is 2.7 affected? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22906] PEP 479: Change StopIteration handling inside generators
Yury Selivanov added the comment: Nick, Berker, Please see the updated patch. -- Added file: http://bugs.python.org/file39323/pep0479.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21520] Erroneous zipfile test failure if the string 'bad' appears in pwd
Roundup Robot added the comment: New changeset bff966aed6a3 by Larry Hastings in branch '3.4': Issue #21520: test_zipfile no longer fails if the word 'bad' appears https://hg.python.org/cpython/rev/bff966aed6a3 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21520 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C
Larry Hastings added the comment: I'm gonna fix this now. (I'm cleaning up some old issues I filed on the bug tracker this morning.) For 3.4, I'm just removing the PyObject *kwargs for those three functions that don't actually accept keyword arguments (METH_VARARGS) and aren't passed that parameter. That's a bug plain and simple, it's relying on undefined behavior, and it's better that we fix it. For 3.5. I'm adding a call to _PyArg_NoKeywords() to pysqlite_connection_call. Previously it simply ignored any/all keyword arguments; now it will complain if it is passed any. We don't need a deprecation cycle for that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C
Roundup Robot added the comment: New changeset 4c860369b6c2 by Larry Hastings in branch '3.4': Issue #20274: Remove ignored and erroneous kwargs parameters from three https://hg.python.org/cpython/rev/4c860369b6c2 New changeset 3e9f4f3c7fa7 by Larry Hastings in branch 'default': Issue #20274: When calling a _sqlite.Connection, it now complains if passed https://hg.python.org/cpython/rev/3e9f4f3c7fa7 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16392] import crashes on circular imports in ext modules
R. David Murray added the comment: Yes, the resolution of this issue will be to add documentation. Someone should turn Stefan's comment into a patch. -- assignee: - docs@python components: +Documentation nosy: +docs@python, r.david.murray stage: - needs patch versions: +Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16392 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24146] ast.literal_eval doesn't support the Python ternary operator
Serhiy Storchaka added the comment: No it doesn't support all Python operators. ast.literal_eval('2*3') Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python3.4/ast.py, line 84, in literal_eval return _convert(node_or_string) File /usr/lib/python3.4/ast.py, line 83, in _convert raise ValueError('malformed node or string: ' + repr(node)) ValueError: malformed node or string: _ast.BinOp object at 0xb6f8446c And shouldn't. It supports + and - only because they are needed for support of complex literals. It is unintentional side effect, that ast.literal_eval() supports not only 2+3j, but 2+3 too. -- nosy: +mark.dickinson, serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24146 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C
Changes by Larry Hastings la...@hastings.org: -- versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C
Larry Hastings added the comment: Yes, all those bugs exist in 2.7. However, Benjamin hasn't responded to this bug, so I assume he doesn't care and I should leave 2.7 alone. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C
Serhiy Storchaka added the comment: I think the bug should be fixed in 2.7 (but not in 3.3 unless we get a crasher). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C
Larry Hastings added the comment: Benjamin: I assume you want the extraneous (and undefined behavior) kwargs parameters removed. Do you also want pysqlite_connection_call() to start calling _PyArg_NoKeywords()? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C
Benjamin Peterson added the comment: On Fri, May 8, 2015, at 12:08, Larry Hastings wrote: Larry Hastings added the comment: Benjamin: I assume you want the extraneous (and undefined behavior) kwargs parameters removed. Do you also want pysqlite_connection_call() to start calling _PyArg_NoKeywords()? Yes, please. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C
Roundup Robot added the comment: New changeset c91d135b0776 by Larry Hastings in branch '2.7': Issue #20274: When calling a _sqlite.Connection, it now complains if passed https://hg.python.org/cpython/rev/c91d135b0776 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C
Changes by Larry Hastings la...@hastings.org: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23888] Fixing fractional expiry time bug in cookiejar
Demian Brecht added the comment: LGTM, thanks for the patch! -- nosy: +r.david.murray stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23888 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24078] inspect.getsourcelines ignores context and returns wrong line #
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24078 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23857] Make default HTTPS certificate verification setting configurable
Marc-Andre Lemburg added the comment: Changing the title to reflect that the solution to how to configure Python is still up in the air. I also started a thread on python-dev to get some more feedback. -- title: Make default HTTPS certificate verification setting configurable via global ini file - Make default HTTPS certificate verification setting configurable ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23857 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24129] Incorrect (misleading) statement in the execution model documentation
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24129 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21800] Implement RFC 6855 (IMAP Support for UTF-8) in imaplib.
Maciej Szulik added the comment: David, I've changed according to your suggestion, appreciate review. -- Added file: http://bugs.python.org/file39324/issue21800.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21800 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax
Yury Selivanov added the comment: Another iteration: - support of new syntax in lib2to3 - collections.abc.Awaitable -- Added file: http://bugs.python.org/file39325/await_04.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24017 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23857] Make default HTTPS certificate verification setting configurable
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23857 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24145] Support |= for parameters in converters
Raymond Hettinger added the comment: To my eyes, the current set notation form more clearly expresses its intentions than the |= notation. Readability counts. I agree the |= is a startling syntax that looks weird enough to cause a mental hiccup when reading it. So, put me down for a -1. The mild benefit isn't worth it. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24145 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24145] Support |= for parameters in converters
Serhiy Storchaka added the comment: For now str(accept={str, NoneType}) is used only 14 times in 6 files in 5 modules. The z format unit is used also in still not converted modules _codecs (a lot of sites), _locale, mmap, _multiprocessing, and _socket. Current syntax doesn't look so ugly for me. I would wait until we converted more modules and implemented more converters that don't match existing format units. Alternative syntax can be str | NoneType (without the accept parameter at all). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24145 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24145] Support |= for parameters in converters
Nick Coghlan added the comment: Aye, it occurs to me now that introducing the implicit form trades a write time lookup (where you have to override the converter defaults explicitly), for a read time lookup (where you need to mentally add the defaults to understand the modified accept clause) As a result, I think explicit is better than implicit wins, at least for now. If we decide after we have more experience that the repetition of the defaults when overriding them really is a problem, then it's possible to revisit that decision in the 3.6 time frame. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24145 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22906] PEP 479: Change StopIteration handling inside generators
Nick Coghlan added the comment: Latest patch LGTM, although I believe the new chaining behaviour checks would be clearer with the 3 try/except blocks merged into a single block where all 3 behaviours are checked in the same except clause, and the else clause complains that StopIteration was suppressed. (I don't see a need to request a new review for that particular change, though) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23042] ctypes module doesn't build on FreeBSD, RHEL (x86) - Undefined symbol ffi_call_win32
Roundup Robot added the comment: New changeset a04b3de18c4c by Benjamin Peterson in branch '3.4': fix libffi compilation on FreeBSD (#23042) https://hg.python.org/cpython/rev/a04b3de18c4c New changeset 987b30a88653 by Benjamin Peterson in branch 'default': merge 3.4 (#23042) https://hg.python.org/cpython/rev/987b30a88653 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23042 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13044] pdb throws AttributeError at end of debugging session
Changes by Davin Potts pyt...@discontinuity.net: -- nosy: +davin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13044 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23042] ctypes module doesn't build on FreeBSD, RHEL (x86) - Undefined symbol ffi_call_win32
Changes by Benjamin Peterson benja...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23042 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23857] Make default HTTPS certificate verification setting configurable
Christian Heimes added the comment: Please let me join the party. :) Like Antoine and Donald I'm against an option to disable certificate validation. I truly believe it's the wrong approach for the problem. Users don't *want* to disable security checks either. They disable the check because a SSL verification error is disruptive and they want to get on with their lives. Because with Python they have no other easy option they take the quick and easy path. *Yoda's voice* If you end SSL verification now - if you choose the quick and easy path as others did - you will become an agent of evil. I like to suggest a better way. Let's handle cert checks like Firefox or OpenSSH. Both give you the option to trust an unknown certificate for a specific host name and remember this trust, too. Let's add a feature to do the same with Python. Yes, it would require more work, additional features and careful engineering. But I strongly believe it's the better approach. Rough design idea: $ python ssl trustcert https://192.168.42.1 This command retrieves the cert from 192.168.42.1:443 and stores the mapping of 192.168.42.1 to SPKI sha512 hash in a file/directory relative sys.prefix. When a ssl._create_stdlib_context() context gets a verification error, then it checks the file for the hostname and SPKI hash of the leaf certificate. This features requires access to SPKI as DER and a proper verify_cb callback function. Disclaimer: I have code for the first feature and a plan for the second. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23857 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23857] Make default HTTPS certificate verification setting configurable
Christian Heimes added the comment: PS: It's also super easy to trust self-signed certificates. All you have to do is to grab the cert and set SSL_CERT_FILE env var: $ openssl s_client -connect host:443 | openssl x509 /path/to/selfsigned.pem $ SSL_CERT_FILE=/path/to/selfsigned.pem python script.py -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23857 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23857] Make default HTTPS certificate verification setting configurable
Marc-Andre Lemburg added the comment: Those are nice ideas, but you are forgetting two important points: * browsers are typically only being used by single users, applications by potentially hundreds or thousands of users * how should the poor sys admin who's task it is to keep Python up to date know which SSL certs to add to the trust store ? E.g. assume your application fetches user comments for sentiment analysis from a few thousand sites, or gathers status updates from a few hundred routers and switches you have installed at your site, or even more difficult: an application which tries to map your IT world of a few thousand network nodes, scanning port 443 for useful information. For eGenix PyRun we have now implemented an env var PYRUN_HTTPSVERIFY which can be set to 0 to disable the checks and revert back to Python 2.7.8 standards, if necessary, on a per process basis. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23857 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24145] Support |= for parameters in converters
New submission from Larry Hastings: Some format units provided by PyArg_ParseTuple() are exactly the same as others, except that they also accept the value None. For example, s and z are exactly the same, except z accepts None and s does not. The same goes for s* and z*, or s# and z#. To tell an Argument Clinic converter which types of objects it should accept, one would pass in the accept named parameter. We now use this facility for the also accept None format units. z is the same as s, except that for z you add NoneType to the list of types passed in for accept. Like so: str1: str() # format unit 's' str2: str(accept={str, NoneType}) # format unit 'z' The trick here is, the default value for the 'accept' parameter for the str() converter is {str}. But you have to know that in order to add NoneType to it. It'd be nice if there were some way of saying take the existing default value for parameter X, and add value Y to it. Then for the accept parameter you could just add NoneType to it. You might say, yeah, but Python doesn't have anything like that. To which I say, Argument Clinic isn't Python. It leverages Python syntax (using ast.parse) but we need not be bound by what Python does. We could maybe add a little syntax or play with the semantics to add this functionality. We discussed this on c.l.p-d a little, and some folks took the opportunity to play a little syntax golf with the idea. (Everybody who participated in the thread writ large got Cc'd on this bug, congratulations, you're welcome!) Ultimately there was only one syntax I liked, which (no surprise) was one I suggested: str2: str(accept|={NoneType}) accept's default value is a set, and sets use | as the union operator. And Python actually has a |= statement, although it doesn't work in function calls like that. But that means readers unfamiliar with Argument Clinic should be able to quickly intuit what the syntax means. It also meant I could use the tokenize module to do a proper job of the implementation. So I ask you: do we want this? Advantages and disadvantages as I see them: + : Don't Repeat Yourself. + : You don't have to look up the default types to add NoneType to it/them. - : Startling syntax, makes Clinic a little weirder Take a look at the diffs and decide whether the new syntax is an improvement. (You can look at the implementation too, of course, if you're curious. But IMO the implementation is fine, and ready to go in if we want it.) -- assignee: larry components: Argument Clinic files: larry.clinic.or.equals.for.parameters.1.txt messages: 242756 nosy: barry, gregory.p.smith, larry, ncoghlan, serhiy.storchaka, taleinat, zach.ware priority: normal severity: normal stage: patch review status: open title: Support |= for parameters in converters type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file39322/larry.clinic.or.equals.for.parameters.1.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24145 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23920] Should Clinic have nullable or types=NoneType?
Larry Hastings added the comment: The final version of this has been implemented as part of 41fb7fd04b5d for issue #24001. However, I'll mention here for posterity's sakes: there's an additional discussion on #24145. (Everyone on the nosy list has already been invited to the party!) -- resolution: - fixed stage: test needed - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax
Stefan Behnel added the comment: We also need a Coroutine ABC. Both the GeneratorType and CO_COROUTINE checks are too restrictive. Also see issue 24018, which this one should in fact depend on. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24017 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24018] add a Generator ABC
Stefan Behnel added the comment: This is blocking issue 24017 (async/await syntax). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24018 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22906] PEP 479: Change StopIteration handling inside generators
Berker Peksag added the comment: In Lib/__future__.py: +generator_stop = _Feature((3, 5, 0, alpha, 1), alpha needs to be changed to beta. -- stage: test needed - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24018] add a Generator ABC
Guido van Rossum added the comment: Ask Yury if he'll commit it for you. It's ready. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24018 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24018] add a Generator ABC
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24018 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24018] add a Generator ABC
Roundup Robot added the comment: New changeset ba5d7041e2f5 by Raymond Hettinger in branch 'default': Issue #24018: Add a collections.Generator abstract base class. https://hg.python.org/cpython/rev/ba5d7041e2f5 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24018 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24018] add a Generator ABC
Stefan Behnel added the comment: Thanks! Minor grouch: it should say collections.*abc*.Generator in the NEWS entry. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24018 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24018] add a Generator ABC
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: lukasz.langa - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24018 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16392] import crashes on circular imports in ext modules
Omer Katz added the comment: Is this issue resolved in any way? Has there been a decision made on how to resolve it? What's the status here? -- nosy: +Omer.Katz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16392 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23857] Make default HTTPS certificate verification setting configurable
Nick Coghlan added the comment: Right, the key here is to think like a system administrator, not a developer. Most of those folks are downstream of redistributors (whether commercial ones or community Linux distributions) and relying on one of two things: * tools using the system cert store for certificate validation (so they can trust an internal CA automatically) * tools not verifying certificates properly The *right* answer on Linux is option one (which the system Python will be configured to use by default), but even with tools like DogTag available as open source, running your own internal CA properly is currently still a pain, especially once you start accounting for all the hardware devices out there with tragically bad certificate management. You can't just wave a magic wand and suddenly have all your physical gear catch up to the modern state of the art in SSL/TLS management as learned on the public internet - it's a staged upgrade project where the risks of insider threats and other perimeter compromises get traded off against the upgrade costs and infrastructure stability risks. This *is* work that needs to be done given the world we live in, but we also need to trust CIOs to appropriately manage the upgrade plans for their own intranets. It's not a coincidence that initiatives like Let's Encrypt are due to launch this year, nor that Red Hat's started hiring people like Christian to help integrate SSL certificate management directly into Linux identity authentication management - this stuff currently gets done badly because it's *too hard* to do it right. But in the meantime, admins upgrading Python *2.7* need a way to say let us decide what our highest priority infrastructure risks are, thank you very much. They don't need that for Python 3, as it doesn't have the same kind of large install base in environments where infrastructure modernisation represents a major ongoing investment. That means your SSL/TLS certificate management must be in good order can reasonably be a gating criterion for Python 3, but we need a better solution for redistributors and administrators when it comes to Python 2.7 upgrades. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23857 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22255] Multiprocessing freeze_support raises RuntimeError
Davin Potts added the comment: The issue may already be addressed for the OP and without further information we don't know what or if anything needs pursuing. If new information surfaces, a new issue should be opened. -- resolution: - out of date status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22255 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24147] doublequote are not well recognized with Dialect class
New submission from Mik: Python 2.7.3 (default, Mar 13 2014, 11:03:55) [GCC 4.7.2] on linux2 Type help, copyright, credits or license for more information. import csv class Mon(csv.Dialect): ... delimiter = ',' ... quotechar = '' ... quoting = 0 ... lineterminator = '\n' ... f = open('sans_headers.csv','r') reader = csv.DictReader(f, fieldnames=('code', 'nom', 'texte'), dialect=Mon) for l in reader: ... print l ... {'nom': 'line_1', 'code': '3', 'texte': 'one line\ntwo lines'} {'nom': 'line_2', 'code': '5', 'texte': 'one line\nand a quote iop;newline'} {'nom': None, 'code': 'I\'m not a cat', 'texte': None} f.seek(0) reader = csv.DictReader(f, fieldnames=('code', 'nom', 'texte'), delimiter=',', quotechar='', quoting=0, lineterminator='\n') for l in reader: ... print l ... {'nom': 'line_1', 'code': '3', 'texte': 'one line\ntwo lines'} {'nom': 'line_2', 'code': '5', 'texte': 'one line\nand a quote iop;newline\nI\'m not a cat'} If I use a subclass of csv.Dialect with the same attribute that I should use with keywords in calling csv.DictReader I don't get the same behaviour. -- components: Library (Lib) messages: 242787 nosy: MiK priority: normal severity: normal status: open title: doublequote are not well recognized with Dialect class type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24147 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21162] code in multiprocessing.pool freeze if inside some code from scikit-learn (and probably liblinear) executed on ubuntu 12.04 64 Bit
Davin Potts added the comment: It is no longer possible to reproduce the described issue. Changes to the relevant libraries since this issue was originally opened appear to have addressed the cause. Going ahead with closing this issue as there have been no further reports from the OP or others suggesting otherwise. -- resolution: - works for me status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21162 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23042] ctypes module doesn't build on FreeBSD, RHEL (x86) - Undefined symbol ffi_call_win32
Benjamin Peterson added the comment: Let's see what the buildbots think. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23042 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23042] ctypes module doesn't build on FreeBSD, RHEL (x86) - Undefined symbol ffi_call_win32
Roundup Robot added the comment: New changeset 96a7b401d5e4 by Benjamin Peterson in branch '2.7': fix libffi compilation on FreeBSD (#23042) https://hg.python.org/cpython/rev/96a7b401d5e4 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23042 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com