[issue29410] Moving to SipHash-1-3

2017-01-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 The discussions on the Rust and Ruby lists seem persuasive. -- assignee: -> christian.heimes nosy: +christian.heimes, rhettinger ___ Python tracker

[issue29398] memory corruption in xxlimited

2017-01-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 167beb21b527 by Benjamin Peterson in branch '3.5': gc types needs to be allocated as such (closes #29398) https://hg.python.org/cpython/rev/167beb21b527 New changeset b0463c5073fc by Benjamin Peterson in branch '3.6': merge 3.5 (#29398)

[issue29410] Moving to SipHash-1-3

2017-01-31 Thread INADA Naoki
Changes by INADA Naoki : -- components: +Interpreter Core type: -> performance ___ Python tracker ___

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-01-31 Thread INADA Naoki
INADA Naoki added the comment: Before trying advanced optimizations, I want move suspended obvious optimizations forwards. For example, removing unused constants is suspended because constant folding should be moved from peephole to AST. This is why I found this issue. After that, I'm

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-01-31 Thread STINNER Victor
STINNER Victor added the comment: If you would like to implement constant folding at the AST level, I suggest you to look at my fatoptimizer project: https://github.com/haypo/fatoptimizer/blob/master/fatoptimizer/const_fold.py The tricky part is to avoid operations when we know that it will

[issue29410] Moving to SipHash-1-3

2017-01-31 Thread INADA Naoki
New submission from INADA Naoki: Rust and Ruby moved from SipHash-2-4 to SipHash-1-3. https://github.com/rust-lang/rust/issues/29754 https://bugs.ruby-lang.org/issues/13017 SipHash-1-3 seems faster than 2-4 and secure enough. -- messages: 286590 nosy: inada.naoki priority: normal

Re: Python3.6 tkinter bug?

2017-01-31 Thread Christian Gollwitzer
Am 01.02.17 um 00:02 schrieb MRAB: On 2017-01-31 22:34, Christian Gollwitzer wrote: .!frame.!checkbutton .!frame.!checkbutton2 .!frame2.!checkbutton .!frame2.!checkbutton2 Perhaps someone who knows Tcl and tk can tell me, but I notice that in the first example, the second part of the widget

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-01-31 Thread INADA Naoki
INADA Naoki added the comment: >> We have already Constant and NameConstant. So it seems there are no need for >> None, Bool, TupleConst, SetConst nodes. > Yes, Constant is Victor's version of Lit. Then, may I remove ast.Lit, and use Constant and NameConstant? >> I think converting Num, Str,

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-01-31 Thread Eugene Toder
Eugene Toder added the comment: > We have already Constant and NameConstant. So it seems there are no need for > None, Bool, TupleConst, SetConst nodes. Yes, Constant is Victor's version of Lit. > I think converting Num, Str, Bytes, Ellipsis into Constant in folding stage > is easier than

[issue29400] Instruction level tracing via sys.settrace

2017-01-31 Thread George King
George King added the comment: Here is the patch from git; if you need a patch for hg I can work on that tomorrow! -- keywords: +patch Added file: http://bugs.python.org/file46475/inst-tracing.diff ___ Python tracker

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-01-31 Thread Nikolay Kim
Changes by Nikolay Kim : -- versions: +Python 3.6 ___ Python tracker ___ ___

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-01-31 Thread Nikolay Kim
Nikolay Kim added the comment: madis-data.ncep.noaa.gov side does not complete ssl shutdown process. -- keywords: +patch nosy: +fafhrd91 Added file: http://bugs.python.org/file46474/ssl_shutdown_timeout.patch ___ Python tracker

Re: SQL CE Database (.sdf) file connection with python

2017-01-31 Thread MRAB
On 2017-02-01 00:45, Jay Desai wrote: Hello, I came across a post from Nikhil Joshi at https://mail.python.org/pipermail/python-list/2014-November/681568.html. *.sdf database access - mail.python.org mail.python.org On

[issue29409] Implement PEP 529 for io.FileIO

2017-01-31 Thread Eryk Sun
Changes by Eryk Sun : -- stage: needs patch -> test needed ___ Python tracker ___ ___

[issue29409] Implement PEP 529 for io.FileIO

2017-01-31 Thread Eryk Sun
Changes by Eryk Sun : -- keywords: +patch Added file: http://bugs.python.org/file46473/issue_29409_01.patch ___ Python tracker ___

[issue29409] Implement PEP 529 for io.FileIO

2017-01-31 Thread Eryk Sun
New submission from Eryk Sun: PEP 529 isn't implemented for io.FileIO, and I think it should be. If a UTF-8 path is passed to open(), it ends up calling C _open instead of decoding the path and calling C _wopen. Also, if a pathlike object is passed to io.FileIO, it calls PyUnicode_FSConverter

[issue22047] argparse improperly prints mutually exclusive options when they are in a group

2017-01-31 Thread paul j3
paul j3 added the comment: A similar issue about nesting an Argument Group inside a Mutually Exclusive Group. http://bugs.python.org/issue24736 -- ___ Python tracker

[issue24736] argparse add_mutually_exclusive_group do not print help

2017-01-31 Thread paul j3
paul j3 added the comment: I'm proposing closing this with reference to http://bugs.python.org/issue22047 That focuses on the issue of adding mutually exclusive group to another exclusive group, but adding Argument Group has the same problems. Solutions, short of the big

[issue11588] Add "necessarily inclusive" groups to argparse

2017-01-31 Thread paul j3
paul j3 added the comment: Another issue requesting a 'mutually dependent group' http://bugs.python.org/issue23298 -- ___ Python tracker ___

[issue23298] Add ArgumentParser.add_mutually_dependence_group

2017-01-31 Thread paul j3
paul j3 added the comment: I propose closing this with reference to http://bugs.python.org/issue11588 -- status: open -> closed ___ Python tracker ___

[issue29218] distutils: Remove unused install_misc class

2017-01-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset ef6bf4c28f78c1f9ad01ff466c9c84d4513a506b by Berker Peksag in branch 'master': Issue #29218: Remove unused install_misc command https://github.com/python/cpython/commit/ef6bf4c28f78c1f9ad01ff466c9c84d4513a506b --

[issue29218] distutils: Remove unused install_misc class

2017-01-31 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29218] distutils: Remove unused install_misc class

