[issue18654] modernize mingwcygwin compiler classes

2014-08-03 Thread Roumen Petrov

Changes by Roumen Petrov bugtr...@roumenpetrov.info:


Added file: 
http://bugs.python.org/file36218/0011-MINGW-compiler-customize-mingw-cygwin-compilers.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18654
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17148] mingw: nt thread model detection

2014-08-03 Thread Roumen Petrov

Changes by Roumen Petrov bugtr...@roumenpetrov.info:


Added file: 
http://bugs.python.org/file36219/0001-MINGW-issue17148-nt-thread-model-detection.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17148
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17596] mingw: add wincrypt.h in Python/random.c

2014-08-03 Thread Roumen Petrov

Changes by Roumen Petrov bugtr...@roumenpetrov.info:


Added file: 
http://bugs.python.org/file36220/0006-MINGW-add-wincrypt.h-in-Python-random.c.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17596
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17597] mingw: add $srcdir/PC to CPPFLAGS

2014-08-03 Thread Roumen Petrov

Changes by Roumen Petrov bugtr...@roumenpetrov.info:


Added file: 
http://bugs.python.org/file36221/0007-MINGW-add-srcdir-PC-to-CPPFLAGS.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17597
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17599] mingw: detect REPARSE_DATA_BUFFER

2014-08-03 Thread Roumen Petrov

Changes by Roumen Petrov bugtr...@roumenpetrov.info:


Added file: 
http://bugs.python.org/file36222/0009-MINGW-detect-REPARSE_DATA_BUFFER.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17599
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17602] mingw: default sys.path calculations for windows platforms

2014-08-03 Thread Roumen Petrov

Changes by Roumen Petrov bugtr...@roumenpetrov.info:


Added file: 
http://bugs.python.org/file36223/0012-MINGW-default-sys.path-calculations-for-windows-plat.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17602
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17604] mingw: use main() to start execution

2014-08-03 Thread Roumen Petrov

Changes by Roumen Petrov bugtr...@roumenpetrov.info:


Added file: 
http://bugs.python.org/file36224/0014-MINGW-use-main-to-start-execution.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17604
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18495] mingw: ignore main program for frozen scripts

2014-08-03 Thread Roumen Petrov

Changes by Roumen Petrov bugtr...@roumenpetrov.info:


Added file: 
http://bugs.python.org/file36225/0007-MINGW-ignore-main-program-for-frozen-scripts.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18495
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11395] print(s) fails on Windows with long strings

2014-08-03 Thread STINNER Victor

STINNER Victor added the comment:

This issue is closed. You should reopen it or open a new one.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11395
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18697] Unify arguments names in Unicode object C API documentation

2014-08-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 @Serhiy will you be proposing a patch for this?

No, I am not. I have no opinion what name is better.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18697
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18631] mingw: setup msvcrt and _winapi modules

2014-08-03 Thread Roumen Petrov

Changes by Roumen Petrov bugtr...@roumenpetrov.info:


Added file: 
http://bugs.python.org/file36226/0014-MINGW-setup-msvcrt-and-_winapi-modules.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18631
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21448] Email Parser use 100% CPU

2014-08-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

fix_email_parse.diff is not work when one chunk ends with '\r' and next chunk 
doesn't start with '\n'.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21448
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22122] turtle module examples should all begin from turtle import *

2014-08-03 Thread Mark Summerfield

Mark Summerfield added the comment:

Ah, we're slightly at cross purposes. I showed them purely in terms of the 
procedural API. However, I can see now that I could have begun with:

import turtle
...
jane = turtle.Turtle()
jane.fd(100)

So, to teach their turtle how to go in a square, I guess they'd do:

def square(who, size=100):
for n in range(4):
who.fd(100)
who.rt(90)

square(jane)

That seems reasonable, but then why isn't the first (and only complete) example 
done in this OO-ish style?

Anyway, I've marked this closed and will switch to this approach in future.

Thanks.

--
resolution:  - not a bug
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22122
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-03 Thread Mark Summerfield

Mark Summerfield added the comment:

I changed my suggestion but did so on the mailing list instead of here:

This (importing  using types.SimpleNamespace()) is too much for children ( 
beginners).

But perhaps what I should be asking for is for a new built-in that does what 
types.SimpleNamespace() does, so that without any import you can write, say,

foo = namespace(a=1, b=2)
# or
bar = namespace()
bar.a = 1

where under the hood namespace has the same behavior as types.SimpleNamespace().

Naturally, I understand that adding a new name is a big deal and may be too 
much to ask for beginners. 

I've renamed the issue to reflect this (although I don't know if that will 
work).

Alternatively, I (or someone) could just close the issue as won't fix; it was 
just an idea.

--
title: Make object() behave exactly like types.SimpleNamespace() if given 
kwargs - Provide a direct function for types.SimpleNamespace()

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22126] mc68881 fpcr inline asm breaks clang -flto build

2014-08-03 Thread ivank

New submission from ivank:

Build cpython master with clang -flto results in:

