[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2017-09-08 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: This has been backported to 3.6. Is backport to 2.7 needed? If not we'll close the issue. -- stage: patch review -> backport needed ___ Python tracker

[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2017-09-08 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset a4baf1c543bca261c27e98ba296e42665f3cb872 by Mariatta (Miss Islington (bot)) in branch '3.6': [3.6] bpo-26669: Fix nan arg value error in pytime.c (GH-3085) (GH-3467)

[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2017-09-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: i'd rather make this work in oss-fuzz on cpython. can you point me to how oss-fuzz works and what it wants to do so i can better understand what it needs? it it has an expectation that the thing being fuzzed is a single binary with no data or directory

[issue20580] IDLE should support platform-specific default config defaults

2017-09-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: I miswrote. 'Alt' becomes 'Option'. The new keybindings to be added to Classic Mac and Classic OSX in PR2494 are the following. force-open-completions= expand-word= force-open-calltip= format-paragraph= flash-paren= run-module= check-module=

[issue29396] Re-opening /dev/tty breaks readline

2017-09-08 Thread Martin Panter
Martin Panter added the comment: I agree it would be good to document when the Readline library is invoked. Yes, the “readline‭” module is only designed to work with the original sys.stdin and sys.stdout. Python’s “open” function does not use FILE objects, but Python does use FILE objects

[issue31026] test_dbm fails when run directly

2017-09-08 Thread Brian Moyles
Brian Moyles added the comment: Actually, I was able to make things happy by removing libdb5.3-dev and solely relying on libgdbm3-dev (which suggests that Debian upstream may want to pare back their build requirements rather than disable the dbm test as they appear to do now). --

[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2017-09-08 Thread STINNER Victor
STINNER Victor added the comment: For Python 2.7, you have at least to fix these 2 functions: parse_time_double_args(), _PyTime_DoubleToTimet(). -- ___ Python tracker

[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2017-09-08 Thread Roundup Robot
Changes by Roundup Robot : -- keywords: +patch pull_requests: +3460 stage: needs patch -> patch review ___ Python tracker

[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2017-09-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 829dacce4fca60fc3c3367980e75e21dfcdbe6be by Victor Stinner (Han Lee) in branch 'master': bpo-26669: Fix nan arg value error in pytime.c (#3085) https://github.com/python/cpython/commit/829dacce4fca60fc3c3367980e75e21dfcdbe6be --

[issue31400] SSL module returns incorrect error codes on Windows

2017-09-08 Thread Steve Dower
Changes by Steve Dower : -- stage: patch review -> backport needed ___ Python tracker ___

[issue27815] Make SSL suppress_ragged_eofs default more secure

2017-09-08 Thread Alex Gaynor
Alex Gaynor added the comment: Mmmm, my understanding is that ignoring TCP-FIN/RST-without-TLS-closenotify is pretty common for a lot of different clients. We should probably survey the landscape, see what both browsers and non-browse clients (e.g. curl) do before making a decision.

[issue31366] Missing terminator option when using readline with socketserver.StreamRequestHandler

2017-09-08 Thread Martin Panter
Martin Panter added the comment: The socket.makefile(newline=...) parameter only affects text mode, but StreamRequestHandler’s “rfile” attribute works in byte mode. You could call makefile or TextIOWrapper yourself, but neither of these options support reading null-terminated “lines” or

[issue27815] Make SSL suppress_ragged_eofs default more secure

2017-09-08 Thread STINNER Victor
STINNER Victor added the comment: Martin: can you please create a pull request? It would be easier to review your change. -- ___ Python tracker ___

[issue30871] Add test.pythoninfo

2017-09-08 Thread STINNER Victor
STINNER Victor added the comment: pythoninfo is now available on all buildbots, including Python 2.7 VS9.0 buildbots: https://bugs.python.org/issue31260#msg301747 -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue31260] [2.7] Enhance PC/VS9.0/ project to produce python.bat, as PCbuild/

2017-09-08 Thread STINNER Victor
STINNER Victor added the comment: Zachary Ware added pythoninfo to buildbot VS9.0 builds: https://github.com/python/buildmaster-config/commit/c1d51a791d63c5e7d05c160ba25babd302fefe83 -- ___ Python tracker

[issue30822] Python implementation of datetime module is not being tested correctly.

2017-09-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3892799668dbf2b123a52780fd1d78f8880fdeb7 by Victor Stinner (Miss Islington (bot)) in branch '3.6': [3.6] bpo-30822: Deduplicate ZoneInfoTest classes in test_datetime. (GH-2534) (#3405)

[issue31260] [2.7] Enhance PC/VS9.0/ project to produce python.bat, as PCbuild/

2017-09-08 Thread Zachary Ware
Zachary Ware added the comment: I'd rather not go through the gymnastics to actually add python.bat creation to the VS9.0 config, so I'm closing this as rejected. If someone else finds it useful and wants to provide a patch, I'll review and merge it. -- resolution: -> rejected

[issue31361] Update feedparser.py to prevent theano compiling fail in python3

2017-09-08 Thread Wei-Shun Lo
Wei-Shun Lo added the comment: Correct some type : Few of them are failed, listed as following, after change the c compiler to be gcc-7, they can be fixed. (Twisted av cymem cytoolz dulwich gnureadline pycrypto pydsm pycurl regex reportlab setproctitle).

[issue31294] ZeroMQSocketListener and ZeroMQSocketHandler examples in the Logging Cookbook not working

2017-09-08 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your contribution. Your PR has been merged into 3.6 and master, which will become Python 3.7 eventually. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7

[issue31392] Upgrade installers to OpenSSL 1.1.0f

2017-09-08 Thread Christian Heimes
Changes by Christian Heimes : -- pull_requests: +3459 ___ Python tracker ___ ___

[issue31400] SSL module returns incorrect error codes on Windows

2017-09-08 Thread Christian Heimes
Changes by Christian Heimes : -- pull_requests: +3458 ___ Python tracker ___ ___

[issue31392] Upgrade installers to OpenSSL 1.1.0f

2017-09-08 Thread Christian Heimes
Christian Heimes added the comment: New changeset e6eb48c10dc389d1d70657593de6a6cb3087d3d1 by Christian Heimes (Steve Dower) in branch 'master': bpo-31400: Improve SSL error handling on Windows (#3463) https://github.com/python/cpython/commit/e6eb48c10dc389d1d70657593de6a6cb3087d3d1

[issue31400] SSL module returns incorrect error codes on Windows

2017-09-08 Thread Christian Heimes
Christian Heimes added the comment: New changeset e6eb48c10dc389d1d70657593de6a6cb3087d3d1 by Christian Heimes (Steve Dower) in branch 'master': bpo-31400: Improve SSL error handling on Windows (#3463) https://github.com/python/cpython/commit/e6eb48c10dc389d1d70657593de6a6cb3087d3d1

[issue29639] test suite intentionally avoids referring to localhost, destroying abstraction away from IPv6 vs IPv4

2017-09-08 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- keywords: +patch pull_requests: +3457 stage: -> patch review ___ Python tracker ___

[issue17960] Clarify the required behaviour of locals()

2017-09-08 Thread Nick Coghlan
Nick Coghlan added the comment: Posted as PEP 558: * https://github.com/python/peps/blob/master/pep-0558.rst * https://www.python.org/dev/peps/pep-0558/ -- ___ Python tracker

[issue28182] Expose OpenSSL verification results in SSLError

2017-09-08 Thread Christian Heimes
Christian Heimes added the comment: New changeset 0915360b9ef765bf84d4471a8a079f48c49bad68 by Christian Heimes in branch 'master': bpo-28182: restore backwards compatibility (#3464) https://github.com/python/cpython/commit/0915360b9ef765bf84d4471a8a079f48c49bad68 --

[issue31026] test_dbm fails when run directly

2017-09-08 Thread Brian Moyles
Brian Moyles added the comment: I ran into the same problem when running the test suite against a fresh Python 3.6.2 build on Ubuntu 16.04. It specifically appears to be a problem with ndbm and retrieving an empty byte string value: Python 3.6.2 (default, Sep 8 2017, 18:31:28) [GCC 5.4.0

[issue31361] Update feedparser.py to prevent theano compiling fail in python3

2017-09-08 Thread Wei-Shun Lo
Wei-Shun Lo added the comment: After patching, I've tested installed packages listed in the pip3.update. The default c compiler used is clang. Few of them are failed, listed as following, after change the c compiler to be gcc-7. (Twisted av cymem cytoolz dulwich gnureadline pycrypto pydsm

[issue29631] Error “importlib.h, importlib_external.h updated. You will need to rebuild pythoncore to see the changes.” is reported when build Python on Winodws

2017-09-08 Thread Zachary Ware
Zachary Ware added the comment: Hi Karen, You may have already noticed that this has been fixed since you reported it; sorry it's taken so long for anybody to reply! The issue was that importlib.h and importlib_external.h (generated files) were not checked in when their source files were

[issue28182] Expose OpenSSL verification results in SSLError

2017-09-08 Thread Christian Heimes
Changes by Christian Heimes : -- pull_requests: +3456 ___ Python tracker ___ ___

[issue22986] Improved handling of __class__ assignment

2017-09-08 Thread Eric Snow
Eric Snow added the comment: The gmane link isn't working for me. Here's the mailing list archive thread: https://mail.python.org/pipermail/python-dev/2014-November/thread.html#137262 https://mail.python.org/pipermail/python-dev/2014-December/thread.html#137370 --

[issue28791] update sqlite to latest version before beta 1

2017-09-08 Thread Zachary Ware
Zachary Ware added the comment: In an effort to not forget about this, I'm setting it to deferred blocker. -- priority: normal -> deferred blocker title: update sqlite to 3.19.2 -> update sqlite to latest version before beta 1 ___ Python tracker

[issue30860] Consolidate stateful C globals under a single struct.

2017-09-08 Thread Eric Snow
Eric Snow added the comment: FYI, the merged code introduced a bunch of new warnings on Windows. I'm looking into it. -- ___ Python tracker ___

[issue31400] SSL module returns incorrect error codes on Windows

2017-09-08 Thread Steve Dower
Changes by Steve Dower : -- keywords: +patch pull_requests: +3455 ___ Python tracker ___

[issue31401] Dynamic compilation that uses function in comprehension fails when compiled inside function

2017-09-08 Thread Jose Cambronero
New submission from Jose Cambronero: Execution fails with NameError when trying to dynamically compile a Python program that uses a function in a comprehension, and the code is compiled inside a function call, rather than as a global statement. Using the attached files to reproduce (in

[issue31400] SSL module returns incorrect error codes on Windows

2017-09-08 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +alex, christian.heimes, dstufft, janssen ___ Python tracker ___

[issue31400] SSL module returns incorrect error codes on Windows

2017-09-08 Thread Steve Dower
New submission from Steve Dower: Because we wait so long between errors occurring and being reported, information about the Windows error code (WSAGetLastError) has already been lost. We should capture all the info sooner. -- assignee: steve.dower components: SSL messages: 301733

[issue31399] Let OpenSSL verify hostname and IP address

2017-09-08 Thread Christian Heimes
Changes by Christian Heimes : -- keywords: +patch pull_requests: +3454 ___ Python tracker ___

[issue31399] Let OpenSSL verify hostname and IP address

2017-09-08 Thread Christian Heimes
New submission from Christian Heimes: Python should no longer attempt to verify hostname and ip addresses itself. OpenSSL 1.0.2 and newer is able to verify hostname and IP addresses itself. The new APIs are properly hooked into chain validation step. Hostname matching implements RFC 6125. CN

[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2017-09-08 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: So here's an interesting issue: oss-fuzz requires that the built location be movable. IOW, we build Python into $OUT, and then the $OUT directory gets moved somewhere else and the fuzz test gets run from there. This causes problems because Python can no

[issue31398] TypeError: gdbm key must be string, not unicode

2017-09-08 Thread sds
sds added the comment: the problem is not present in Python 3.6.2 (default, Jul 17 2017, 16:44:45): ``` >>> import dbm >>> import dbm.gnu >>> db = dbm.gnu.open("foo","c") >>> "a" in db False >>> u"a" in db False ``` -- ___ Python tracker

[issue31398] TypeError: gdbm key must be string, not unicode

2017-09-08 Thread sds
New submission from sds: `in` and `has_key` have different behavior for Unicode keys for `gdbm` in 2.7: ``` >>> import gdbm >>> db = gdbm.open("foo.gdbm","c") >>> db.has_key("a") 0 >>> db.has_key(u"a") 0 >>> "a" in db False >>> u"a" in db Traceback (most recent call last): File "", line 1, in

[issue31398] TypeError: gdbm key must be string, not unicode

2017-09-08 Thread sds
sds added the comment: platform: Python 2.7.13 (default, Jul 18 2017, 09:17:00) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin -- ___ Python tracker

[issue31397] does not work import in Python 3.6.2

2017-09-08 Thread Бобёр Сатанист
New submission from Бобёр Сатанист: How to import modules/files in Python 3.6.2? I started to study python, in the section about importing modules, here is an example: I created a text file with the text "print('Hello module world!')" and saved it with the name "module1.py". I put the file in

[issue31388] Provide a way to defer SIGINT handling in the current thread

2017-09-08 Thread Nathaniel Smith
Nathaniel Smith added the comment: Sure, but whatever overhead it has, it has. Once we're paying for it, new keys are free (at yield/resume time). Compared to a bare thread-local it probably has somewhat higher overhead when we have to check it, but (a) that's why PEP 550 has a clever caching

[issue31361] Update feedparser.py to prevent theano compiling fail in python3

2017-09-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks to me as a bug in keras and theano. And may be in pip. Please file bug reports on corresponding bug trackers. -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker

[issue31394] Ellipsis_token.type != token.ELLIPSIS

2017-09-08 Thread Berker Peksag
Berker Peksag added the comment: Thank you for your detailed response, Aivar. I agree that adding 'and Ellipsis' would make the tokenize documentation clearer. Would you like to send a pull request? -- keywords: +easy type: -> enhancement ___

[issue31361] Update feedparser.py to prevent theano compiling fail in python3

2017-09-08 Thread Wei-Shun Lo
Wei-Shun Lo added the comment: Bug encountered while installing multiple packages : 1. keras 2. theano Error Information : ~/work/bottles @ dojos-MacBook-Pro (dojo) |=> pip3 install keras Requirement already satisfied: keras in /usr/local/lib/python3.6/site-packages Requirement already

[issue31354] Fixing a bug related to LTO only build

2017-09-08 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2017-09-08 Thread Nathaniel Smith
Nathaniel Smith added the comment: Here's the patch I mentioned: https://github.com/njsmith/cpython/commit/62547dc5ea323a07c25c2047636a02241f518013 It has a crude but effective technique for handling the hanging issue :-). Alternatively one could use the World's Stupidest Coroutine Runner:

[issue31354] Fixing a bug related to LTO only build

2017-09-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 4c81401b3a9ffa48fc9e19963cbad5111e33 by Gregory P. Smith (octaviansoldea) in branch 'master': bpo-31354: Let configure --with-lto work on all builds https://github.com/python/cpython/commit/4c81401b3a9ffa48fc9e19963cbad5111e33

[issue31356] Add context manager to temporarily disable GC

2017-09-08 Thread Nick Coghlan
Nick Coghlan added the comment: This is being proposed for the gc module, not contextlib, so I'm not sure how the previous comment applies. This is just a convenience API for folks already doing this kind of manipulation themselves. -- ___ Python

[issue28182] Expose OpenSSL verification results in SSLError

2017-09-08 Thread Christian Heimes
Christian Heimes added the comment: The ssl module now reports cause of validation failure: >>> import ssl >>> import ssl, socket >>> ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) >>> sock = ctx.wrap_socket(socket.socket(), server_hostname='www.python.org') >>> sock.connect(('www.python.org',

[issue28182] Expose OpenSSL verification results in SSLError

2017-09-08 Thread Christian Heimes
Christian Heimes added the comment: New changeset b3ad0e5127bdeb6e506301e0d65403fa23c4177b by Christian Heimes in branch 'master': bpo-28182: Expose OpenSSL verification results (#3412) https://github.com/python/cpython/commit/b3ad0e5127bdeb6e506301e0d65403fa23c4177b --

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2017-09-08 Thread Nick Coghlan
Nick Coghlan added the comment: I updated the PR at https://github.com/ncoghlan/cpython/pull/2/files with another attempt at reinstating the asynchronous CM test case that also tweaks the eval loop to ensure that the first few opcodes in a function are always executed before pending calls are

[issue27354] SSLContext.load_verify_locations cannot handle paths on Windows which cannot be encoded using mbcs

2017-09-08 Thread STINNER Victor
STINNER Victor added the comment: >> On Python 3.5, PyUnicode_FSConverter() uses MBCS, which is CP-1552 on your >> system. > > Will the behavior of Python 3.6 be different? Could you point me to relevant > notes or code? See the PEP 529. -- ___

[issue27354] SSLContext.load_verify_locations cannot handle paths on Windows which cannot be encoded using mbcs

2017-09-08 Thread Ilya Kulakov
Ilya Kulakov added the comment: > On Python 3.5, PyUnicode_FSConverter() uses MBCS, which is CP-1552 on your > system. Will the behavior of Python 3.6 be different? Could you point me to relevant notes or code? > If I understood correctly, it's possible to work around the issue by encoding

[issue27354] SSLContext.load_verify_locations cannot handle paths on Windows which cannot be encoded using mbcs

2017-09-08 Thread STINNER Victor
STINNER Victor added the comment: > I'm closing this issue was WONTFIX 3.5 If I understood correctly, it's possible to work around the issue by encoding the filename manually to utf-8. ssl_function(filename.encode('utf-8')) -- ___ Python tracker

[issue31394] Ellipsis_token.type != token.ELLIPSIS

2017-09-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think we should add 'and Ellipsis' in the tokenize doc to get 'all Operators and Delimiters tokens and Ellipsis are returned ...'. I would actually prefer 'Operator and Delimiter tokens' but I don't know if the 's' is needed to trigger the current linkage.

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-09-08 Thread Zachary Ware
Zachary Ware added the comment: New changeset 1911cf3dd2ae67d600c166ba52872fdcf3e85824 by Zachary Ware in branch '2.7': [2.7] bpo-30450: Fall back on the old env.bat (GH-3443) https://github.com/python/cpython/commit/1911cf3dd2ae67d600c166ba52872fdcf3e85824 --

[issue27815] Make SSL suppress_ragged_eofs default more secure

2017-09-08 Thread Christian Heimes
Christian Heimes added the comment: I don't consider myself qualified enough to make a decision. Alex, Victor, what do you think? -- assignee: christian.heimes -> nosy: +alex, haypo ___ Python tracker

[issue25404] ssl.SSLcontext.load_dh_params() does not handle unicode filenames properly

2017-09-08 Thread Christian Heimes
Changes by Christian Heimes : -- keywords: +patch pull_requests: +3453 ___ Python tracker ___

[issue25404] ssl.SSLcontext.load_dh_params() does not handle unicode filenames properly

2017-09-08 Thread Christian Heimes
Changes by Christian Heimes : -- assignee: -> christian.heimes keywords: -patch ___ Python tracker ___

[issue31356] Add context manager to temporarily disable GC

2017-09-08 Thread Josh Rosenberg
Josh Rosenberg added the comment: I'd be -1 on this without a demonstrated broad need for this in at least some context outside of microbenchmarking utilities (which presumably have already implemented similar stuff). If a minimum bar for applicability isn't applied, we'll end up with dozens

[issue31036] building the python docs requires the blurb module

2017-09-08 Thread Ned Deily
Ned Deily added the comment: New changeset 9cc332094c5f8cbaa47400633ab3ba372da61c9d by Ned Deily in branch '3.5': [3.5] bpo-31036: Allow sphinx and blurb to be found automatically (GH-3440) https://github.com/python/cpython/commit/9cc332094c5f8cbaa47400633ab3ba372da61c9d --

[issue27354] SSLContext.load_verify_locations cannot handle paths on Windows which cannot be encoded using mbcs

2017-09-08 Thread Christian Heimes
Christian Heimes added the comment: Ilya, The exception "TypeError: cafile should be a valid filesystem path" is raised by Python, not by OpenSSL. On Python 3.5, PyUnicode_FSConverter() uses MBCS, which is CP-1552 on your system. CP-1552 cannot convert Arabic character set and fails to

[issue27354] SSLContext.load_verify_locations cannot handle paths on Windows which cannot be encoded using mbcs

2017-09-08 Thread Christian Heimes
Changes by Christian Heimes : -- stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue30860] Consolidate stateful C globals under a single struct.

2017-09-08 Thread Eric Snow
Changes by Eric Snow : -- keywords: +patch pull_requests: +3452 ___ Python tracker ___

[issue31394] Ellipsis_token.type != token.ELLIPSIS

2017-09-08 Thread Aivar Annamaa
Aivar Annamaa added the comment: (Sorry, I didn't mean to challenge the authority of a core developer. I simply didn't notice that adding a comment reopens the issue. I hope this time I selected correct parameters and this doesn't happen again) I'm trying to rephrase my concern. Initially I

[issue30389] distutils._msvccompiler cannot find VS 2017

2017-09-08 Thread STINNER Victor
STINNER Victor added the comment: Python 3.6 is also impacted: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.6/builds/104 -- ___ Python tracker

[issue31388] Provide a way to defer SIGINT handling in the current thread

2017-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 08/09/2017 à 19:27, Nathaniel Smith a écrit : > > This seems a bit pointless if we have context local state available though, > because using context local state adds zero overhead to yields, and we yield > approximately 10,000,000x more frequently than we

[issue31388] Provide a way to defer SIGINT handling in the current thread

2017-09-08 Thread Nathaniel Smith
Nathaniel Smith added the comment: ... it's true I did write such an example. And a few lines up in the same message I wrote an example where I was protecting an event loop from interrupts. In both cases the tricky question is how to manage the transitions between protected and unprotected

[issue31396] Configure and make will fail with enabling --with-pydebug

2017-09-08 Thread Christian Heimes
Christian Heimes added the comment: You have to restart with a clean checkout. Either run ``make distclean`` or ``git clean -xdf`` to get rid of all build files. -- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open -> closed

[issue31396] Configure and make will fail with enabling --with-pydebug

2017-09-08 Thread Zhenqing Hu
New submission from Zhenqing Hu: When I updated the source code into the latest version, and configure as well as build with following command: ./configure --with-pydebug && make -j4 Build will fail with following error message: ==

[issue28638] Optimize namedtuple creation

2017-09-08 Thread Josh Rosenberg
Josh Rosenberg added the comment: Side-note: Some of the objections to a C level namedtuple implementation appear to be based on the maintenance hurdle, and other have noted that a structseq-based namedtuple might be an option. I have previously attempted to write a C replacement for

[issue31395] Docs Downloads are 404s

2017-09-08 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +ned.deily ___ Python tracker ___ ___

[issue31395] Docs Downloads are 404s

2017-09-08 Thread Nathan Henrie
New submission from Nathan Henrie: Please see my (closed) issue, I was told to resubmit here. https://github.com/python/pythondotorg/issues/1140 Basically, I usually download a local copy of the epub and HTML docs so I can reference offline (and faster using the "custom search engine" feature

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2017-09-08 Thread Nick Coghlan
Nick Coghlan added the comment: Yeah, I was already thinking the lookaside table might be a better idea (similar to co_lnotab replacing the old SET_LINENO opcodes), especially since that would also provide a quick way of introspecting code objects to see if they included any try/finally

[issue29136] Add OP_NO_TLSv1_3

2017-09-08 Thread Christian Heimes
Changes by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31394] Ellipsis_token.type != token.ELLIPSIS

2017-09-08 Thread Berker Peksag
Berker Peksag added the comment: Please don't reopen an issue if it was closed by a core developer. It's not clear to me what exactly do you want to change in the implementation or documentation. A sequence of three periods has a special meaning as an ellipsis literal. is literally

[issue30403] PEP 547: Running extension modules using -m switch

2017-09-08 Thread Marcel Plch
Marcel Plch added the comment: I have made a patch both for cython and cpython implementing a way to use Py_mod_create in cython. Basically module def that specifies a new "Py_mod_cython" slot are excluded from the rule of no module creation, so these modules can be executed directly even

[issue15670] PEP 3121, 384 Refactoring applied to ssl module

2017-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: PyType_FromSpec provides a rather neat way to initialize C extension types. However, there are a couple of pitfalls to look out for: https://bugs.python.org/issue16690 https://bugs.python.org/issue26979 -- nosy: +pitrou

[issue31394] Ellipsis_token.type != token.ELLIPSIS

2017-09-08 Thread Aivar Annamaa
Aivar Annamaa added the comment: But ellipsis is a distinct token, not a sequence of three period tokens. Also, I can't see how we could conceptually treat ellipsis as a delimiter or operator -- it's a literal. I still think either documentation or implementation needs to be fixed here.

[issue31388] Provide a way to defer SIGINT handling in the current thread

2017-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: You just wrote an example where you are protecting __exit__ from interrupts. Do you schedule coroutines inside __exit__? -- ___ Python tracker

[issue31388] Provide a way to defer SIGINT handling in the current thread

2017-09-08 Thread Nathaniel Smith
Nathaniel Smith added the comment: Yes... low-level routines like coroutine schedulers where you need to defer interrupts inside the scheduler but not inside the coroutines being scheduled. It's not gold plating, it's actually the original motivation :-)

[issue31394] Ellipsis token.type != token.ELLIPSIS

2017-09-08 Thread Berker Peksag
Berker Peksag added the comment: If you look at https://docs.python.org/3/reference/lexical_analysis.html#delimiters '.' (period) is listed as delimiter and there is the following sentence to answer your question: A sequence of three periods has a special meaning as an ellipsis literal.

[issue31394] Ellipsis token.type != token.ELLIPSIS

2017-09-08 Thread Aivar Annamaa
Aivar Annamaa added the comment: But it looks like Ellipsis is neither operator nor delimiter: https://docs.python.org/3/reference/lexical_analysis.html#operators -- ___ Python tracker

[issue31388] Provide a way to defer SIGINT handling in the current thread

2017-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 08/09/2017 à 03:54, Nathaniel Smith a écrit : > > The main feature we would like is for it to automatically vary depending on > the execution context -- in particular, naively sticking it into a > thread-local won't work, because if you use send/throw/next

[issue31394] Ellipsis token.type != token.ELLIPSIS

2017-09-08 Thread Berker Peksag
Berker Peksag added the comment: Thank you for the report, but this behavior is already documented at https://docs.python.org/3/library/tokenize.html To simplify token stream handling, all Operators and Delimiters tokens are returned using the generic token.OP token type. The exact

[issue31394] Ellipsis token.type != token.ELLIPSIS

2017-09-08 Thread Aivar Annamaa
New submission from Aivar Annamaa: Type code for ellipsis token doesn't match with the constant token.ELLIPSIS: --- import io import token import tokenize source = "..." tokens = list(tokenize.tokenize(io.BytesIO(source.encode('utf-8')).readline)) ellipsis =

[issue15670] PEP 3121, 384 Refactoring applied to ssl module

2017-09-08 Thread Andrew Svetlov
Andrew Svetlov added the comment: The patch consists from two changes: replacing static vars with module state and using slot based way for constructing classes. The first change is obvious but I not sure if we need second transformation. -- ___

[issue31393] Fix the use of PyUnicode_READY()

2017-09-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31393] Fix the use of PyUnicode_READY()

2017-09-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ddb536ba7b7c6022424e39d666c3cc81772645c0 by Serhiy Storchaka in branch '3.6': [3.6] bpo-31393: Fix the use of PyUnicode_READY(). (GH-3451). (#3453) https://github.com/python/cpython/commit/ddb536ba7b7c6022424e39d666c3cc81772645c0 --

[issue28638] Optimize namedtuple creation

2017-09-08 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- pull_requests: +3451 ___ Python tracker ___

[issue31393] Fix the use of PyUnicode_READY()

2017-09-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3450 ___ Python tracker ___

[issue31393] Fix the use of PyUnicode_READY()

2017-09-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e3b2b4b8d9e751b49e3550cb83ba39b54fdc377c by Serhiy Storchaka in branch 'master': bpo-31393: Fix the use of PyUnicode_READY(). (#3451) https://github.com/python/cpython/commit/e3b2b4b8d9e751b49e3550cb83ba39b54fdc377c --

[issue31252] Operator.itemgetter documentation should include dictionary keys example

2017-09-08 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27354] SSLContext.load_verify_locations cannot handle paths on Windows which cannot be encoded using mbcs

2017-09-08 Thread Ilya Kulakov
Ilya Kulakov added the comment: Christian, If you have windows under your hand and can try an alike path, you should see the problem right away if it's still there. I think the original problem was unnecessary PyUnicode_FSConverter: it failed to encode string into mbcs, while OpenSSL did not

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2017-09-08 Thread Nathaniel Smith
Nathaniel Smith added the comment: > a special case for WITH_CLEANUP_START I guess this works for the sync case, but it seems kinda fragile, and obviously won't work for the async case. Do you think it's worth revisiting this idea from the OP?: "The eval loop's "check for signal handlers"

[issue26904] Difflib quick_ratio() could use Counter()

2017-09-08 Thread Michael Cuthbert
Michael Cuthbert added the comment: I've tried to get the system to not be slower on small sets by not creating a Counter for less than 60 items, and managed to get within 10% of the speed for small sequences while maintaining the 3-3.6x speedup for big comparisons and testing that the

  1   2   >