2017-01-31 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29218] distutils: Remove unused install_misc class

2017-01-31 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

Qtcore error problem

2017-01-31 Thread Xiao Zhang
Dear python users, I am new to python and now I met a problem. When I try to run a py file, I got the following error: from vacumm.misc.grid.regridding import regrid2d File "/home/xzhang3/usr/local/uvcdat/2.4.1/lib/python2.7/site-packages/vacumm/misc/__init__.py", line 41, in import

[issue29218] distutils: Remove unused install_misc class

2017-01-31 Thread Berker Peksag
Berker Peksag added the comment: Thanks! Since Greg has given his LGTM and I couldn't find any usage of it in the wild, I've committed the patch with a NEWS entry. -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed

[issue29218] distutils: Remove unused install_misc class

2017-01-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 19c4528f53b0 by Berker Peksag in branch 'default': Issue #29218: Remove unused install_misc command https://hg.python.org/cpython/rev/19c4528f53b0 -- nosy: +python-dev ___ Python tracker

[issue29408] Add timestamp-based dependency system to build_clib

2017-01-31 Thread Daniel Nunes
New submission from Daniel Nunes: Summary: - Added newer_pairwise_group function to distutils.dep_util - Added documentation and tests for previous function - Added timestamp-based dependency system to build_libraries in build_clib - Added tests for the above build_clib is sorely

[issue29407] Remove redundant ensure_future() calls in factorial example

2017-01-31 Thread Berker Peksag
New submission from Berker Peksag: Unless I'm missing something, ensure_future() calls at https://docs.python.org/3.6/library/asyncio-task.html#example-parallel-execution-of-tasks are redundant and can be removed. Off-topic: Can we use the async/await keywords in asyncio docs now? --

[issue29344] sock_recv not detected a coroutine

2017-01-31 Thread Berker Peksag
Berker Peksag added the comment: I'm not really familiar with asyncio terminology, but it looks like it returns a future: >>> asyncio.isfuture(loop.sock_recv(sock, 1024)) True There is a also a test in test_selector_events: f = self.loop.sock_recv(sock, 1024)

SQL CE Database (.sdf) file connection with python