[...]
ar rc libpython3.5m.a Modules/_threadmodule.o  Modules/signalmodule.o  
Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  
Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  
Modules/_functoolsmodule.o  Modules/_operator.o  Modules/_collectionsmodule.o  
Modules/itertoolsmodule.o  Modules/atexitmodule.o  Modules/_stat.o  
Modules/_localemodule.o  Modules/_iomodule.o Modules/iobase.o Modules/fileio.o 
Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o  
Modules/zipimport.o  Modules/faulthandler.o  Modules/_tracemalloc.o 
Modules/hashtable.o  Modules/symtablemodule.o  Modules/xxsubtype.o
ranlib libpython3.5m.a
clang -pthread -flto -B/usr/lib/gold-ld -flto -B/usr/lib/gold-ld -Xlinker 
-export-dynamic -o python Programs/python.o libpython3.5m.a -lpthread -ldl  
-lutil   -lm  
clang -pthread -flto -B/usr/lib/gold-ld -flto -B/usr/lib/gold-ld -Xlinker 
-export-dynamic -o Programs/_testembed Programs/_testembed.o libpython3.5m.a 
-lpthread -ldl  -lutil   -lm  
inline asm:1:10: error: invalid register name
fmove.l %fpcr,36(%rsp)
^
LLVM ERROR: Error parsing inline asm

clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [python] Error 1
make: *** Waiting for unfinished jobs
inline asm:1:10: error: invalid register name
fmove.l %fpcr,36(%rsp)
^
LLVM ERROR: Error parsing inline asm

clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Programs/_testembed] Error 1



My build script was:

#!/bin/bash

# Get clang 3.5 from
# deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main
# deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty main

set -e

sudo ln -sf /usr/lib/llvm-3.5/lib/LLVMgold.so /usr/lib/LLVMgold.so
sudo mkdir -p /usr/lib/bfd-plugins
sudo ln -sf /usr/lib/llvm-3.5/lib/LLVMgold.so /usr/lib/bfd-plugins/LLVMgold.so
grep -Fxq /usr/lib/llvm-3.5/lib /etc/ld.so.conf || (echo /usr/lib/llvm-3.5/lib 
should be in /etc/ld.so.conf  false)
sudo ldconfig

export CC=clang
export CXX=clang++
export CFLAGS=-O3 -flto -B/usr/lib/gold-ld -fomit-frame-pointer
export CXXFLAGS=-O3 -flto -B/usr/lib/gold-ld -fomit-frame-pointer
export LDFLAGS=-flto -B/usr/lib/gold-ld 
make clean || echo Can't make clean
./configure --prefix=/opt/leakless
make -j17


It works fine without the -flto/gold-ld options.

--
components: Interpreter Core
messages: 224613
nosy: ivank
priority: normal
severity: normal
status: open
title: mc68881 fpcr inline asm breaks clang -flto build
type: compile error
versions: Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22126
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18034] Last two entries in the programming FAQ are out of date (import related)

2014-08-03 Thread Wouter van Heyst

Wouter van Heyst added the comment:

The attached patch changes the body of the __import__ faq entry to suggest 
using `importlib.import_module` instead.

--
keywords: +patch
nosy: +larstiq
Added file: http://bugs.python.org/file36227/faq-import_module.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18034
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18631] mingw: setup msvcrt and _winapi modules

2014-08-03 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Roumen, can you please fill out the contributor form?

--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18631
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14910] argparse: disable abbreviation

2014-08-03 Thread Daniel Eriksson

Daniel Eriksson added the comment:

Oh, completely missed comments there too!

I hope I got them all in a good way!

--
Added file: http://bugs.python.org/file36228/issue14910_4.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14910
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14910] argparse: disable abbreviation

2014-08-03 Thread Daniel Eriksson

Daniel Eriksson added the comment:

Sorry for a new patch this close, but just tripple checked the documentation 
and noticed a word to much. Made it more clear hopefully

--
Added file: http://bugs.python.org/file36229/issue14910_5.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14910
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22127] performance regression in socket.getsockaddr()

2014-08-03 Thread Charles-François Natali

New submission from Charles-François Natali:

I noticed that socket.sendto() got noticably slower since 3.4 (at least), 
compared to 2.7:

2.7:
$ ./python -m timeit -s import socket; s = socket.socket(socket.AF_INET, 
socket.SOCK_DGRAM); DATA = b'hello'; TARGET=('127.0.0.1', 4242) 
s.sendto(DATA, TARGET)
10 loops, best of 3: 15.8 usec per loop

3.4:
$ ./python -m timeit -s import socket; s = socket.socket(socket.AF_INET, 
socket.SOCK_DGRAM); DATA = b'hello'; TARGET=('127.0.0.1', 4242) 
s.sendto(DATA, TARGET)
1 loops, best of 3: 25.9 usec per loop

A profile reveals this:
2.7:
 100065 function calls in 2.268 seconds

   Ordered by: cumulative time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
10.3610.3612.2682.268 test_send.py:1(module)
   101.8950.0001.8950.000 {method 'sendto' of 
'_socket.socket' objects}


3.4:
 906015 function calls (905975 primitive calls) in 6.132 seconds

   Ordered by: cumulative time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
  5/10.0000.0006.1326.132 {built-in method exec}
10.3340.3346.1326.132 test_send.py:1(module)
   102.3470.0005.7690.000 {method 'sendto' of 
'_socket.socket' objects}
   101.9910.0003.4110.000 idna.py:147(encode)
   5000860.8940.0000.8940.000 {built-in method len}
   100.2690.0000.2690.000 {method 'encode' of 'str' objects}
   100.2570.0000.2570.000 {method 'split' of 'bytes' 
objects}


