[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-10-14 Thread Brett Cannon
Brett Cannon added the comment: Xiang is right about why this doesn't work. If you would like to propose a patch to update the wording of the docs, Douglas, we could then consider applying it. It could be as simple as just adding "(e.g. the load for namespace packages does not implement

[issue28425] Python3 ignores __init__.py that are links to /dev/null

2016-10-14 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> test needed versions: +Python 3.6, Python 3.7 -Python 3.4 ___ Python tracker ___

[issue28436] GzipFile doesn't properly handle short reads and writes on the underlying stream

2016-10-14 Thread Martin Panter
Martin Panter added the comment: I would fix the documentation to say the underlying stream should do “exact” reads and writes, e.g. one that implements io.BufferedIOBase.read(size) or write(). In my experience, most APIs in Python’s library assume or require this, rather than the “raw”

[issue28425] Python3 ignores __init__.py that are links to /dev/null

2016-10-14 Thread Brett Cannon
Brett Cannon added the comment: Since /dev/null is not a file according to os.path.isfile(), I'm going to close this as not a bug. And to answer Antti's question, it's because the semantics come from the original C code where EAFP is not pleasant. -- nosy: +brett.cannon resolution:

[issue28396] Remove *.pyo references from man page

2016-10-14 Thread Brett Cannon
New submission from Brett Cannon: The patch LGTM. -- assignee: docs@python -> brett.cannon nosy: +brett.cannon versions: +Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

Re: trying to make a simple program help please :)

2016-10-14 Thread BartC
On 14/10/2016 19:53, LongHairLuke wrote: Den fredag 14 oktober 2016 kl. 20:30:20 UTC+2 skrev MRAB: On 2016-10-14 19:11, LongHairLuke wrote: Hi, l l am trying to make a simple guess program. This is my script: def main(): print ("Guess a letter between a and e") randomNumber = b

[issue28403] Porting guide: disabling & warning on implicit unicode conversions

2016-10-14 Thread Brett Cannon
Brett Cannon added the comment: If a new codec gets added to 2.7 then I'm fine with the proposed change. -- ___ Python tracker ___

[issue28415] PyUnicode_FromFromat interger format handling different from printf about zeropad

2016-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: I presume that PyUnicode_FromFormat is responsible for the first of the following: >>> '%010.5d' % 100 '000100' >>> b'%010.5d' % 100 b'000100' I am strongly of the opinion that the behavior should be left alone and the C-API doc changed by either 1)

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2016-10-14 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: docs@python -> brett.cannon ___ Python tracker ___

[issue28411] Eliminate PyInterpreterState.modules.

2016-10-14 Thread Brett Cannon
Brett Cannon added the comment: As Nick pointed out, PyInterpreterState's fields are private so do what you want. :) -- ___ Python tracker ___

[issue28443] Logger methods never use kwargs

2016-10-14 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: In your patch, there is an assignation to self.kwargs = kwargs but you don't use it into your code. Maybe with inheritance ? -- nosy: +matrixise ___ Python tracker

Re: Without compilation, how to find bugs?

2016-10-14 Thread BartC
On 14/10/2016 01:59, sohcahto...@gmail.com wrote: On Thursday, October 13, 2016 at 4:06:36 PM UTC-7, pozz wrote: Are the things exactly how I understood, or do I miss something in Python? As others have said, user a linter. With Python you're supposed to just be able run any source code

[issue8376] Tutorial offers dangerous advice about iterators: “__iter__() can just return self”

2016-10-14 Thread Anders Kaseorg
Anders Kaseorg added the comment: Usui, this is a tutorial intended for beginners. Even if the change from “most” to “built-in” were a relevant one (and I don’t see how it is), beginners cannot possibly be expected to parse that level of meaning out of a single word. The difference between

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-10-14 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list

Re: How to process syntax errors

2016-10-14 Thread Pierre-Alain Dorange
wrote: > Steve, You are absolutely right. I am trying to eliminate the method of > using parenthesis while calling in my file. Especially when I call it > from a instance. Then write a simple interpreter. You want to change the language syntax, as said previously, do

Re: how to send a json of yield list

2016-10-14 Thread meInvent bbird
succeed to run, is it the yield return the whole list 2000 * 2000 * 2000 items? as i know that yield is return [1,1,1] etc one by one once it get if it return 2000*2000*2000 items, why? i have to add a queue get this yield in order to succeed but i do not understand the situation when using

