[issue21532] 2.7.7rc1 msi is lacking libpython27.a

2014-05-18 Thread Martin v . Löwis
New submission from Martin v. Löwis: The 32-bit installer should include libpython27.a, the import library in GNU ld format. To build it, cygwin must be installed and on PATH when the MSI is built. The file will end up in libs/libpython27.a -- components: Windows messages: 218781 nosy:

[issue21531] Sending a zero-length UDP packet to asyncore invokes handle_close()

2014-05-18 Thread Tony Gedge
New submission from Tony Gedge: Sending a zero-length UDP packet to asyncore closes socket by default. The default implementation of recv() assumes that zero-length data means close. This isn't true for UDP - it is possible to send a zero-length payload packet. A possible work-around is to ov

[issue19979] Missing nested scope vars in class scope (bis)

2014-05-18 Thread Ethan Furman
Ethan Furman added the comment: Terry remarked: --- > I am puzzled by the opening statement there that > > from enum import Enum # I added this as necessary > class Season(Enum): > SPRING = Season() > > "works beautifully" at top level as it indeed raises > NameError: name

[issue19979] Missing nested scope vars in class scope (bis)

2014-05-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: #17853 was in the context of metaclasses. Even so, I am puzzled by the opening statement there that from enum import Enum # I added this as necessary class Season(Enum): SPRING = Season() "works beautifully" at top level as it indeed raises NameError: nam

[issue21519] IDLE : Bug in keybinding validity check

2014-05-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: > Now the binding will be assigned to two actions. I do not see this. I only see duplicated, which is bad enough to be patched. What did you leave out ;-). Also see #12387, which we need to finish, and Ned's link to http://wiki.tcl.tk/28331 A patch for K

[issue17044] Implement PEP 422: Simple class initialisation hook

2014-05-18 Thread Berker Peksag
Changes by Berker Peksag : -- versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17044] Implement PEP 422: Simple class initialisation hook

2014-05-18 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue17422] language reference should specify restrictions on class namespace

2014-05-18 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue17421] Drop restriction that meta.__prepare__() must return a dict (subclass)

2014-05-18 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute

2014-05-18 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue17352] Be clear that __prepare__ must be declared as a class method

2014-05-18 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue19979] Missing nested scope vars in class scope (bis)

2014-05-18 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue12387] IDLE save keyboard shortcut problem

2014-05-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Reading the Tk Wiki page, it appears that Shift undoes ShiftLock except on Mac, where it does nothing. So there is effectively only ^a and ^A, etc. Looking as the Get New Keys dialog, the Basic Key Binding Entry pane says "New keys .." plural, but as far as I

[issue21530] Integer overflow in strop

2014-05-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: 5dabc2d2f776 -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue21530] Integer overflow in strop