As can be seen, it's the IDNA encoding which takes a long time, and doesn't 
appear in the 2.7 profile.
The parsing code (including idna codec) is present in both versions though:

static int
getsockaddrarg(PySocketSockObject *s, PyObject *args,
   struct sockaddr *addr_ret, int *len_ret)
[...]
if (!PyArg_ParseTuple(args, eti:getsockaddrarg,
  idna, host, port))
return 0;


I'm currently bisecting the commit, but I'm not familiar with encoding stuff.
Is it expected that the IDNA encoding be called when passed an ascii string?

--
components: Library (Lib)
messages: 224618
nosy: haypo, loewis, neologix, pitrou
priority: normal
severity: normal
status: open
title: performance regression in socket.getsockaddr()
type: performance
versions: Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22127
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22127] performance regression in socket getsockaddrarg()

2014-08-03 Thread Charles-François Natali

Changes by Charles-François Natali cf.nat...@gmail.com:


--
title: performance regression in socket.getsockaddr() - performance regression 
in socket getsockaddrarg()

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22127
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8548] Building on CygWin 1.7: PATH_MAX redefined

2014-08-03 Thread Roumen Petrov

Roumen Petrov added the comment:

Hi Mark,
#else before is not solution. See  unified diff below as post by Scott Rostrup 
lack definition

Some additional information:
a) move outside #ifdef HAVE_FCNTL_H : definition PATH_MAX is not related to 
control functions on open files (fcntl.h)
b) HAVE_FCNTL_H is defined for MSC build as well. so no impact on other build

--- a/Modules/main.c
+++ b/Modules/main.c
@@ -9,6 +9,8 @@
 #include windows.h
 #ifdef HAVE_FCNTL_H
 #include fcntl.h
+#endif
+#ifndef PATH_MAX
 #define PATH_MAX MAXPATHLEN
 #endif
 #endif
--

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8548
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9665] Buid issues on Cygwin - _curses, _curses_panel, and _io

2014-08-03 Thread Roumen Petrov

Roumen Petrov added the comment:

PATH_MAX in duplicate with issue8548

Instead to modify BASECFLAGS user could configure with CPPFLAGS set if symbolic 
links are missing .
In addition 5.9 package creates links so work around is not required .

Please close as invalid.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9665
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21278] Running the test suite with -v makes the test_ctypes and the test_zipimport erroneously reported as failed

2014-08-03 Thread Wouter van Heyst

Wouter van Heyst added the comment:

Even running `EXTRATESTOPTS='-x test_gdb -uall -v' make testall` I can not 
reproduce this. I'll dig some more in the code for anything suspicious.

--
nosy: +larstiq

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21278
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11763] assertEqual memory issues with large text inputs

2014-08-03 Thread Ezio Melotti

Ezio Melotti added the comment:

The second problem I mentioned in msg134530 got fixed in #18996, making the 
patches on this issue obsolete.
Since the other problem is now tracked in #19217, I'm going to close this.

--
stage: patch review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11763
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21448] Email Parser use 100% CPU

2014-08-03 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Attaching revised patch.  I forgot to reapply splitlines.

--
Added file: http://bugs.python.org/file36230/fix_email_parse2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21448
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21448] Email Parser use 100% CPU

2014-08-03 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Attaching a more extensive test

--
Added file: http://bugs.python.org/file36231/test_parser.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21448
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21448] Email Parser use 100% CPU

2014-08-03 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


Added file: http://bugs.python.org/file36232/fix_prepending.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21448
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21448] Email Parser use 100% CPU

2014-08-03 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


Added file: http://bugs.python.org/file36233/fix_prepending2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21448
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21448] Email Parser use 100% CPU

2014-08-03 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


Removed file: http://bugs.python.org/file36232/fix_prepending.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21448
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2014-08-03 Thread Daniel Eriksson

Daniel Eriksson added the comment:

@Antoine: We have investigated a bit here and it seems that ZFS just keeps a 
timestamp in seconds in the memory.


See function uberblock_update in uberblock.c
( 
http://people.freebsd.org/~gibbs/zfs_doxygenation/html/d3/d65/uberblock_8c_source.html
 - Row 57)
ub-ub_timestamp = gethrestime_sec();

--
nosy: +clearminds

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19838
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21278] Running the test suite with -v makes the test_ctypes and the test_zipimport erroneously reported as failed

2014-08-03 Thread Wouter van Heyst

Wouter van Heyst added the comment:

Ezio also couldn't reproduce this, so unless someone else (ddvento?), can 
reproduce it, I would advocate closing this issue.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21278
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2014-08-03 Thread Daniel Eriksson

Daniel Eriksson added the comment:

After thinking and looking a bit on it, this patch isn't the best to put into 
the code what I can see.

If any of these things really break, because of something completely different 
- we won't notice it.

A more accurate solution is to maybe look on a different way to compare the 
timestamps that works on systems that just support seconds too?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19838
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2014-08-03 Thread Claudiu Popa

Claudiu Popa added the comment:

I agree. The patch was merely a temporary solution to the real problem.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19838
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14910] argparse: disable abbreviation

2014-08-03 Thread Eli Bendersky

Eli Bendersky added the comment:

No worries, Daniel. You should have received an email when comments were posted 
to the review, did you? If you you may want to check your settings in the bug 
tracker.