2017-01-31 Thread Jay Desai
Hello, I came across a post from Nikhil Joshi at https://mail.python.org/pipermail/python-list/2014-November/681568.html. *.sdf database access - mail.python.org mail.python.org On Saturday, April 21, 2012 6:55:55 AM

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-01-31 Thread Alexander Mohr
Alexander Mohr added the comment: updating to make default the error case (madis) -- Added file: http://bugs.python.org/file46470/scratch_1.py ___ Python tracker

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-01-31 Thread Alexander Mohr
Changes by Alexander Mohr : Removed file: http://bugs.python.org/file46469/scratch_1.py ___ Python tracker ___

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-01-31 Thread Alexander Mohr
New submission from Alexander Mohr: with the attached code note how HttpClient.connection_lost callback is never called for the madis server. The madis server is an apache server, I tried with the OSX apache server and could not reproduce the issue so it seems something particular about their

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-31 Thread Guido van Rossum
Guido van Rossum added the comment: Seems the combined patch doesn't include the tests. Nor does the most recent slot-wrappre-types.patch. Ivan, can you make a single truly combined patch and add a Misc/NEWS entry to it as well? Other than that this looks fine. Maybe we need to wait for the

[issue29405] improve csv.Sniffer().sniff() behavior

2017-01-31 Thread Milt Epstein
Milt Epstein added the comment: FWIW, it might be more concise and more consistent with the existing code to change the one line to: total = min(float(chunkLength * iteration), float(len(data))) -- ___ Python tracker

[issue29405] improve csv.Sniffer().sniff() behavior

2017-01-31 Thread Milt Epstein
New submission from Milt Epstein: I'm trying to use csv.Sniffer().sniff(sample_data) to determine the delimiter on a number of input files. Through some trial and error, many "Could not determine delimiter" errors, and analyzing how this routine works/behaves, I settled on sample_data being

[issue29398] memory corruption in xxlimited

2017-01-31 Thread Brian Martin
Changes by Brian Martin : -- nosy: +osvdb ___ Python tracker ___ ___

[issue27647] Update Windows build to Tcl/Tk 8.6.6

2017-01-31 Thread Joshua Kinard
Joshua Kinard added the comment: @Terry: This only applies on the Windows release of Python. On both Linux and FreeBSD, you can wind up with Python 2.7 and Tk-8.6.x by default in some instances: # pkg info | grep python27 python27-2.7.13_1 Interpreted object-oriented programming

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Eryk Sun
Eryk Sun added the comment: I can confirm that LoadLibraryEx w/ LOAD_WITH_ALTERED_SEARCH_PATH unfortunately does not work in Windows 7. Actually I almost looked into this before on python-list: https://mail.python.org/pipermail/python-list/2016-September/thread.html#714622 but I got

[issue29404] "TypeError: 'int' does not have the buffer interface" on memoryview over bytearray

2017-01-31 Thread Vincent Pelletier
New submission from Vincent Pelletier: Quoting a github gist[1] (not mine, I found it while googling for this error) clearly illustrating the issue: # Python 2 >>> b = bytearray(8) >>> v = memoryview(b) >>> v[0] = 42 Traceback (most recent call last): File "", line 1, in TypeError: 'int'

Re: Python3.6 tkinter bug

2017-01-31 Thread George Trojan - NOAA Federal
On 2017-01-31 18:02, MRAB wrote: On 2017-01-31 22:34, Christian Gollwitzer wrote: > >* Am 31.01.17 um 20:18 schrieb George Trojan - NOAA Federal: > *>>* Selection of button 'A' also selects button 'C'. Same goes for 'B' and > 'D'. > *>>* I noticed that widget names have changed, which likely

Re: command line micro wiki written in Python

2017-01-31 Thread Ben Finney
Paul Wolf writes: > I've created a command line utility for managing text files. It's > written in Python: […] Thank you. > The key aspects are > > * Entirely command-line driven > > * Text documents only with a slight preference for Markdown The Python community has a

[issue29403] mock's autospec's behavior on method-bound builtin functions is broken

2017-01-31 Thread Aaron Gallagher
Aaron Gallagher added the comment: Patch adapted from https://github.com/testing-cabal/mock/pull/389 -- keywords: +patch Added file: http://bugs.python.org/file46468/mock.patch ___ Python tracker

Re: Python3.6 tkinter bug?

2017-01-31 Thread MRAB
On 2017-01-31 22:34, Christian Gollwitzer wrote: Am 31.01.17 um 20:18 schrieb George Trojan - NOAA Federal: Selection of button 'A' also selects button 'C'. Same goes for 'B' and 'D'. I noticed that widget names have changed, which likely leads to the cause:

[issue29403] mock's autospec's behavior on method-bound builtin functions is broken

2017-01-31 Thread Aaron Gallagher
New submission from Aaron Gallagher: Cython will, in the right circumstances, offer a MethodType instance where im_func is a builtin function. Any instance of MethodType is automatically assumed to be a python-defined function (more specifically, a function that has an inspectable signature),

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Eryk Sun
Eryk Sun added the comment: > Are you sure it really works on Windows 10? Neither the DLL35 nor DLL36 directory was set in PATH, nor any directory containing python3x.dll. Each of the latter two directories contained only the minimal set python3.dll, python3x.dll, and vcruntime140.dll. I ran

[issue29400] Instruction level tracing via sys.settrace

2017-01-31 Thread Ammar Askar
Ammar Askar added the comment: A git style patch can be found at https://github.com/gwk/cpython/commit/071d17cedfdf2db8b405aab5adabebe2ac5ef67b.patch -- nosy: +ammar2 ___ Python tracker

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Elli Pirelli
Elli Pirelli added the comment: I should perhaps clarify my sentence "As described, as long as forwarder.dll does not contain a import dependency on real.dll, loading forwarder.dll and doing GetProcAddress("Func") will fail, if real.dll is not in the standard DLL search path." What i tried

[issue29400] Instruction level tracing via sys.settrace

2017-01-31 Thread STINNER Victor
STINNER Victor added the comment: Can you please attach your patch? -- ___ Python tracker ___ ___

What's the best python projects book

2017-01-31 Thread Marvin Sinclair
Am a newbie to python, just to completed reading and practice a python book, but I wanted to know if there is a good python book that is composed of different projects on different topics that I can code along, read what is happening so i can gain more experience, please suggest me any, or if

Re: Python3.6 tkinter bug?