[issue8376] Tutorial offers dangerous advice about iterators: “__iter__() can just return self”

2016-10-14 Thread loic rowe
loic rowe added the comment: I don't disapprove the proposal on the need to have an explanation on the difference between a container and an iterator. But I was unable to found in the documentation a proper definition of a container. -- ___ Python

[issue8376] Tutorial offers dangerous advice about iterators: “__iter__() can just return self”

2016-10-14 Thread Usui
Usui added the comment: My proposal for this documentation point is to get rid off the word "most" and to replace it with "built-in". Since it will remove the misleading idea that this paragraph can explain how you can write a containers. -- keywords: +patch nosy: +Usui Added file:

Re: Without compilation, how to find bugs?

2016-10-14 Thread Chris Angelico
On Fri, Oct 14, 2016 at 8:04 PM, BartC wrote: > On 14/10/2016 01:59, sohcahto...@gmail.com wrote: >> >> On Thursday, October 13, 2016 at 4:06:36 PM UTC-7, pozz wrote: > > >>> Are the things exactly how I understood, or do I miss something in >>> Python? >> >> >> As others have

[issue28439] Remove redundant checks in PyUnicode_EncodeLocale

2016-10-14 Thread Xiang Zhang
Changes by Xiang Zhang : -- components: Interpreter Core files: PyUnicode_EncodeLocale.patch keywords: patch nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Remove redundant checks in

[issue28435] test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env

2016-10-14 Thread Łukasz Langa
Changes by Łukasz Langa : -- versions: +Python 3.6 ___ Python tracker ___ ___

Re: how to use pycallgraph in ubuntu and window?

2016-10-14 Thread meInvent bbird
succeed to draw graph, thanks originally i think pip install graphviz is enough then search again there is an win32 executable file graphviz need to be install On Friday, October 14, 2016 at 2:58:48 PM UTC+8, dieter wrote: > meInvent bbird writes: > > > i install in

[issue28092] Build failure for 3.6 on Centos 5.11

2016-10-14 Thread Robin Becker
Robin Becker added the comment: Hi njs, my manylinux diffs https://www.reportlab.com/media/manylinux-diff.txt full output of the docker command docker build -f Dockerfile-x86_64 -t rl/manylinux-x86_64 . &> ~/tmp/ttt https://www.reportlab.com/media/manylinux-docker-run-output.txt the end

Re: how to send a json of yield list

2016-10-14 Thread meInvent bbird
when not to use queue, it is faster now while True: for ii in getcombinations(): item = ii print(item) sock.send(json.dumps(ii)) On Friday, October 14, 2016 at 5:11:35 PM UTC+8, meInvent bbird wrote: > succeed to run, > > is it the yield return the whole

[issue28427] WeakValueDictionary next bug (with multithreading)

2016-10-14 Thread Armin Rigo
Armin Rigo added the comment: I'll admit I don't know how to properly fix this issue. What I came up with so far would need an atomic compare_and_delete operation on the dictionary self.data, so that we can do atomically: +elif self.data[wr.key] is wr:

[issue28442] tuple(a list subclass) does not iterate through the list

2016-10-14 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___

[issue28442] tuple(a list subclass) does not iterate through the list