I left a couple of additional comments on the documentation file, but other 
than that this LGTM.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14910
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22126] mc68881 fpcr inline asm breaks clang -flto build

2014-08-03 Thread Stefan Krah

Stefan Krah added the comment:

If it works without -flto, isn't that a toolchain rather than a Python issue?

--
nosy: +schwab, skrah

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22126
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21448] Email Parser use 100% CPU

2014-08-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

fix_email_parse2.diff slightly changes behavior. See my comments on Rietveld.

As for fix_prepending2.diff, could you please provide any benchmark results?

And there is yet one bug in current code. str.splitlines() splits a string not 
only breaking it at '\r', '\n' or '\r\n', but at any Unicode line break 
character (e.g. '\x85', '\u2028', etc). And when a chunk ends with such line 
break character, it will not break a line. Definitely something should fixed: 
either lines should be broken only at '\r', '\n' or '\r\n', or other line break 
characters should be handled correctly when they happen at the end of the 
chunk. What would you say about this, David?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21448
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22128] patch: steer people away from codecs.open

2014-08-03 Thread Frank van Dijk

New submission from Frank van Dijk:

stackoverflow.com has a zillion answers recommending the use of codecs.open() 
as a unicode capable drop in replacement for open(). This probably means that 
there is still a lot of code being written that uses codecs.open(). That's bad 
thing because of codecs.open()'s lack of newline conversion. A lot of that code 
will 
- have compatibility issues when it is moved between unix and windows
- silently break text files on windows, leading to issues further downstream 
(confusing other tools, messing up revision control histories)

The problem has been fixed with io.open() in 2.x and open() in 3.x. 
Unfortunately the 2.7 unicode HOWTO still recommends the use of codecs.open(). 
The 2.7 and the 3.x documentation of codecs.open() doesn't refer the reader to 
better alternatives.

The attached patches fix that.

The only downside I see is that newly written code that uses the better 
alternatives would be incompatible with 2.5 and older. However croaking on a 
small minority of systems is better than silently disrupting workflows, causing 
platform incompatibilities, and inviting flaky workarounds.

The 2.7 patch makes the unicode HOWTO recommend io.open() instead of 
codecs.open(). Both patches change the codecs.open() documentation to refer to 
io.open() or (on 3.x) open().

Additionally I removed the data loss explanation from codecs.open()'s note 
about its lack of newline conversion. It is not particularly helpful 
information and it is not entirely correct (data loss could also have been 
avoided by doing newline conversion before encoding and after decoding)

--
assignee: docs@python
components: Documentation
files: codecsopen2.patch
keywords: patch
messages: 224632
nosy: Frank.van.Dijk, docs@python
priority: normal
severity: normal
status: open
title: patch: steer people away from codecs.open
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36234/codecsopen2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22128
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22128] patch: steer people away from codecs.open

2014-08-03 Thread Frank van Dijk

Changes by Frank van Dijk fwvd...@gmail.com:


Added file: http://bugs.python.org/file36235/codecsopen3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22128
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22129] Please add an equivalent to QString::simplified() to Python strings

2014-08-03 Thread Tobias Leupold

New submission from Tobias Leupold:

It would be nice if a function equivalent to Qt's QString::simplified() would 
be added to Python's strings (cf. 
http://qt-project.org/doc/qt-4.8/qstring.html#simplified ).

I'm not sure if my approach is good or fast, but I added this function to my 
code like so: http://nasauber.de/blog/T/143/QString_simplified_in_Python

--
components: Interpreter Core
messages: 224633
nosy: l3u
priority: normal
severity: normal
status: open
title: Please add an equivalent to QString::simplified() to Python strings
type: enhancement
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22129
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22128] patch: steer people away from codecs.open

2014-08-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +doerwalter, haypo, lemburg

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22128
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22127] performance regression in socket getsockaddrarg()

2014-08-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

IDNA encoding is quite slow (see 6e1071ed4c66). I'm surprised we accept general 
hosnames in sendto(), though (rather than plain IP addresses). 25 µs per call 
is a lot for such a function.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22127
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15428] add Name Collision section to argparse docs

2014-08-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
type:  - enhancement
versions: +Python 3.5 -Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15428
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20135] FAQ need list mutation answers

2014-08-03 Thread Ezio Melotti

Ezio Melotti added the comment:

Here is a new patch that includes an additional paragraph about mutation and 
non-mutation operations.

--
Added file: http://bugs.python.org/file36236/issue20135-2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20135
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22126] mc68881 fpcr inline asm breaks clang -flto build

2014-08-03 Thread Andreas Schwab

Andreas Schwab added the comment:

Why does the configure test succeed?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22126
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22092] Executing some tests inside Lib/unittest/test individually throws Error

2014-08-03 Thread Ezio Melotti

Ezio Melotti added the comment:

I left a comment on rietveld.

Michael, do you think changing the imports is OK, or will this cause you some 
troubles with the external unittest package you maintain?

--
assignee:  - michael.foord
stage:  - patch review
type:  - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22092
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22129] Please add an equivalent to QString::simplified() to Python strings

2014-08-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is too specialized function to be included in the stdlib ar added as a 
method to base class.

There are simpler and faster implementations of this function:

def simplify(s):
return ' '.join(s.strip().split())

or