2017-01-31 Thread Christian Gollwitzer
Am 31.01.17 um 20:18 schrieb George Trojan - NOAA Federal: Selection of button 'A' also selects button 'C'. Same goes for 'B' and 'D'. I noticed that widget names have changed, which likely leads to the cause: /usr/local/Python-3.5.1/bin/python3 foo.py .140182648425776.140182647743208

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Elli Pirelli
Elli Pirelli added the comment: It does not work on Windows 7 Pro x64. And i am not the only one. The maintainer of the "python-embedded-launcher" also encountered the issue (see discussion here: https://github.com/zsquareplusc/python-embedded-launcher/issues/3) Are you sure it really works

[issue27647] Update Windows build to Tcl/Tk 8.6.6

2017-01-31 Thread Larry Hastings
Larry Hastings added the comment: I don't think we should update it in 3.5. That sounds destabilizing. -- ___ Python tracker ___

[issue27647] Update Windows build to Tcl/Tk 8.6.6

2017-01-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Changing tk in 2.7.z from 8.5 to 8.6 would add new features, which we don't usually do in bugfix releases. -- ___ Python tracker

[issue23551] IDLE to provide menu link to PIP gui.

2017-01-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ned Deily and Nick Coughlin vetoed putting a pipgui in the CPython repository -- see #27051. So, for the foreseeable future, there will not be anything to link to. Note: I had to remove the open dependency because the tracker does not differentiate between

Embedding python, run a function and get it's result

2017-01-31 Thread Charles Heizer
Hello, I'm messing around with the embedded python and I can get parts to work. What I'm having a hard time is getting my head around calling a function in the python string and getting it's result. Question, how do I load the python script and call runMe() and get it's value? Thanks! Example

[issue27647] Update Windows build to Tcl/Tk 8.6.6

2017-01-31 Thread Joshua Kinard
Joshua Kinard added the comment: Hi, I came across a StackOverflow question that apparently turned up a bug in Tk itself with regards to Spinboxes on Windows Aero themes. The question is here: http://stackoverflow.com/q/30783603/ And I did a deep-dive of the issue here as the accepted

[issue27051] Create PIP gui

2017-01-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Upendra, can you upload a zipped copy of your code as of the end of GSOC or later? We should have a permanent copy of your work even if your github account goes away. Since the idea of adding a pipgui to the CPython repository has been rejected, I believe

Re: What are your opinions on .NET Core vs Python?

2017-01-31 Thread Gregory Ewing
Ian Kelly wrote: Java also has "static import" which lets you individually import specific static methods or fields from a class. Yes, but it's nowhere near as convenient as Python's import. To import individual names you have to qualify all of them with the whole package name, and there is no

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Eryk Sun
Eryk Sun added the comment: LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH worked for me in Windows 10. I tested loading 64-bit python3.dll, for both 3.5 and 3.6, and getting the address of Py_Main. The DLLs were loaded from DLL35 and DLL36 subdirectories. It worked using both a relative

Re: Python3.6 tkinter bug?

2017-01-31 Thread Terry Reedy
On 1/31/2017 4:11 PM, Terry Reedy wrote: On 1/31/2017 3:43 PM, MRAB wrote: On 2017-01-31 19:18, George Trojan - NOAA Federal wrote: The following program behaves differently under Python 3.6: ''' checkbutton test ''' import tkinter class GUI(tkinter.Tk): def __init__(self):

Re: Overriding True and False ?

2017-01-31 Thread jladasky
On Sunday, January 29, 2017 at 11:29:29 PM UTC-8, Irv Kalb wrote: > It seems very odd that Python allows you to override the values of > True and False. Hi Irv, Let me join the chorus of people who are encouraging you to switch to Python3, which corrects this problem. Overriding builtins has

[issue29402] Problem with Checkbutton and duplicate last name components

2017-01-31 Thread Terry J. Reedy
New submission from Terry J. Reedy: Report and code from George Trojan on python-list. import tkinter class GUI(tkinter.Tk): def __init__(self): tkinter.Tk.__init__(self) frame = tkinter.Frame(self) for tag in ('A', 'B'): w = tkinter.Checkbutton(frame,

DJANGO IMAGES QUESTION

2017-01-31 Thread Xristos Xristoou
who is the better method to take images from uses(visitors) on my web site and to return the new images(processing) back to users using DJANGO? i am new i dont know how to connect my python script with the html templetes to take the images and how to return? for example my script take images

Re: sorting a list of dicts by a computed field

2017-01-31 Thread jladasky
On Tuesday, January 31, 2017 at 12:34:38 PM UTC-8, MRAB wrote: > On 2017-01-31 20:26, Larry Martell wrote: > The module 'datetime' contains a class called 'datetime'. Judging by > your exception, 'datetime' is the module. > > Try "datetime.datetime.strptime" instead. This re-use of the name

[issue29401] Python3.6 docs should not have a "what's new in Python 3.7" page

2017-01-31 Thread Ned Deily
Changes by Ned Deily : -- stage: -> resolved status: pending -> closed ___ Python tracker ___

Re: Python3.6 tkinter bug?

2017-01-31 Thread Terry Reedy
On 1/31/2017 3:43 PM, MRAB wrote: On 2017-01-31 19:18, George Trojan - NOAA Federal wrote: The following program behaves differently under Python 3.6: ''' checkbutton test ''' import tkinter class GUI(tkinter.Tk): def __init__(self): tkinter.Tk.__init__(self) frame =

[issue28747] Expose SSL_CTX_set_cert_verify_callback

2017-01-31 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- nosy: +ronaldoussoren ___ Python tracker ___ ___

Re: sorting a list of dicts by a computed field

2017-01-31 Thread Larry Martell
On Tue, Jan 31, 2017 at 3:30 PM, Chris Angelico wrote: > On Wed, Feb 1, 2017 at 7:26 AM, Larry Martell wrote: >> I have a list of dicts and one item of the dict is a date in m/d/Y >> format. I want to sort by that. I tried this: >> >>

[issue29401] Python3.6 docs should not have a "what's new in Python 3.7" page

2017-01-31 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. Those two files should disappear soon. -- nosy: +ned.deily resolution: -> fixed status: open -> pending ___ Python tracker

Re: Python3.6 tkinter bug?

2017-01-31 Thread MRAB
On 2017-01-31 19:18, George Trojan - NOAA Federal wrote: The following program behaves differently under Python 3.6: ''' checkbutton test ''' import tkinter class GUI(tkinter.Tk): def __init__(self): tkinter.Tk.__init__(self) frame = tkinter.Frame(self) for tag in

Re: sorting a list of dicts by a computed field

2017-01-31 Thread Michael Torrie
On 01/31/2017 01:26 PM, Larry Martell wrote: > I have a list of dicts and one item of the dict is a date in m/d/Y > format. I want to sort by that. I tried this: > > sorted(data['trends'], key=lambda k: > datetime.strptime(k['date_time'],'%m/%d/%Y')) > > But that fails with: > > Exception Type:

Re: sorting a list of dicts by a computed field

2017-01-31 Thread MRAB
On 2017-01-31 20:26, Larry Martell wrote: I have a list of dicts and one item of the dict is a date in m/d/Y format. I want to sort by that. I tried this: sorted(data['trends'], key=lambda k: datetime.strptime(k['date_time'],'%m/%d/%Y')) But that fails with: Exception Type: AttributeError at

Re: sorting a list of dicts by a computed field

2017-01-31 Thread Kev Dwyer
Larry Martell wrote: > I have a list of dicts and one item of the dict is a date in m/d/Y > format. I want to sort by that. I tried this: > > sorted(data['trends'], key=lambda k: > datetime.strptime(k['date_time'],'%m/%d/%Y')) > > But that fails with: > > Exception Type: AttributeError at >

[issue29169] update zlib to 1.2.11

2017-01-31 Thread Martin Panter
Martin Panter added the comment: Misc/NEWS (and the commit message) say 1.2.10. Perhaps you meant 1.2.11? -- nosy: +martin.panter ___ Python tracker ___

Re: sorting a list of dicts by a computed field

2017-01-31 Thread Chris Angelico
On Wed, Feb 1, 2017 at 7:26 AM, Larry Martell wrote: > I have a list of dicts and one item of the dict is a date in m/d/Y > format. I want to sort by that. I tried this: > > sorted(data['trends'], key=lambda k: > datetime.strptime(k['date_time'],'%m/%d/%Y')) > > But that

sorting a list of dicts by a computed field

2017-01-31 Thread Larry Martell
I have a list of dicts and one item of the dict is a date in m/d/Y format. I want to sort by that. I tried this: sorted(data['trends'], key=lambda k: datetime.strptime(k['date_time'],'%m/%d/%Y')) But that fails with: Exception Type: AttributeError at

[issue29401] Python3.6 docs should not have a "what's new in Python 3.7" page

2017-01-31 Thread Gerrit Holl
New submission from Gerrit Holl: I believe this page is not supposed to exist: https://docs.python.org/3.6/whatsnew/3.7.html Nor this one: https://docs.python.org/3.5/whatsnew/3.6.html Neither are maintained, nor would I expect them to be. -- assignee: docs@python components:

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2017-01-31 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Feels like it is up to me to shed some light on various topics here: AIX defines (static) "Object" files and "Shared Object" files. Both can (but do not need to) be members of an "Archive Library". When talking about (dynamically loading) a "shared

Python3.6 tkinter bug?

2017-01-31 Thread George Trojan - NOAA Federal
The following program behaves differently under Python 3.6: ''' checkbutton test ''' import tkinter class GUI(tkinter.Tk): def __init__(self): tkinter.Tk.__init__(self) frame = tkinter.Frame(self) for tag in ('A', 'B'): w = tkinter.Checkbutton(frame,

[issue29287] IDLE needs syntax highlighting for f-strings

2017-01-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is 3 related but somewhat distinct proposals. 1. Special handling (normal syntax colorizing) of f-expressions (the grammatical term used at https://docs.python.org/3/reference/lexical_analysis.html#formatted-string-literals). 2. Brace matching within

[issue29400] Instruction level tracing via sys.settrace

2017-01-31 Thread George King
New submission from George King: I have recently put some effort into developing a code coverage tool that shows correct results for intraline branches. In order to get intraline trace data, I patched CPython, adding an optional "trace instructions" flag to sys.settrace. The patch is fairly

Re: What are your opinions on .NET Core vs Python?

2017-01-31 Thread Ian Kelly
On Jan 30, 2017 8:00 PM, "Michael Torrie" wrote: > In any case, partial classes seems like a misfeature of C# to me but > apparently they are used when making Windows Forms GUI-based apps. > Apparently VS autogenerates the class that backs the form, and then the > developer

Re: What are your opinions on .NET Core vs Python?

2017-01-31 Thread Ian Kelly
On Jan 30, 2017 11:32 PM, "Gregory Ewing" wrote: > That's the thing I find most frustrating about both C# and Java, > the lack of anything like Python's "from ... import ...". You get > a choice of either effectively doing "import *" on the contents > of a whole class

[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2017-01-31 Thread Mark Haase
Mark Haase added the comment: Oh, sorry! I didn't realize you were a core dev or I would have replied sooner. Thank you for looking into this issue. -- ___ Python tracker

PyDev 5.5.0 Released

2017-01-31 Thread Fabio Zadrozny
PyDev 5.5.0 Release Highlights --- * **Important** PyDev now requires Java 8 and Eclipse 4.6 (Neon) onwards. * PyDev 5.2.0 is the last release supporting Eclipse 4.5 (Mars). * If you enjoy PyDev, you can help in keeping it supported through its Patreon

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Elli Pirelli
Changes by Elli Pirelli : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior

2017-01-31 Thread Elli Pirelli
New submission from Elli Pirelli: Let me first apologize if this issue has already been reported and discussed before. I would be surprised if there are not a few developers that had to deal with this issue before, but i was unable to find an existing bug report or discussion about this. So,

[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2017-01-31 Thread Vinay Sajip
Vinay Sajip added the comment: > Any idea how we get a CPython dev to look at this patch? Well, I'm one of them, so ... :-) I will commit it soon, given that Thomas Nyberg has also given his feedback. It was just waiting for your comments ... --

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-01-31 Thread INADA Naoki
INADA Naoki added the comment: > 1. Changes to AST I'm working on updating this part. There are some failing tests remains. But I doubt this stage is worth enough for now. > a) Merge Num, Str, Bytes and Ellipsis constructors into a single Lit > (literal) that can hold anything. For one

[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2017-01-31 Thread Mark Haase
Mark Haase added the comment: Vinay, thanks for the patch! I just tested it on my Ubuntu 16.04.1 box with Python 3.5.2 and it works perfectly. Your patch is cleaner than mine, too. Any idea how we get a CPython dev to look at this patch? -- ___

Re: What are your opinions on .NET Core vs Python?

2017-01-31 Thread Michael Torrie
On 01/30/2017 10:31 PM, Gregory Ewing wrote: > Michael Torrie wrote: >> He was saying that you can >> use the explicit self paradigm in C#. Simply prefix each member variable >> with "this." > > One can do that in one's own code, but it doesn't help > you to read the code of someone else who

Re: command line micro wiki written in Python

2017-01-31 Thread Ethan Furman
On 01/31/2017 02:33 AM, Paul Wolf wrote: I've created a command line utility for managing text files. It's written in Python... That sounds really cool! -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-01-31 Thread Ammar Askar
Ammar Askar added the comment: Attached patch changes the py2.7 documentation to point out that the method name is __hex__ and its return type is a string. -- keywords: +patch nosy: +ammar2 Added file: http://bugs.python.org/file46466/hex_method.diff

[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2017-01-31 Thread Christopher Schramm
Changes by Christopher Schramm : -- nosy: +cschramm ___ Python tracker ___ ___

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-01-31 Thread Nick Coghlan
Nick Coghlan added the comment: Hugo, Serhiy, and Victor: I think you're all agreeing with each other, but to make sure I'm understanding the point correctly: 1. ast.literal_eval() is currently safe from malicious code like "10 ** 10" or "1073741824 * 'a'" because it only traverses

[issue29393] Enabiling IPv6 by default

2017-01-31 Thread Ned Deily
Ned Deily added the comment: Checking for IPv6 *is* enabled by default and has been for quite some time: $ ./configure [...] checking if --enable-ipv6 is specified... yes checking if RFC2553 API is available... yes checking ipv6 stack type... kame [...] -- nosy: +ned.deily resolution:

[issue29387] Tabs vs spaces FAQ out of date

2017-01-31 Thread Marco Buttu
Marco Buttu added the comment: Hi Martin, why did you write "Python should report an error if mixed tabs and spaces are causing problems in leading whitespace."? Python for sure reports an error in that case. Maybe "Python reports an error if..." is a better choice. But my English is really

[issue29398] memory corruption in xxlimited

2017-01-31 Thread zeroinside
New submission from zeroinside: Hello I found incorrect gc behavior in xxlimited module. After an hour of investigation, I'm still not sure its security related problem. I have a partial control on RBP register, depends of memory layout. GDB: Starting program: /usr/bin/python3.6 [Thread

  1   2   >