2014-05-18 Thread Benjamin Peterson
New submission from Benjamin Peterson: (copy paste from security list) """ Integer overflow in strop.expandtabs: Aside: I took a look at python over the weekend as I saw the the Internet Bug Bounty [ https://hackerone.com/python ] are now offering bounties for security bugs + patches for python

[issue20620] Update the min()/max() docs for the new default argument

2014-05-18 Thread Berker Peksag
Changes by Berker Peksag : Removed file: http://bugs.python.org/file34081/issue20620.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue20620] Update the min()/max() docs for the new default argument

2014-05-18 Thread Berker Peksag
Berker Peksag added the comment: Rebased patch. -- versions: +Python 3.5 Added file: http://bugs.python.org/file35291/issue20620_v3.diff ___ Python tracker ___ __

[issue21529] JSON module: reading arbitrary process memory

2014-05-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: http://hg.python.org/cpython/rev/50c07ed1743d http://hg.python.org/cpython/rev/a8facac493ef -- resolution: -> fixed status: open -> closed ___ Python tracker __

[issue21529] JSON module: reading arbitrary process memory

2014-05-18 Thread Benjamin Peterson
New submission from Benjamin Peterson: (Copy paste from the security list) Python 2 and 3 are susceptible to arbitrary process memory reading by a user or adversary due to a bug in the _json module caused by insufficient bounds checking. The sole prerequisites of this attack are that the attack

[issue6671] webbrowser doesn't respect xfce default browser

2014-05-18 Thread Berker Peksag
Berker Peksag added the comment: Attaching a patch that checks both XDG_CURRENT_DESKTOP and DESKTOP_SESSION env vars for XFCE. -- nosy: +berker.peksag stage: test needed -> patch review versions: +Python 3.5 -Python 3.2, Python 3.3 Added file: http://bugs.python.org/file35290/issue6671.

[issue21528] Fix a number of typos in the documentation

2014-05-18 Thread Alex Gaynor
New submission from Alex Gaynor: Attached patch is against the default branch, and fixes a number of typos. -- assignee: docs@python components: Documentation files: typos.diff keywords: needs review, patch messages: 218769 nosy: alex, docs@python priority: normal severity: normal status

[issue21525] Accept lists in Tkinter

2014-05-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Sounds like a good idea to me. The code looks pretty straightforward as far as I understood it. -- ___ Python tracker ___ _

[issue19866] tests aifc, sunau and wave failures on a fresh Win64 installation

2014-05-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5318bf3e70a6 by Benjamin Peterson in branch '2.7': include test data in the windows installer, so tests don't fail (closes #19866) http://hg.python.org/cpython/rev/5318bf3e70a6 -- nosy: +python-dev resolution: -> fixed stage: -> resolved s

[issue19866] tests aifc, sunau and wave failures on a fresh Win64 installation

2014-05-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: I applied the patch to my release branch, so it will make it into 2.7.7 final. -- ___ Python tracker ___

[issue9673] Entry Widget Not Editable under Windows XP

2014-05-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: The reverenced post did not give a runnable minimal example with the claimed bug, but only described more complex code at a now dead link. The following from http://effbot.org/tkinterbook/entry.htm works on my Win7 machine. import tkinter as tk master = tk.Tk(

[issue21518] Expose RegUnloadKey in winreg

2014-05-18 Thread Claudiu.Popa
Claudiu.Popa added the comment: Thanks. Here's the updated version. Also, I only tested it on Windows 8.1. I'll try to find another machine with an older OS for testing it. -- Added file: http://bugs.python.org/file35288/issue21518_1.patch ___ Python

[issue21527] concurrent.futures.ThreadPoolExecutor does not use a default value

2014-05-18 Thread Claudiu.Popa
New submission from Claudiu.Popa: As the title says, ThreadPoolExecutor does not use a default value for max_workers parameter, as ProcessPoolExecutor does. When the user does not care about the number of workers and wants only for something to run in background, he has to write code like this

[issue21145] Add the @cached_property decorator

2014-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Will that implementation cause a memory leak? Won't the lru_cache have > a dict mapping {self: result}, meaning that `self` will live forever, > instead of storing result in self.__dict__, where the lifetimes are > correct. Oh, you're right. Sorry for the nois

[issue21145] Add the @cached_property decorator

2014-05-18 Thread Alex Gaynor
Alex Gaynor added the comment: Will that implementation cause a memory leak? Won't the lru_cache have a dict mapping {self: result}, meaning that `self` will live forever, instead of storing result in self.__dict__, where the lifetimes are correct. -- nosy: +alex _

[issue21145] Add the @cached_property decorator

2014-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Does this work for you? >>> class X: ... @property ... @functools.lru_cache(None) ... def get_x(self): ... print("computing") ... return 5 ... >>> x = X() >>> x.get_x computing 5 >>> x.get_x 5 -- nosy: +pitrou, serhiy.storchaka _

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-18 Thread Brett Cannon
Brett Cannon added the comment: Here is an implementation of importlib.util.module_from_spec(). With this it makes PEP 451 conceptually work like: spec = importlib.util.find_spec(name) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) About the only other thi

[issue21518] Expose RegUnloadKey in winreg

2014-05-18 Thread eryksun
eryksun added the comment: ctypes LibraryLoader instances cache CDLL/WinDLL instances, which cache function pointers. Using the global ctypes.cdll and ctypes.windll loaders can lead to conflicting definitions for restype, argtypes, and errcheck. I suggest using a private LibraryLoader in windo

[issue21518] Expose RegUnloadKey in winreg

2014-05-18 Thread Claudiu.Popa
Claudiu.Popa added the comment: This version of the patch skips the test if the privileges can't be acquired. -- Added file: http://bugs.python.org/file35285/issue21518.patch ___ Python tracker

[issue20483] Missing network resource checks in test_urllib2 & test_smtplib

2014-05-18 Thread Berker Peksag
Berker Peksag added the comment: I couldn't reproduce it either. I also tried related urllib and urllib2 tests: - test_urllib (passed) - test_urllibnet (skipped - Use of the 'network' resource not enabled) - test_urllib_response (passed) - test_urllib2net (skipped - Use of the 'network' resource

[issue21526] Support new booleans in Tkinter

2014-05-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Recent Tcl versions (since 8.5) no longer use internal "boolean" type. Instead they use "booleanString" type (but looks as only internally). Here is a patch which add support for "booleanString" Tcl type in case when it leaks to user. There are no any new

[issue21507] memory used by frozenset created from set differs from that of frozenset created from other iterable

2014-05-18 Thread STINNER Victor
STINNER Victor added the comment: I restore the original title, my title was a mistake. -- title: set and frozenset constructor should use operator.length_hint to guess the size of the iterator -> memory used by frozenset created from set differs from that of frozenset created from oth

[issue19866] tests aifc, sunau and wave failures on a fresh Win64 installation

2014-05-18 Thread Steve Dower
Steve Dower added the comment: FWIW, the installers are about 130kb larger with the files included. -- ___ Python tracker ___ ___ Pyth

[issue19866] tests aifc, sunau and wave failures on a fresh Win64 installation

2014-05-18 Thread Steve Dower
Steve Dower added the comment: I noticed the same thing testing the 2.7.7rc1 installer, so I've got a fix for 2.7.7. The same issue exists for imghdrdata (which was added quite recently, it seems). Patch attached - any concerns? -- keywords: +patch nosy: +benjamin.peterson, steve.dowe

[issue21520] Erroneous zipfile test failure if the string 'bad' appears in pwd

2014-05-18 Thread Ned Deily
Ned Deily added the comment: Testing for "Lib/test/bad" isn't correct either since the test will fail when the tests are run from an installed Python rather than just from a build directory. -- nosy: +ned.deily ___ Python tracker

[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan ___ Python tracker ___ ___ Python-bugs-l

[issue21145] Add the @cached_property decorator

2014-05-18 Thread Daniel Greenfeld
Daniel Greenfeld added the comment: For what it's worth, I just released cached-property on PyPI and someone suggested I join the discussion here. Package: https://pypi.python.org/pypi/cached-property Repo: https://github.com/pydanny/cached-property Notes: * 92% test coverage, albeit with a

[issue9673] Entry Widget Not Editable under Windows XP

2014-05-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue17994] Change necessary in platform.py to support IronPython

2014-05-18 Thread Ian Cordasco
Ian Cordasco added the comment: I missed the fact that the user gave me the information from sys.version: https://stackoverflow.com/questions/16545027/ironpython-error-in-url-request?noredirect=1#comment23847257_16545027 I'll throw together a failing test with this and run it against 2.7, and t

[issue21495] Sane default for logging config

2014-05-18 Thread Thomas Guettler
Thomas Guettler added the comment: Just for the record. Here are the discussions about this topic on the python-ideas mailing list: https://mail.python.org/pipermail/python-ideas/2014-May/027839.html https://mail.python.org/pipermail/python-ideas/2014-May/027858.html --

[issue16840] Tkinter doesn't support large integers

2014-05-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue21525] Accept lists in Tkinter

2014-05-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: There is very common error when user pass list instead tuple to Tkinter. Some functions accept both tuple and list, some functions reject list, but many functions silently convert non-tuple value to str (e.g. [1, 2] -> '[1, 2]' instead of expected Tcl repr

[issue21520] Erroneous zipfile test failure if the string 'bad' appears in pwd

2014-05-18 Thread Larry Hastings
Larry Hastings added the comment: Here's an eye-wateringly-thorough description of the bug for the sake of posterity. The test code in question is test_write_filtered_python_package() in Lib/test/test_zipfile.py. This function uses PyZipFile to build a zipfile from the contents of the "Lib/

[issue21430] Document ssl.pending()

2014-05-18 Thread Bas Wijnen
Bas Wijnen added the comment: Alexey: please be more civil. Antoine: In that case, can you please explain how you would recommend me to implement my use case, where most of my calls are master-initiated and blocking, but some slave-initiated events must be non-blocking? Should I make a lot o

[issue21386] ipaddress.IPv4Address.is_global not implemented

2014-05-18 Thread Roger Luethi
Roger Luethi added the comment: New patch includes tests. Lightly tested with Python 3.4 (because trunk doesn't build for me right now): tests fail without patch, pass with patch. Patch re-diffed against trunk. -- Added file: http://bugs.python.org/file35281/ipv4addr_global2-hg.diff

[issue16840] Tkinter doesn't support large integers

2014-05-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch synchronized with tip and fixed support of Tcl <8.5. -- Added file: http://bugs.python.org/file35280/tkinter_bignum_3.patch ___ Python tracker _

[issue21524] Allowing to pass pathlib.Path object in mimetypes.guess_type function

2014-05-18 Thread jorispilot
Changes by jorispilot : -- components: Library (Lib) nosy: jorispilot priority: normal severity: normal status: open title: Allowing to pass pathlib.Path object in mimetypes.guess_type function type: enhancement versions: Python 3.4 ___ Python tracker

[issue21523] quadratic-time compilation in the number of 'and' or 'or' expressions

2014-05-18 Thread Andrew Dalke
New submission from Andrew Dalke: Python's compiler has quadratic-time time behavior based on the number of "and" or "or" expressions. A profile shows that stackdepth_walk is calling itself in a stack at least 512 levels deep. (My profiler doesn't go higher than that.) I've reduced it to a sim

[issue21522] Add more tkinter tests

2014-05-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch which adds tests for Listbox.itemconfigure(), PanedWindow.paneconfigure() and several tests for Menu.entryconfigure(). -- assignee: serhiy.storchaka components: Tests, Tkinter files: test_tkinter_configure.patch keywords: patch messa

[issue13916] disallow the "surrogatepass" handler for non utf-* encodings

2014-05-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have no opinion. -- assignee: serhiy.storchaka -> ___ Python tracker ___ ___ Python-bugs-list m

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-18 Thread STINNER Victor
STINNER Victor added the comment: (Oops, I made a mistake, the hardcoded constant was still present in my patch 2.) Patch 3 uses tempfile._O_TMPFILE_WORKS variable to check if the O_TMPFILE flag is avaialble and works. Use "os.O_TMPFILE = 0o2000 | os.O_DIRECTORY" to try my patch with glib

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-18 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file35276/tempfile_o_tmpfile2.patch ___ Python tracker ___ ___ Python-bugs-li

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-05-18 Thread STINNER Victor
STINNER Victor added the comment: tempfile_o_tmpfile2.patch: Updated patch to handle OS errors. I'm not sure that __O_TMPFILE has the same value on all architectures. The O_TMPFILE flag was added to fcntl.h in the glibc 2.19 (released the 8 Feb 2014): https://sourceware.org/git/?p=glibc.git;a=

[issue21430] Document ssl.pending()

2014-05-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not intending to document the pending() method. Apparently the only people wanting to use it are/were confused about how exactly to write non-blocking SSL code, which is not a good hint. -- resolution: -> wont fix stage: -> resolved status: open

[issue21521] Tkinter + OSX + Spaces : Multiple file dialogues created

2014-05-18 Thread Ned Deily
Changes by Ned Deily : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue21521] Tkinter + OSX + Spaces : Multiple file dialogues created

2014-05-18 Thread rovf
New submission from rovf: I'm running this on OSX 10.6 (SnowLeopard) with the OSX "Spaces" feature enabled (i.e. several virtual desktops). This is my (complete) program: from tkinter.filedialog import asksaveasfilename pathname=asksaveasfilename(initialdir='.',title='gaga') This has the foll

[issue21520] Erroneous zipfile test failure if the string 'bad' appears in pwd

2014-05-18 Thread Georg Brandl
Changes by Georg Brandl : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p