def simplify(s):
return re.sub(r'\s+', ' ', s.strip())

Due to they simplicity there is no need to add them in Python.

--
nosy: +serhiy.storchaka
resolution:  - rejected
stage:  - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22129
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-03 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

I'm not in favor of changing object() but exposing types.SimpleNamespace as 
built-in namespace() doesn't seem like such a bad idea, especially given Tim's 
penultimate Zen aphorism.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22116] Weak reference support for C function objects

2014-08-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Wouldn't it be enough to test that one of the builtin functions is now weak 
 referencible?

It's better to check that the weakref gets cleared when the object dies, and 
for that you need an object you can dispose of.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22116
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2014-08-03 Thread Daniel Eriksson

Daniel Eriksson added the comment:

#15745 is probably related to this issue

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19838
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2014-08-03 Thread Daniel Eriksson

Daniel Eriksson added the comment:

So me and @larstiq have been sitting with this during the sprint here and we 
have figured out some things but haven't had the time to put together a patch.

If you put two p.touch() before starting the testing, it will not fail on BSD.

What we have found out so far is that during file creation the resolution of 
the timestamp is higher then at the touch attempt when a file exists.

The main issue as we see it is that os.stat can return a timestamp with more 
granularity than os.utime can set.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19838
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22092] Executing some tests inside Lib/unittest/test individually throws Error

2014-08-03 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the patch based on Ezio's review. Thanks!

--
Added file: http://bugs.python.org/file36237/fix_test_inside_unittest_v2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22092
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18766] IDLE: Autocomplete in editor doesn't work for un-imported modules

2014-08-03 Thread Mark Lawrence

Mark Lawrence added the comment:

The patch is simple but I don't know enough about IDLE to comment technically, 
what do you think Terry?

--
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18766
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20135] FAQ need list mutation answers

2014-08-03 Thread Francis MB

Francis MB added the comment:

A) On the example:

+Also note that some operations (e.g. ``y.append(10)``/``y += [10]`` or
+``y.sort()``) mutate

are you saying:
1) y.append(10) divided by y += [10] or
2) y.append(10) and y += [10]

I don't want to split hairs but reading it fast confused me a bit


B) The paragraph:

+  etc.), we can use some specific operations to mutate it and all the variables
+  that refer to it will see
+  the change;

Couldn't be (one newline less):

+  etc.), we can use some specific operations to mutate it and all the variables
+  that refer to it will see the change;

--
nosy: +francismb

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20135
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13822] is(upper/lower/title) are not exactly correct

2014-08-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13822
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18769] argparse remove subparser

2014-08-03 Thread Mark Lawrence

Mark Lawrence added the comment:

@Paul it's a simple enough patch, what do you think?

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18769
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21448] Email Parser use 100% CPU

2014-08-03 Thread Raymond Hettinger

Raymond Hettinger added the comment:

 As for fix_prepending2.diff, could you please provide
 any benchmark results

No.  Inserting at the beginning of a list is always O(n) and inserting at the 
beginning of a deque is always O(1).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21448
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22130] Logging fileConfig behavior does not match documentation

2014-08-03 Thread Brendan Meeder

New submission from Brendan Meeder:

The 2.7.8 documentation for fileConfig says that for disable_existing_loggers:

If specified as False, loggers which exist when this call is made are left 
alone.

This is actually not the case- they are enabled after the call to fileConfig. 
In particular, the loggers that would be disabled if 
disable_existing_loggers=True are enabled after the call, regardless of whether 
they were previously enabled/disabled.

--
components: Library (Lib)
messages: 224648
nosy: Brendan.Meeder
priority: normal
severity: normal
status: open
title: Logging fileConfig behavior does not match documentation
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22130
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21448] Email Parser use 100% CPU

2014-08-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, but if n is limited, O(n) becomes O(1). In our case n is the number of fed 
but not read lines. I suppose the worst case is a number of empty lines, in 
this case n=8192. I tried following microbenchmark and did not noticed 
significant difference.

$ ./python -m timeit -s from email.parser import Parser; d = 'From: 
exam...@example.com\n\n' + '\n' * 10 -- Parser().parsestr(d)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21448
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13540] Document the Action API in argparse

2014-08-03 Thread Jason R. Coombs

Jason R. Coombs added the comment:

@paul.j3, It wasn't from a different project, it's just that the bug tracker 
when it does a diff always uses the tip of each branch instead of the most 
recent common ancestor, so it effectively calculated the the diff of the 
changes plus the inverse of every change since the effort initiated. But yes, 
it makes sense to remove it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13540
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13540] Document the Action API in argparse

2014-08-03 Thread Jason R. Coombs

Changes by Jason R. Coombs jar...@jaraco.com:


Removed file: http://bugs.python.org/file36001/9ac347a7f375.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13540
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16428] turtle with compound shape doesn't get clicks

2014-08-03 Thread Jessica McKellar

Changes by Jessica McKellar jesst...@mit.edu:


--
keywords: +needs review
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16428
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18624] Add alias for iso-8859-8-i which is the same as iso-8859-8

2014-08-03 Thread Jessica McKellar

Changes by Jessica McKellar jesst...@mit.edu:


--
keywords: +needs review
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18624
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13540] Document the Action API in argparse