2016-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: (Siming, when you post a mixture of code and output, please comment out output with # so the example can be run as is.) I cannot reproduce the difference reported. I added #s and ran the cut and pasted code (uploaded) on 2.7, 3.5, and 3.6 installed on Win

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-10-14 Thread Martin Panter
Martin Panter added the comment: Just some minor comments on aix-library.161004.patch: Instead of _util.py, I wonder if the new file should have a different name, like _util_common.py, to avoid being too similar to util.py. +def get_shared(input): +"""Internal support function: examine

Re: Without compilation, how to find bugs?

2016-10-14 Thread sohcahtoa82
On Friday, October 14, 2016 at 5:46:14 AM UTC-7, Steve D'Aprano wrote: > On Fri, 14 Oct 2016 08:04 pm, BartC wrote: > > > On 14/10/2016 01:59, sohcahto...@gmail.com wrote: > >> On Thursday, October 13, 2016 at 4:06:36 PM UTC-7, pozz wrote: > > > >>> Are the things exactly how I understood, or do

Re: How to sort this without 'cmp=' in python 3?

2016-10-14 Thread Robin Koch
Am 15.10.2016 um 01:33 schrieb 38016226...@gmail.com: nums=['3','30','34','32','9','5'] I need to sort the list in order to get the largest number string: '953433230' nums.sort(cmp=lambda a,b: cmp(a+b, b+a), reverse=True) But how to do this in python 3?

How to sort this without 'cmp=' in python 3?

2016-10-14 Thread 380162267qq
nums=['3','30','34','32','9','5'] I need to sort the list in order to get the largest number string: '953433230' nums.sort(cmp=lambda a,b: cmp(a+b, b+a), reverse=True) But how to do this in python 3? Thank you -- https://mail.python.org/mailman/listinfo/python-list

Re: How to sort this without 'cmp=' in python 3?

2016-10-14 Thread sohcahtoa82
On Friday, October 14, 2016 at 4:35:08 PM UTC-7, 38016...@gmail.com wrote: > nums=['3','30','34','32','9','5'] > I need to sort the list in order to get the largest number string: '953433230' > > nums.sort(cmp=lambda a,b: cmp(a+b, b+a), reverse=True) > > But how to do this in python 3? > >

[issue28442] tuple(a list subclass) does not iterate through the list

2016-10-14 Thread Siming Yuan
Siming Yuan added the comment: my apologies, was in a rush to get it posted. attached a better version of the file. i can reproduce this in python 3.4.1 and python 2.7.8 (both 32 and 64 bit) on RHEL 6.6 however after verifying again - this doesn't seem to be an issue in 3.4.5 (did not

[issue27800] Regular expressions with multiple repeat codes

2016-10-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5f7d7e079e39 by Martin Panter in branch '3.5': Issue #27800: Document limitation and workaround for multiple RE repetitions https://hg.python.org/cpython/rev/5f7d7e079e39 New changeset 1f2ca7e4b64e by Martin Panter in branch '3.6': Issue #27800:

[issue28428] Rename _futures module to _asyncio

2016-10-14 Thread INADA Naoki
INADA Naoki added the comment: > There is also an argument that this should not be a built-in module but > should be separate (like _ctypes). I don't know if that is just a Windows > decision or not, but I'm guessing you weren't the one who made that decision > originally. Issue for another

[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-14 Thread Georgey
Georgey added the comment: I have changed my Username, thanks martin. " But it sounds like you may be closing the socket in one thread, and trying to use it in another thread" -- I do not attempt to "close" it in main thread. Main only detect the connection failure and report the socket

[issue28428] Rename _futures module to _asyncio

2016-10-14 Thread INADA Naoki
INADA Naoki added the comment: Can I commit this patch without NEWS entry? Only notable change is module name, but I don't expect no one import it directly. If it is required, it would be like: - Issue #28428: Rename _futures module to _asyncio. It will have more speedup functions or classes

[issue27800] Regular expressions with multiple repeat codes

2016-10-14 Thread Martin Panter
Martin Panter added the comment: I committed my patch as it was. I understand Silent Ghost’s objection was mainly that they thought the new paragraph or its positioning wouldn’t be very useful, but hopefully it is better than nothing. Perhaps in the future, the documentation could be

[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-14 Thread Martin Panter
Martin Panter added the comment: This indicated to me that the socket object has indeed been closed _before_ you call getpeername(): - print(sock)>>> sock.getpeername()>>> OS.Error[WinError10038]an operation was attempted on something that is not a socket === In this case, I

Re: How to sort this without 'cmp=' in python 3?

2016-10-14 Thread breamoreboy
On Saturday, October 15, 2016 at 12:53:48 AM UTC+1, sohca...@gmail.com wrote: > On Friday, October 14, 2016 at 4:35:08 PM UTC-7, 38016...@gmail.com wrote: > > nums=['3','30','34','32','9','5'] > > I need to sort the list in order to get the largest number string: > > '953433230' > > > >

[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-14 Thread Georgey
Georgey added the comment: "Without code or something demonstrating the bug, I’m pretty sure it is a bug in your program" Here is the main Thread --- mailbox = queue.Queue() while True: #print(addr_groups) unknown_clients=[] for key in yellow_page.keys():

[issue28448] C implemented Future doesn't work on Windows

2016-10-14 Thread INADA Naoki
New submission from INADA Naoki: _WaitCancelFuture in windows_events.py overrides _schedule_callbacks. C implemented Future should allow overriding _schedule_callbacks. Since `{"_future", PyInit__future},` is not in PC/config.c, _future is not registered as builtin module. So Python 3.6b2

[issue28430] asyncio: C implemeted Future cause Tornado test fail

2016-10-14 Thread INADA Naoki
INADA Naoki added the comment: Another test failure is reported. > I have setup a 3.6 build on Travis of our project GNS3 and it seem to fail. > https://travis-ci.org/GNS3/gns3-server/builds/167703118 -- ___ Python tracker

[issue27844] Python-3.6a4 build messages to stderr (on AIX and xlc compiler)

2016-10-14 Thread Martin Panter
Martin Panter added the comment: The warnings about platform-dependent libraries should be suppressed now thanks to Issue 27713. The warnings from Modules/_ctypes/_ctypes_test.c about bitfields are covered by Issue 27643. Can you help with developing the patch? The remaning warnings all seem

[issue28290] BETA report: Python-3.6 build messages to stderr: AIX and "not GCC"

2016-10-14 Thread Martin Panter
Martin Panter added the comment: For the blake problem, I guess the structures may either get laid out incorrectly, or you might be lucky and they will get the desired packing by default. You might have to find if XLC has another way to enable struct packing. Or in the worst case, rewrite the

[issue28428] Rename _futures module to _asyncio

2016-10-14 Thread Yury Selivanov
Yury Selivanov added the comment: No news entry is necessary for this. -- ___ Python tracker ___ ___

[issue27825] Make the documentation for statistics' data argument clearer.

2016-10-14 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Updated patch based on feedback. Steven, I removed the example of median_grouped using Fractions. Would you be able to suggest better examples to be added in the docs? I also noticed that there are more examples of median_grouped in the paragraph below.

[issue28092] Build failure for 3.6 on Centos 5.11

2016-10-14 Thread Robin Becker
Robin Becker added the comment: tds333, the config says that 4.8.2 is being used, configure:3902: gcc --version >&5 gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15) Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty;

[issue28428] Rename _futures module to _asyncio

2016-10-14 Thread INADA Naoki
INADA Naoki added the comment: I found _futures module is not used on Windows for now (without this patch). Because `{"_future", PyInit__future},` is not in PC/config.c But, when it added, test_windows_events cause infinite loop. This should be another issue. With this

Re: TCL/TK as default UI toolkit, and wayland

2016-10-14 Thread kerbingamer376
On Friday, October 14, 2016 at 12:40:53 PM UTC+1, kerbingamer376 wrote: > Python's "standard" (and bundled on most platforms) UI tookkit is TCL/TK. > However, this has A LOT of drawbacks: > > * It's eyesore on a lot of platforms > * It's non-pythonic > * It just flat out fails on some desktop

Namespace for timeit

2016-10-14 Thread ROGER GRAYDON CHRISTMAN
Trying to use timeit within a function: def test(name, sorter, size): """Tests and times the sorting algorithm on given array size""" print(name,end='\t') array = [0]*size for i in range(size): array[i] = randrange(20) timeit('sorter( array, size )', number=1)

[issue26617] Assertion failed in gc with __del__ and weakref

2016-10-14 Thread STINNER Victor
STINNER Victor added the comment: > Would be nice if 3.4 could also be patched, not just 3.5 and 3.6, since > python in EPEL currently is python34-3.4.3-7.el7.x86_64. The patch can be > applied without conflict and resolves some serious cases of segfaults. Sorry but Python 3.4 is not more

[issue28092] Build failure for 3.6 on Centos 5.11

2016-10-14 Thread Wolfgang Langner
Wolfgang Langner added the comment: Also verified on CentOS 6.8 with devtoolset2 installed, gcc 4.8.2 Python 3.6b2 builds fine, all unittest ok. This is the same devtoolset as used on CentOS 5 manylinux1. Have no CentOS 5 VM available to do more tests. But gcc 4.8 is able to build Python 3.6.

Re: TCL/TK as default UI toolkit, and wayland

2016-10-14 Thread kerbingamer376
Python's "standard" (and bundled on most platforms) UI tookkit is TCL/TK. However, this has A LOT of drawbacks: * It's eyesore on a lot of platforms * It's non-pythonic * It just flat out fails on some desktop environments * On linux it requires X, however lots of distros are now using wayland

Re: Without compilation, how to find bugs?

2016-10-14 Thread Steve D'Aprano
On Fri, 14 Oct 2016 08:04 pm, BartC wrote: > On 14/10/2016 01:59, sohcahto...@gmail.com wrote: >> On Thursday, October 13, 2016 at 4:06:36 PM UTC-7, pozz wrote: > >>> Are the things exactly how I understood, or do I miss something in >>> Python? >> >> As others have said, user a linter. > >

[issue28441] sys.executable is ambiguous on Cygwin without .exe suffix

2016-10-14 Thread Erik Bray
New submission from Erik Bray: This actually came up previously in #1543469 in the context of test_subprocess, but it's a more general issue that I thought was worth addressing somehow. The issue here is that as Cygwin tries to provide a "UNIX-like" experience, any system interfaces that take

[issue26617] Assertion failed in gc with __del__ and weakref

2016-10-14 Thread Frens Jan Rumph
Frens Jan Rumph added the comment: Would be nice if 3.4 could also be patched, not just 3.5 and 3.6, since python in EPEL currently is python34-3.4.3-7.el7.x86_64. The patch can be applied without conflict and resolves some serious cases of segfaults. -- nosy: +Frens Jan Rumph

Re: TCL/TK as default UI toolkit, and wayland

2016-10-14 Thread Chris Warrick
On 14 October 2016 at 13:40, kerbingamer376 wrote: > Python's "standard" (and bundled on most platforms) UI tookkit is TCL/TK. > However, this has A LOT of drawbacks: > > * It's eyesore on a lot of platforms > * It's non-pythonic > * It just flat out fails on some desktop

[issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux

2016-10-14 Thread Benny K J
New submission from Benny K J: When cross compiling Python for ARM many of the extension modules are not build However when compiling for the native platform the extension modules are properly build. Cross Compilation Steps === CONFIG_SITE=config.site

[issue28092] Build failure for 3.6 on Centos 5.11

2016-10-14 Thread Wolfgang Langner
Wolfgang Langner added the comment: Please check if you have enabled the compiler as default by enabling the devtoolset on CentOS 5. I have compiled Python 3.6b2 on Ubuntu 14.04 with gcc 4.8.4 without any problems. Therefore gcc 4.8.2 should not be that different. Also keep in mind the

[issue28443] Logger methods never use kwargs

2016-10-14 Thread R. David Murray
Changes by R. David Murray : -- nosy: +vinay.sajip ___ Python tracker ___ ___

[issue28443] Logger methods never use kwargs

2016-10-14 Thread Jordan Brennan
Changes by Jordan Brennan : -- components: +Library (Lib) ___ Python tracker ___ ___

[issue15100] Race conditions in shutil.copy, shutil.copy2 and shutil.copyfile

2016-10-14 Thread Julien Muchembled
Changes by Julien Muchembled : -- nosy: +jm ___ Python tracker ___ ___ Python-bugs-list

[issue28442] tuple(a list subclass) does not iterate through the list

2016-10-14 Thread Siming Yuan
Changes by Siming Yuan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list

[issue13322] buffered read() and write() does not raise BlockingIOError

2016-10-14 Thread Evgeny Kapun
Changes by Evgeny Kapun : -- nosy: +abacabadabacaba ___ Python tracker ___ ___

[issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux

2016-10-14 Thread Benny K J
Changes by Benny K J : -- type: -> compile error ___ Python tracker ___ ___

Different behaviour of regexp in 3.6.0b2

2016-10-14 Thread Lele Gaifax
Hi all, trying out pgcli with Python 3.6.0b2 I got an error related to what seem a different behaviour, or even a bug, of re.sub(). The original intent is to replace spaces within a string with the regular expression \s+ (see

[issue28443] Logger methods never use kwargs

2016-10-14 Thread Jordan Brennan
Changes by Jordan Brennan : -- components: -Argument Clinic ___ Python tracker ___

Re: TCL/TK as default UI toolkit, and wayland

2016-10-14 Thread Michael Torrie
On 10/14/2016 05:40 AM, kerbingamer376 wrote: > Python's "standard" (and bundled on most platforms) UI tookkit is TCL/TK. > However, this has A LOT of drawbacks: > > * It's eyesore on a lot of platforms I thought this was largely solved in recent versions of Tcl/Tk that use the new Tile widget

[issue28430] asyncio: C implemeted Future cause Tornado test fail

2016-10-14 Thread Марк Коренберг
Changes by Марк Коренберг : -- nosy: +mmarkk ___ Python tracker ___ ___

Re: Without compilation, how to find bugs?

2016-10-14 Thread breamoreboy
On Friday, October 14, 2016 at 12:06:36 AM UTC+1, pozz wrote: > I come from the C language, that is a compiled and strongly typed > language. Python is compiled and dynamically and strongly typed but C is compiled and statically and weakly typed. > > All the tricks have a common goal: to

[issue28440] pip failures on macOS Sierra

2016-10-14 Thread R. David Murray
Changes by R. David Murray : -- components: +Macintosh nosy: +ned.deily, ronaldoussoren ___ Python tracker ___

[issue28442] tuple(a list subclass) does not iterate through the list

2016-10-14 Thread Siming Yuan
New submission from Siming Yuan: if you subclass a list, and cast it to tuple, the casting does not iterate through the list. (casing to list does) for example, i needed a WeakList where the list only internally contains WeakReferences that gets deleted as soon as the object ref count goes to

[issue28443] Logger methods never use kwargs

2016-10-14 Thread Jordan Brennan
New submission from Jordan Brennan: The methods on the Logger class e.g. logger.debug all accept **kwargs, these are passed to the _log method but they are never used. If _log attached them as an attribute to the LogRecord object, it would allow for creation of more powerful Filter objects to

[issue28437] Class definition is not consistent with types.new_class

2016-10-14 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list

[issue28442] tuple(a list subclass) does not iterate through the list

2016-10-14 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___

PyDev 5.3.0 Released

2016-10-14 Thread Fabio Zadrozny
Release Highlights: --- * **Important** PyDev now requires Java 8 and Eclipse 4.5 onwards. * PyDev 4.5.5 is the last release supporting Java 7 and Eclipse 3.8. * See: update sites page for the update site of older versions of PyDev. * See: the **PyDev does

Re: How to sort this without 'cmp=' in python 3?

2016-10-14 Thread Ben Finney
38016226...@gmail.com writes: > nums=['3','30','34','32','9','5'] > I need to sort the list in order to get the largest number string: '953433230' > nums.sort(cmp=lambda a,b: cmp(a+b, b+a), reverse=True) For demonstration, I'll re-write this such that the names and output make more sense::

Re: How to sort this without 'cmp=' in python 3?

2016-10-14 Thread Ned Batchelder
On Friday, October 14, 2016 at 7:49:33 PM UTC-4, Robin Koch wrote: > Am 15.10.2016 um 01:33 schrieb 38016226...@gmail.com: > > nums=['3','30','34','32','9','5'] > > I need to sort the list in order to get the largest number string: > > '953433230' > > > > nums.sort(cmp=lambda a,b: cmp(a+b, b+a),

[issue28435] test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env

2016-10-14 Thread Martin Panter
Martin Panter added the comment: The test tries using ProxyHandler directly. It looks like that handler intentionally ignores the request if it matches no_proxies (Issue 6894), so I think Piotr’s approach of adjusting the tests is correct. The patch looks good to me, though I would drop that

[issue28446] pyvenv generates malformed hashbangs for scripts

2016-10-14 Thread Alex Regueiro
New submission from Alex Regueiro: Quotes around hashbangs are not recognised and are considered invalid syntax, at least on Bash on OS X 10.12. There's really no workaround (that I'm aware of) for paths containing spaces, except maybe symlinking the directory in the path the contains the

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-10-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 402eba63650c by Martin Panter in branch '3.5': Issue #23231: Document codecs.iterencode(), iterdecode() shortcomings https://hg.python.org/cpython/rev/402eba63650c New changeset 0837940bcb9f by Martin Panter in branch '3.6': Issue #23231: Merge

[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-14 Thread George,Y
New submission from George,Y: I need to know the IP address on the other side of a broken TCP/IP connection. "socket.getpeername()" fails to do the job sometimes because the connection has been closed, and Windows Error 10038 tells the connection is no longer a socket so that the method

[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-14 Thread Martin Panter
Martin Panter added the comment: The getpeername() method is just a wrapper around the OS function, so it is not going to work if the socket file descriptor is closed or invalid (-1). You haven’t provided enough code or information for someone else to reproduce the problem. But it sounds like

[issue28445] Wrong documentation for GzipFile.peek

2016-10-14 Thread Martin Panter
Martin Panter added the comment: The peek() method was originally added by Issue 9962, where Antoine was trying to imitate the BufferedReader.peek() API. However because “the number of bytes returned may be more or less than requested”, I never understood what this methods were good for; see

[issue24658] open().write() fails on 2 GB+ data (OS X)

2016-10-14 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: ping -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18235] _sysconfigdata.py wrong on AIX installations

2016-10-14 Thread Martin Panter
Martin Panter added the comment: This is my understanding: We are talking about the code at that switches the values of LDSHARED and/or BLDSHARED. Yes, Michael H. was suggesting to both move and change (revert) back to

Re: Without compilation, how to find bugs?

2016-10-14 Thread sohcahtoa82
On Friday, October 14, 2016 at 2:05:01 AM UTC-7, BartC wrote: > On 14/10/2016 01:59, sohcahto...@gmail.com wrote: > > On Thursday, October 13, 2016 at 4:06:36 PM UTC-7, pozz wrote: > > >> Are the things exactly how I understood, or do I miss something in Python? > > > > As others have said, user

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-10-14 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue28438] Wrong link in pkgutil.get_data doc

2016-10-14 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue28438] Wrong link in pkgutil.get_data doc

2016-10-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7fb90c4ae643 by Senthil Kumaran in branch '3.5': Issue28438 - Fix the link for pkgutil.get_data doc. Patch contributed by Xiang Zhang. https://hg.python.org/cpython/rev/7fb90c4ae643 New changeset f2110f41012e by Senthil Kumaran in branch '3.6':

[issue28438] Wrong link in pkgutil.get_data doc

2016-10-14 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Senthil. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

Can't pickle : attribute lookup __builtin__.gen erator failed

2016-10-14 Thread meInvent bbird
Traceback (most recent call last): File "C:\Python27\lib\multiprocessing\queues.py", line 262, in _feed send(obj) PicklingError: Can't pickle : attribute lookup __builtin__.gen erator failed #python pusher.py tcp://*:8080 import sys import time import zmq from multiprocessing import Queue

[issue28432] Fix doc of PyUnicode_EncodeLocale

2016-10-14 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- nosy: +orsenthil ___ Python tracker ___ ___

Re: how to send a json of yield list

2016-10-14 Thread dieter
meInvent bbird writes: > after google a several solutions, > First method i searched has memory error > sock.send(json.dumps(StreamArray())) > Traceback (most recent call last): > File "pusher.py", line 43, in > sock.send(json.dumps(StreamArray())) > ... >

Re: how to use pycallgraph in ubuntu and window?

2016-10-14 Thread dieter
meInvent bbird writes: > i install in ubunbu 14 > > pip install graphviz > pip install pycallgraph > > martin@ubuntu:~/Downloads$ pycallgraph graphviz -- ./pusher.py > Traceback (most recent call last): > ... > pycallgraph.exceptions.PyCallGraphException: The command "dot"

Re: Python-based monads essay (Re: Assignment versus binding)

2016-10-14 Thread Rustom Mody
On Friday, October 14, 2016 at 10:31:36 AM UTC+5:30, Marko Rauhamaa wrote: > Gregory Ewing : > > > Marko Rauhamaa wrote: > >> This suggests even the promoters of functional programming > >> intuitively prefer imperative programming, but that's ok as long as > >> it's all functional under the

[issue28443] Logger methods never use kwargs

2016-10-14 Thread Vinay Sajip
Vinay Sajip added the comment: Those signatures have **kwargs for potential extension of the logging API itself (without extending the existing argument list), not for passing arguments to filters. You can already filter completely flexibly by passing additional values in the "extra"

[issue28092] Build failure for 3.6 on Centos 5.11

2016-10-14 Thread Ned Deily
Ned Deily added the comment: "while non-static inline has problems with the default compilers on both CentOS 5 and OS X." The changes introduced in 3.6 prevent compilation with gcc4.0 which was the default Apple-supplied compiler on Mac OS X 10.4 (Tiger). 3.6 currently compiles correctly

Re: Different behaviour of regexp in 3.6.0b2

2016-10-14 Thread Chris Angelico
On Sat, Oct 15, 2016 at 4:12 AM, Ned Batchelder wrote: > There doesn't seem to be a change to string literals at all. It's only a > change in the regex engine. > > Python 3.6.0b2 (default, Oct 10 2016, 21:30:05) > [GCC 4.2.1 Compatible Apple LLVM 7.0.2

  1   2   >