2014-08-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 956c6d33a57d by Jason R. Coombs in branch '2.7':
Issue #13540: Expanded argparse documents to clarify the action API
http://hg.python.org/cpython/rev/956c6d33a57d

New changeset 008a5473f300 by Jason R. Coombs in branch '2.7':
Issue #13540: Removed redundant documentation about Action instance attributes. 
Updated example and documentation per recommendations by Steven Bethard in 
msg149524.
http://hg.python.org/cpython/rev/008a5473f300

New changeset 7a627bc9d40e by Jason R. Coombs in branch '2.7':
Issue #13540: Update references to Action class to match syntax used for other 
classes in this file.
http://hg.python.org/cpython/rev/7a627bc9d40e

New changeset b232e937e668 by Jason R. Coombs in branch '2.7':
Issue #13540: Merge commits
http://hg.python.org/cpython/rev/b232e937e668

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13540
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13540] Document the Action API in argparse

2014-08-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e2c9e0a3ef02 by Jason R. Coombs in branch '3.2':
Issue #13540: Expanded argparse documents to clarify the action API
http://hg.python.org/cpython/rev/e2c9e0a3ef02

New changeset c10a6ca9cb32 by Jason R. Coombs in branch '3.2':
Issue #13540: Removed redundant documentation about Action instance attributes. 
Updated example and documentation per recommendations by Steven Bethard in 
msg149524.
http://hg.python.org/cpython/rev/c10a6ca9cb32

New changeset 634f3fe8cbde by Jason R. Coombs in branch '3.2':
Issue #13540: Update references to Action class to match syntax used for other 
classes in this file.
http://hg.python.org/cpython/rev/634f3fe8cbde

New changeset a36d469f31c1 by Jason R. Coombs in branch '3.3':
Issue #13540: Merge changes from 3.2
http://hg.python.org/cpython/rev/a36d469f31c1

New changeset c689156580ca by Jason R. Coombs in branch '3.4':
Issue #13540: Merge changes from 3.3
http://hg.python.org/cpython/rev/c689156580ca

New changeset a2d01ed713cb by Jason R. Coombs in branch 'default':
Issue #13540: Merge changes from 3.4
http://hg.python.org/cpython/rev/a2d01ed713cb

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13540
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13540] Document the Action API in argparse

2014-08-03 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Commits applied to Python 2.7 and 3.2-3.5.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13540
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14910] argparse: disable abbreviation

2014-08-03 Thread Daniel Eriksson

Daniel Eriksson added the comment:

Eli, will look into those tomorrow morning, so a final patch will come during 
tomorrow. Checked my spam folder - and there they where, fixed the settings now 
so I get it faster.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14910
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17603] AC_LIBOBJ replacement of fileblocks

2014-08-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17603
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17769] python-config --ldflags gives broken output when statically linking Python with --as-needed

2014-08-03 Thread Mark Lawrence

Mark Lawrence added the comment:

@Max sorry about the delay in giving you a response.  Can somebody please pick 
this up, I can't find on the experts list who to put on the nosy list for build 
issues.

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17769
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2014-08-03 Thread Larry Hastings

Larry Hastings added the comment:

os.stat can return something more precise than nanosecond resolution?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19838
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22128] patch: steer people away from codecs.open

2014-08-03 Thread STINNER Victor

STINNER Victor added the comment:

See also my PEP 400:
http://legacy.python.org/dev/peps/pep-0400/

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22128
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22127] performance regression in socket getsockaddrarg()

2014-08-03 Thread STINNER Victor

STINNER Victor added the comment:

For Python, the encoder is only used when you pass a Unicode string.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22127
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17774] unable to disable -r in run_tests.py

2014-08-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
versions: +Python 3.5 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17774
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15992] Strict aliasing violations in Objects/unicodeobject.c

2014-08-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
versions: +Python 3.4, Python 3.5 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15992
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16429] Emit SyntaxWarning for code that risks UnboundLocalError

2014-08-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
type:  - enhancement
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16429
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22128] patch: steer people away from codecs.open

2014-08-03 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Pointing people to io.open() as alternative to codecs.open() is a good idea, 
but that doesn't make codecs.open() less useful.

The reason why codecs.open() uses binary mode is to avoid issues with automatic 
newline conversion getting in the way of the file's encoding. Think of e.g. 
UTF-16 encoded files that use newlines.

Note that codecs allow handling newlines on a line-by-line bases via the 
.readline() keepends parameter, so issues with Windows vs. Unix can be worked 
around explicitly. Since default is to keep line ends, no data loss occurs and 
application code can deal with line ends as it sees fit.

As it stands, I'm -1 on this patch, but would be +1 on mentioning io.open() as 
alternative to codecs.open() with a slightly different approach to line ends.

I don't think it's useful to tell people:
* use codecs.open() on Python 2.4, 2.5, 2.6
* use io.open() on Python 2.7 (io is too slow on 2.6 to be a real alternative 
to codecs.open())
* use open() on Python 3.4+

codecs.open() works the same across all these Python versions.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22128
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15018] Incomplete Python LDFLAGS and CPPFLAGS used for extension modules on posix

2014-08-03 Thread Mark Lawrence

Mark Lawrence added the comment:

Who is best placed to comment on build issues?

--
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 2.6, Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15018
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22092] Executing some tests inside Lib/unittest/test individually throws Error

2014-08-03 Thread Michael Foord

Michael Foord added the comment:

Patch looks fine, easy enough to change for unittest2 (if I ever have the time 
for a new release!)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22092
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18841] math.isfinite fails with Decimal sNAN

2014-08-03 Thread Mark Lawrence

Mark Lawrence added the comment:

Steven, can you propose a patch for this?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18841
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18766] IDLE: Autocomplete in editor doesn't work for un-imported modules

2014-08-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

A least a manual (human) test is needed: a description of steps that do not 
work now and do work with a patch.

Currently, get_entity() is only called in one place in fetch_completions; it is 
not used anywhere else in idlelib. (Call_tips defines another get_entity().)  
Its body should be moved inline at the call site. A variation that differs in 
the second line
namespace = __main__.__dict__.copy()
namespace.update(__main__.__builtins__.__dict__)
is already in-lined in the if-branch above.

We are trying to eliminate bare excepts: in idlelib -- #15313 -- not expand 
them or their use. Try blocks should only include the statement or statements 
that could raise the exception or exceptions caught. So the import, once 
inlined, should be inside try: except ImportError: return... .

I do not know what the existing try: except: is meant to catch, but it includes 
too much, as does the one that follows. That, however, should be a separate 
patch.

+namespace = sys.modules.copy()
+namespace.update(__main__.__dict__)
seems unnecessary. I think the following should work.
   namespace[name] = sys.modules[name]
A testcase would make sure either way.

--
stage:  - test needed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18766
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2014-08-03 Thread Francis MB

Francis MB added the comment:

 What we have found out so far is that during file creation the
 resolution of the timestamp is higher then at the touch attempt
 when a file exists.

Could it help to create 2 files (file 1, wait a bit, file 2) and then do the 
checks only with file 1?

--
nosy: +francismb

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19838
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22127] performance regression in socket getsockaddrarg()

2014-08-03 Thread Charles-François Natali

Charles-François Natali added the comment:

 For Python, the encoder is only used when you pass a Unicode string.

Hm...
I'm passing ('127.0.0.1', 4242)as destination, and you can see in the
above profile that the idna encode function is called.
This doesn't occur with 2.7.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22127
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22127] performance regression in socket getsockaddrarg()

2014-08-03 Thread Charles-François Natali

Charles-François Natali added the comment:

OK, I think I see what you mean:

$ ./python -m timeit -s import socket; s =
socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.sendto(b'hello',
('127.0.0.1', 4242))1 loops, best of 3: 44.7 usec per loop
$ ./python -m timeit -s import socket; s =
socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.sendto(b'hello',
(b'127.0.0.1', 4242))
1 loops, best of 3: 23.7 usec per loop

That's really surprising, especially since gethostbyname() and
getaddrinfo() seem to return strings:
$ ./python -m timeit -s import socket; s =
socket.socket(socket.AF_INET, socket.SOCK_DGRAM);
addr=socket.gethostbyname('127.0.0.1') s.sendto(b'hello', (addr,
4242))

$ ./python -c import socket; print(type(socket.gethostbyname('127.0.0.1')))
class 'str'

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22127
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21448] Email Parser use 100% CPU

2014-08-03 Thread Raymond Hettinger

Raymond Hettinger added the comment:

A deque is typically the right data structure when you need to append, pop, and 
extend on both the left and right side.  It is designed specifically for that 
task.  Also, it nicely cleans-up the code by removing the backwards line list 
and the list reversal prior to insertion on the left (that's what we had to do 
to achieve decent performance before the introduction of deques in Python 2.4, 
now you hardly ever see code like self._lines[:0] = lines[::-1]).  I think 
fix_prepending2 would be a nice improvement for Py3.5.

For the main patches that directly address the OP's performance issue, feel 
free to apply either my or yours.  They both work.  Either way, please add 
test_parser.diff since the original test didn't cover all the cases and because 
it didn't make clear the relationship between push() and splitlines().

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21448
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234674] filecmp.cmp's shallow option

2014-08-03 Thread Steven Barker

Steven Barker added the comment:

I've worked on this filecmp issue some more, and I have some new patches.

First up is a patch that only modifies the tests. It has one test that fails 
without the behavior patch. The test patch also modifies some other tests so 
that they will work after the behavior patch is applied. Notably, test_keyword 
had a some tests that would fail due to false negatives on shallow comparisons.

The second patch is the behavior and documentation changes required to actually 
fix this issue. This should be very simple to understand (the behavior change 
is only two lines of code, quoted in the discussion above). If you apply only 
this patch, you'll get several test failures, all due to false negative shallow 
comparisons (where two files have the same contents, but their stat signatures 
differ).

With these new patches, I think this issue is ready for a review, and 
eventually to be committed. The behavior change is simple and I think, 
obviously correct (assuming we want to risk breaking backwards compatibility). 
Perhaps my test code can be improved, but I don't think it's too bad.

So, the main question is will too much outside code break if we make this 
behavior change?

I don't think filecmp is used very widely, but as was demonstrated by the 
standard library's only use of filecmp (in Lib/test/test_keyword.py), it's 
likely that a lot of users perform shallow comparisons (by default) where they 
really don't want to get false-negatives. If we decide that the changed 
behavior is too big of a break of backwards compatibility, we just need to 
document the current behavior better (at a minimum, the docstring for 
filecmp.cmp must be corrected).

--
Added file: http://bugs.python.org/file36238/filecmp_test_patch.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1234674
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1234674] filecmp.cmp's shallow option

2014-08-03 Thread Steven Barker

Changes by Steven Barker blckkn...@gmail.com:


Added file: http://bugs.python.org/file36239/filecmp_behavior_and_doc_fix.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1234674
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14910] argparse: disable abbreviation

2014-08-03 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
components: +Library (Lib) -None
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14910
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-03 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20170] Derby #1: Convert 137 sites to Argument Clinic in Modules/posixmodule.c

2014-08-03 Thread Larry Hastings

Larry Hastings added the comment:

Diff tweaked to undo the ill-concieved Py_RETURN_NONE change.  Thanks, Zachary! 
 Does it now compile and pass tests on Windows?

--
Added file: http://bugs.python.org/file36240/larry.clinicize.posixmodule.7.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20170
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1186900] nntplib shouldn't raise generic EOFError

2014-08-03 Thread Martin Panter

Martin Panter added the comment:

I could be wrong, but isn’t this error raised when expecting a response from 
any command, not just during “connection establishment”? Perhaps change the 
docstring to say something like “Connection closed unexpectedly” instead.

--
nosy: +vadmium

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1186900
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22131] uuid.bytes optimization

2014-08-03 Thread Kevin London

New submission from Kevin London:

Generating the byte representation of a UUID object can be a little faster by 
using binascii's unhexlify on the hex value of the UUID object. In my testing, 
I saw about a 5.5x speed increase with the attached changes. 

Here are a set of benchmarks that I ran, which are inspired by Wang Chun's 
benchmarks on http://bugs.python.org/issue5885:

https://gist.github.com/kevinlondon/d3bb32d5a784f78731fa

My times:

kevin$ python uuid_benchmark.py 10
Original Average: 8.049 microseconds
Updated Average: 1.447 microseconds
 
I re-ran all of the tests with the patched uuid module and they passed. Here's 
my patchcheck output as well:

kevin$ make patchcheck
./python.exe ./Tools/scripts/patchcheck.py
Getting the list of files that have been added/changed ... 1 file
Fixing whitespace ... 0 files
Fixing C file whitespace ... 0 files
Fixing docs whitespace ... 0 files
Docs modified ... NO
Misc/ACKS updated ... NO
Misc/NEWS updated ... NO
configure regenerated ... not needed
pyconfig.h.in regenerated ... not needed

Thanks!

--
assignee: ronaldoussoren
components: Benchmarks, Library (Lib), Macintosh
files: uuid_bytes_update.patch
keywords: patch
messages: 224671
nosy: kevinlondon, ronaldoussoren
priority: normal
severity: normal
status: open
title: uuid.bytes optimization
type: performance
versions: Python 2.7
Added file: http://bugs.python.org/file36241/uuid_bytes_update.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22131
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22131] uuid.bytes optimization

2014-08-03 Thread Alex Gaynor

Alex Gaynor added the comment:

`self.int.to_bytes(16, byteorder='big')` looks to be even faster (about 3x on 
my machine)

--
nosy: +alex

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22131
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22131] uuid.bytes optimization

2014-08-03 Thread Alex Gaynor

Changes by Alex Gaynor alex.gay...@gmail.com:


--
versions: +Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22131
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22131] uuid.bytes optimization

2014-08-03 Thread Alex Gaynor

Alex Gaynor added the comment:

What I said only applies to the Python3 version of this patch.

Thanks for submitting this.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22131
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22127] performance regression in socket getsockaddrarg()

2014-08-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Note that even the bytes version is still quite slow. UDP is used for 
light-weight protocols where you may send thousands or more messages per 
second. I'd be curious what the sendto() performance is in raw C.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22127
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22116] Weak reference support for C function objects

2014-08-03 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage: test needed - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22116
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22116] Weak reference support for C function objects

2014-08-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

@kilowu, your patch looks good to me. As a necessary step to include your 
contribution, could you please sign the contributor's agreement? See 
https://www.python.org/psf/contrib/contrib-form/

Thank you very much!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22116
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22131] uuid.bytes optimization

2014-08-03 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I also like the way the patch cleans-up the code.

--
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22131
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11445] python.exe on OS X shared-llbrary build erroneously linked to MacPorts python library

2014-08-03 Thread koobs

Changes by koobs koobs.free...@gmail.com:


--
nosy: +koobs

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11445
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20402] List comprehensions should be noted in for loop documentation

2014-08-03 Thread Rob Lanphier

Rob Lanphier added the comment:

 Moving it earlier in the tutorial is likely to do more harm than help.
 In teaching Python, you need some gap between learning for-loops and 
 learning list comprehensions (the former is a prerequisite for the
 latter).

The problem here is that many people get list comprehensions foisted on them by 
reading code that has them in it.  Since list comprehensions aren't called 
list comprehensions in the code, but rather, they look like funny for loops, 
many people will turn to the for loop documentation, and as of this writing, 
they won't find anything.

There doesn't necessarily need to be the full example as in Alex's patch 
(though Alex's version seems fine to me), I think there should at least be some 
link to the list comprehension documentation, e.g. It is also possible to 
prepend a function onto a 'for' loop.  This is a :ref:`list comprehensions 
tut-listcomps`, and is explained further in the next chapter.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20402
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >