[issue17012] Differences between /usr/bin/which and shutil.which()

2013-02-18 Thread Ned Deily

Ned Deily added the comment:

The result of PATH= is also platform dependent. Testing on OS X which has a BSD 
heritage rather a Linux one:

$ PATH= /usr/bin/which python
./python

# without patch
$ PATH= ./python -c 'import shutil; print(shutil.which("python"))'
python
$ ./python -c 'import shutil; print(shutil.which("python", path=""))'
/usr/bin/python

# with the patch:
$ PATH= ./python -c 'import shutil; print(shutil.which("python"))'
None
$ ./python -c 'import shutil; print(shutil.which("python", path=""))'
None

So, for OS X, shutil.which doesn't match /usr/bin/which behavior for the PATH= 
case either with or without the patch.  FreeBSD (8.2) /usr/bin/which is the 
same.  The other cases are the same as Linux.

I suppose the patched behavior is preferable, though.

In any case, the shutil.which docs also need to be updated.

--

___
Python tracker 

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



[issue17179] Misleading error from type() when passing unknown keyword argument

2013-02-18 Thread Chris Withers

Chris Withers added the comment:

Some background: I hit this problem when adding Python 3 compatibility 
to one of my libraries, where I had the following code:

from types import ClassType
...
class_ = ClassType(n, (sometype, ), dict(class_attr1='foo', 
class_attr2='bar')

It wasn't at all clear how to port this to Python 3, given that 
ClassType was gone.

types.new_class looks fair game, but the help is not exactly helpful:

new_class(name, bases=(), kwds=None, exec_body=None)
 Create a class object dynamically using the appropriate metaclass.

No indication there as to what type should be passed for kwds or exec_body.

I guessed and, by the sound of it, guessed wrong.
I'd certainly agree that the error message is very misleading.

cheers,

Chris

--

___
Python tracker 

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



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-18 Thread Ned Deily

Ned Deily added the comment:

Serhiy, I think your patch is ready to commit and close this issue as it 
prevents the crash.  A test would be nice if a reliable test could be devised 
without too much effort but it's not mandatory, IMO.  Any tangential issues or 
more complex solutions can be pursued in other issues.

--
stage: test needed -> commit review

___
Python tracker 

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-18 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue17224] can not open idle in python 2.7.3

2013-02-18 Thread william wu

New submission from william wu:

I install python 2.7 in windows xp 32bit. 
I try to open idle using "C:\Python27>python.exe Lib\idlelib\idle.py", But 
return error as following:

Traceback (most recent call last):
  File "Lib\idlelib\idle.py", line 11, in 
idlelib.PyShell.main()
  File "C:\Python27\Lib\idlelib\PyShell.py", line 1421, in main
shell = flist.open_shell()
  File "C:\Python27\Lib\idlelib\PyShell.py", line 289, in open_shell
if not self.pyshell.begin():
  File "C:\Python27\Lib\idlelib\PyShell.py", line 1009, in begin
client = self.interp.start_subprocess()
  File "C:\Python27\Lib\idlelib\PyShell.py", line 402, in start_subprocess
self.port = self.rpcclt.listening_sock.getsockname()[1]
  File "C:\Python27\Lib\socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.gaierror: [Errno 10104] getaddrinfo failed
it's fine if using "C:\Python27>python.exe Lib\idlelib\idle.py -n". it doesn't 
work after i try to close firewall.

--
components: Windows
messages: 182306
nosy: hayeswu
priority: normal
severity: normal
status: open
title: can not open idle in python 2.7.3
versions: Python 2.7

___
Python tracker 

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



[issue17224] can not open idle in python 2.7.3

2013-02-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +IDLE
nosy: +kbk
type:  -> behavior

___
Python tracker 

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



[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2013-02-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for report, Arfrever. I'll see how epydoc uses MAXREPEAT. Maybe it 
requires larger changes.

--

___
Python tracker 

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



[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2013-02-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a80ea934da9a by Serhiy Storchaka in branch '2.7':
Fix issue #13169: Reimport MAXREPEAT into sre_constants.py.
http://hg.python.org/cpython/rev/a80ea934da9a

New changeset a6231ed7bff4 by Serhiy Storchaka in branch '3.2':
Fix issue #13169: Reimport MAXREPEAT into sre_constants.py.
http://hg.python.org/cpython/rev/a6231ed7bff4

New changeset 88c04657c9f1 by Serhiy Storchaka in branch '3.3':
Fix issue #13169: Reimport MAXREPEAT into sre_constants.py.
http://hg.python.org/cpython/rev/88c04657c9f1

New changeset 3dd5be5c4794 by Serhiy Storchaka in branch 'default':
Fix issue #13169: Reimport MAXREPEAT into sre_constants.py.
http://hg.python.org/cpython/rev/3dd5be5c4794

--

___
Python tracker 

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



[issue6975] symlinks incorrectly resolved on POSIX platforms

2013-02-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for the report. I'm surprised that the tests are not caught it.

--

___
Python tracker 

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



[issue17179] Misleading error from type() when passing unknown keyword argument

2013-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:

For the simple case where you don't need to provide a metaclass hint, the 
simplest conversion is actually directly to the 3-argument form of type().

As far as the docstring goes, I don't want to make it as long as the full docs, 
but it could probably stand to be longer than it is.

--

___
Python tracker 

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



[issue6975] symlinks incorrectly resolved on POSIX platforms

2013-02-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 50ed06b3d419 by Serhiy Storchaka in branch '2.7':
Fix posixpath.realpath() for multiple pardirs (fixes issue #6975).
http://hg.python.org/cpython/rev/50ed06b3d419

New changeset cb3fbadb65aa by Serhiy Storchaka in branch '3.2':
Fix posixpath.realpath() for multiple pardirs (fixes issue #6975).
http://hg.python.org/cpython/rev/cb3fbadb65aa

New changeset aad7e68eff0a by Serhiy Storchaka in branch '3.3':
Fix posixpath.realpath() for multiple pardirs (fixes issue #6975).
http://hg.python.org/cpython/rev/aad7e68eff0a

New changeset f99ff3b01fab by Serhiy Storchaka in branch 'default':
Fix posixpath.realpath() for multiple pardirs (fixes issue #6975).
http://hg.python.org/cpython/rev/f99ff3b01fab

--

___
Python tracker 

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



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bb5a8564e186 by Serhiy Storchaka in branch '2.7':
Issue #13153: Tkinter functions now raise TclError instead of ValueError when
http://hg.python.org/cpython/rev/bb5a8564e186

New changeset 9904f245c3f0 by Serhiy Storchaka in branch '3.2':
Issue #13153: Tkinter functions now raise TclError instead of ValueError when
http://hg.python.org/cpython/rev/9904f245c3f0

New changeset 38bb2a46692e by Serhiy Storchaka in branch '3.3':
Issue #13153: Tkinter functions now raise TclError instead of ValueError when
http://hg.python.org/cpython/rev/38bb2a46692e

New changeset 61993bb9ab0e by Serhiy Storchaka in branch 'default':
Issue #13153: Tkinter functions now raise TclError instead of ValueError when
http://hg.python.org/cpython/rev/61993bb9ab0e

--
nosy: +python-dev

___
Python tracker 

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



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-02-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee: asvetlov -> serhiy.storchaka
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue6975] symlinks incorrectly resolved on POSIX platforms

2013-02-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-02-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is an updated patch. Changes for unittest and doctest reverted.

--
Added file: http://bugs.python.org/file29113/NEWS-3.4_2.patch

___
Python tracker 

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



[issue11949] Make float('nan') unorderable

2013-02-18 Thread Marc Schlaich

Marc Schlaich added the comment:

I'm +1 for a warning. The current behavior is really unexpectable:

In [6]: sorted([nan, 0, 1, -1])
Out[6]: [nan, -1, 0, 1]

In [7]: sorted([0, 1, -1, nan])
Out[7]: [-1, 0, 1, nan]

In [8]: sorted([0, nan, 1, -1])
Out[8]: [0, nan, -1, 1]

--
nosy: +schlamar

___
Python tracker 

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



[issue6975] symlinks incorrectly resolved on POSIX platforms

2013-02-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3c5517c4fa5d by Serhiy Storchaka in branch '2.7':
Disable posixpath.realpath() tests on Windows (fix for issue #6975).
http://hg.python.org/cpython/rev/3c5517c4fa5d

New changeset 0bbf7cdea551 by Serhiy Storchaka in branch '3.2':
Disable posixpath.realpath() tests on Windows (fix for issue #6975).
http://hg.python.org/cpython/rev/0bbf7cdea551

New changeset 79ea59b394bf by Serhiy Storchaka in branch '3.3':
Disable posixpath.realpath() tests on Windows (fix for issue #6975).
http://hg.python.org/cpython/rev/79ea59b394bf

New changeset aa77f7eb2bf1 by Serhiy Storchaka in branch 'default':
Disable posixpath.realpath() tests on Windows (fix for issue #6975).
http://hg.python.org/cpython/rev/aa77f7eb2bf1

--

___
Python tracker 

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



[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2013-02-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16525] wave file module does not support 32bit float format

2013-02-18 Thread Harvey Ormston

Harvey Ormston added the comment:

Thanks Sebastian. That makes sense. I've tried the updated patch and it works 
just fine for me.

--

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-02-18 Thread Richard Oudkerk

Richard Oudkerk added the comment:

I did not realize there was a 'Extension Modules' section.  I have been putting 
changes to C extensions in the 'Library' section instead.  It looks like most 
people do the same as me.

--
nosy: +sbt

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-02-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> I did not realize there was a 'Extension Modules' section.  I have
> been putting changes to C extensions in the 'Library' section
> instead.  It looks like most people do the same as me.

I prefer "Library" as well. I think the "Extension Modules" section
should be yanked.

--

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-02-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Was not it be yanked in 1fabff717ef4?

--

___
Python tracker 

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



[issue17225] JSON decoder reports wrong column number on first line

2013-02-18 Thread Ferdinand Beyer

New submission from Ferdinand Beyer:

The linecol() function in json/decoder.py computes the line and column numbers 
for a byte offset in a string.  Both numbers are expected to start with 1 (as 
in text editors).

If the position is in the first line, the returned column is off by one (or 
starting with zero):

>>> from json.decoder import linecol
>>> linecol('spam', 0)  # Should be (1, 1)
(1, 0)
>>> linecol('\nspam', 1)
(2, 1)

The problem is the line:

if lineno == 1:
colno = pos

that should read

if lineno == 1:
colno = pos + 1

--
components: Library (Lib)
messages: 182320
nosy: fbeyer
priority: normal
severity: normal
status: open
title: JSON decoder reports wrong column number on first line
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 
3.4, Python 3.5

___
Python tracker 

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



[issue17225] JSON decoder reports wrong column number on first line

2013-02-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +ezio.melotti, pitrou, rhettinger, serhiy.storchaka
stage:  -> needs patch
versions:  -Python 2.6, Python 3.1, Python 3.5

___
Python tracker 

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



[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2013-02-18 Thread Thomas Kluyver

Thomas Kluyver added the comment:

Updated version of the patch.

Changed from review:
- Included test.bytecode_helper module used by some tests
- Updated docs to indicate that the changes are new in 3.4
- ByteCode -> Bytecode
- Added meaningful repr for Bytecode

Still to do:
- ? Re-expose attributes from code object on Bytecode instance
- Tests & documentation for Bytecode class
- Split changes into multiple patches

--
Added file: http://bugs.python.org/file29114/dis_api2.diff

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2013-02-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've lost track of why this new exception was needed. Could someone provide a 
summary? Thanks :-)

--
nosy: +pitrou

___
Python tracker 

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



[issue12014] str.format parses replacement field incorrectly

2013-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:

This actually came up on the core-mentorship list (someone was trying to 
translate old mod-formatting code that used a colon in the lookup names and 
discovered this odd behaviour)

My own preference is to let this quote from PEP 3101 dominate the behaviour: 
"The rules for parsing an item key are very simple. If it starts with a digit, 
then it is treated as a number, otherwise it is used as a string."

That means Petri's suggested solution (allowing any character except a closing 
square bracket and braces in the item key) sounds good to me.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue17216] sparc linux build fails with "could not import runpy module"

2013-02-18 Thread uservorname usernachname

uservorname usernachname added the comment:

Thanks for your hints.

I got installed openssl-1.0.1d and ssl in 
fes-a120d19nas:/backup/fes-a120d19nas/Python-3.3.0# whereis openssl
openssl: /usr/bin/openssl /usr/include/openssl
fes-a120d19nas:/backup/fes-a120d19nas/Python-3.3.0# whereis ssl
ssl: /etc/ssl /usr/lib/ssl

I compiled openssl-1.0.1d and gnutls-3.1.7 by my self. Package manager doesn't 
work at this machine. But anyway because I compiled this libaries all header 
files should be avaibel.

I also recognized that setup.py line 759 searches in /usr/local/lib instead of 
/usr/lib.

So I changed the setup lines regarding 759 to :

 # Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
  '/usr/ssl/include',
  '/usr/contrib/ssl/include/'
 ]
ssl_incs = find_file('openssl/ssl.h', inc_dirs,
 search_for_ssl_incs_in
 )
if ssl_incs is not None:
krb5_h = find_file('krb5.h', inc_dirs,
   ['/usr/kerberos/include'])
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
 ['/usr/lib/ssl',
  '/usr/contrib/ssl/lib/'
 ] )
and executed again make. 

Which now results in

fes-a120d19nas:/backup/fes-a120d19nas/Python-3.3.0# make
case $MAKEFLAGS in *s*) quiet=-q; esac; \
 CC='sparc-linux-gcc -pthread' LDSHARED='sparc-linux-gcc -pthread -shared  ' 
OPT='-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes' \
./python -E ./setup.py $quiet build
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers
make: *** [sharedmods] Error 139

So now I'm compiling Tcl from source, and hope this will have some positive 
effects.

--

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-02-18 Thread Richard Oudkerk

Richard Oudkerk added the comment:

> Was not it be yanked in 1fabff717ef4?

Looks like it was reintroduced by this merge changeset:

http://hg.python.org/cpython/rev/30fc620e240e

--

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-02-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2013-02-18 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Why are zipfiles without entries for directories broken? When you don't care 
about directory permissions (such as when the zipfile won't be extracted at 
all) the entries for directories are not necessary. Also, AFAIK the zipfile 
specification  does 
not require adding directory entries to the zipfile.

FWIW: the zipfiles created by py2app do no contain entries for directories at 
the moment.  I'll probably add entries for directories in the next update to 
work around this issue.

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue17226] libintl should also check for libiconv

2013-02-18 Thread Alan Hourihane

New submission from Alan Hourihane:

The configure.ac script detects libintl but can depend on libiconv.

I added this to force it and to demonstrate, but I think this is not 100% 
correct and should be massaged into the libintl tests.

--- configure.ac.old2013-02-16 09:34:55.0 +
+++ configure.ac2013-02-16 09:43:22.0 +
@@ -2122,6 +2122,15 @@
# pthread (first!) on Linux
 fi
 
+# Check iconv
+AC_CHECK_LIB([iconv], [iconv_open], , [ac_found_iconf=no])
+if test "x$ac_found_iconf" = "xno"; then
+  AC_CHECK_LIB([iconv], [libiconv_open], , [ac_found_iconf=no])
+fi
+if test "x$ac_found_iconf" = "xyes"; then
+  LIBS="-liconv $LIBS"
+fi
+
 # check if we need libintl for locale functions
 AC_CHECK_LIB(intl, textdomain,
[AC_DEFINE(WITH_LIBINTL, 1,

--
components: Build
messages: 182327
nosy: alanh
priority: normal
severity: normal
status: open
title: libintl should also check for libiconv
versions: Python 3.3

___
Python tracker 

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



[issue17170] string method lookup is too slow

2013-02-18 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16061] performance regression in string replace for 3.3

2013-02-18 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-02-18 Thread Gregory P. Smith

Gregory P. Smith added the comment:

re-yank it.  that was unintentional.  less sections == better.

--

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2013-02-18 Thread Michele Orrù

Changes by Michele Orrù :


--
nosy:  -maker

___
Python tracker 

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



[issue17225] JSON decoder reports wrong column number on first line

2013-02-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch. This change breaks tests, but unlikely anything except tests 
depends on exact error message.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file29115/json_first_line_columns.patch

___
Python tracker 

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-02-18 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-02-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is an updated patch. Re-yanked "Extension Modules" section. Changes for 
3.4 sorted in chronological order.

--
Added file: http://bugs.python.org/file29116/NEWS-3.4_3.patch

___
Python tracker 

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



[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2013-02-18 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue17220] Little enhancements of _bootstrap.py

2013-02-18 Thread Brett Cannon

Brett Cannon added the comment:

It all LGTM. Nice cleanup! Totally didn't remember about to_bytes and 
from_bytes.

If you are feeling adventurous you can look at possibly porting the changes you 
made to _path_join() and _path_split() to os.py since I mostly copied them.

--
assignee:  -> serhiy.storchaka
stage: patch review -> commit review

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2013-02-18 Thread Brett Cannon

Brett Cannon added the comment:

TL;DR for Antoine: when using a fromlist, import failures from that list are 
silently ignored. Because ImportError is overloaded in terms of what it means 
(e.g. bag magic number, module not found) there needs to be a clean way to tell 
the import failed because the module wasn't found so other ImportError reasons 
can properly propagate.

--

___
Python tracker 

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



[issue17220] Little enhancements of _bootstrap.py

2013-02-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

_path_join() and _path_split() do not look as join() and split() from ntpath or 
posixpath. They rather look as very simplified and limited versions of join() 
and split(). Perhaps they are enough for _bootstrap.py, but real os.path 
functions are more complicated.

--

___
Python tracker 

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



[issue17222] py_compile.compile() explicitly sets st_mode for written files

2013-02-18 Thread Brett Cannon

Brett Cannon added the comment:

So py_compile always replaced the file, even in Python 3.3: 
http://hg.python.org/cpython/file/79ea59b394bf/Lib/py_compile.py#l141 (this is 
why I changed the title of the bug). What did change, though, is that 
py_compile now writes bytecode files just as import does, which means copying 
the file permissions of the source file for the bytecode file. E.g. if you 
listed the permissions for test.py in your example output I bet it's -rw-r- 
just like what /dev/null ended up with.

I'm not going to change this as this is very much on purpose for security 
reasons; it's more of a long-standing bug that py_compile never used the proper 
permissions than it is changing the semantics to what they are today. Since 
py_compile is for compiling and writing out source code it should match what 
import does (if you are doing this to verify the file will parse properly, 
which is what writing to /dev/null suggests, it would be more accurate to just 
pass the raw source code through the AST module and make sure no exceptions are 
raised, else just write into the /tmp directory and let the OS clean up).

What I will do, though, it document this fact in the docs with a "Changed in 
Python 3.4" note and in What's New since people should be aware of it.

--
assignee:  -> brett.cannon
components: +Documentation
keywords: +easy
priority: high -> normal
stage:  -> needs patch
title: py_compile.compile() replaces target files, breaking special files and 
symlinks -> py_compile.compile() explicitly sets st_mode for written files

___
Python tracker 

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



[issue17222] py_compile.compile() explicitly sets st_mode for written files

2013-02-18 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

In case of /dev/null, the main problem is that it became a regular file. It was 
previously a character device. Writing to character devices should not replace 
them.

What about problem with symlinks?:
$ cd /tmp
$ touch test.py
$ ln -s target.pyc test.pyc
$ python3.3 -c 'import py_compile; py_compile.compile("test.py", 
cfile="test.pyc")'
$ ls -l test.py test.pyc target.pyc
-rw-r--r-- 1 Arfrever Arfrever 102 02-18 20:20 target.pyc
-rw-r--r-- 1 Arfrever Arfrever   0 02-18 20:20 test.py
lrwxrwxrwx 1 Arfrever Arfrever  10 02-18 20:20 test.pyc -> target.pyc
$ python3.4 -c 'import py_compile; py_compile.compile("test.py", 
cfile="test.pyc")'
$ ls -l test.py test.pyc target.pyc
-rw-r--r-- 1 Arfrever Arfrever 102 02-18 20:20 target.pyc
-rw-r--r-- 1 Arfrever Arfrever   0 02-18 20:20 test.py
-rw-r--r-- 1 Arfrever Arfrever 102 02-18 20:21 test.pyc

--

___
Python tracker 

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



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-02-18 Thread Berker Peksag

Berker Peksag added the comment:

New patch attached.

Changes:

* Addressed msg107402. I will update the C code if this implementation
  is correct.
* Added more tests
* Converted classmethods to staticmethods
* Removed doctests
* Updated documentation

--
nosy: +berker.peksag
Added file: http://bugs.python.org/file29117/issue1100942_v4.diff

___
Python tracker 

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



[issue17222] py_compile.compile() explicitly sets st_mode for written files

2013-02-18 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

py_compile.compile() was always replacing contents of target file, but was not 
causing that a given link name would refer to a different inode. 
builtins.open() has correct behavior:

# stat /dev/null
  File: ‘/dev/null’
  Size: 0   Blocks: 0  IO Block: 4096   character special 
file
Device: 5h/5d   Inode: 3242180 Links: 1 Device type: 1,3
Access: (0666/crw-rw-rw-)  Uid: (0/root)   Gid: (0/root)
Access: 2013-02-18 20:11:07.883986147 +0100
Modify: 2013-02-18 20:11:07.883986147 +0100
Change: 2013-02-18 20:11:07.883986147 +0100
 Birth: -
# python3.4 -c 'null = open("/dev/null", "wb"); null.write(b"abc"); 
null.close()'
# stat /dev/null
  File: ‘/dev/null’
  Size: 0   Blocks: 0  IO Block: 4096   character special 
file
Device: 5h/5d   Inode: 3242180 Links: 1 Device type: 1,3
Access: (0666/crw-rw-rw-)  Uid: (0/root)   Gid: (0/root)
Access: 2013-02-18 20:11:07.883986147 +0100
Modify: 2013-02-18 20:11:07.883986147 +0100
Change: 2013-02-18 20:11:07.883986147 +0100
 Birth: -

--

___
Python tracker 

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



[issue17227] devguide: buggy heading numbers

2013-02-18 Thread Antoine Pitrou

New submission from Antoine Pitrou:

If you look e.g. here:
http://docs.python.org/devguide/faq.html#communications

you'll see that all questions are numbered "25", while the upper headings are 
numbered "25.1", "25.2", etc.

Other places in the devguide seem fine, e.g. 
http://docs.python.org/devguide/stdlibchanges.html

--
components: Devguide
messages: 182338
nosy: eric.araujo, ezio.melotti, ncoghlan, pitrou
priority: normal
severity: normal
status: open
title: devguide: buggy heading numbers
type: behavior

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2013-02-18 Thread Chris Jerdonek

Chris Jerdonek added the comment:

>> from foo import bar
>> Here bar can be not module, but an attribute of foo (for example, os.path).
> Serhiy: What exception is raised in that situation is controlled by the eval 
> loop, not importlib so that would be a separate change.

Just to clarify from this exchange, is there a chance we will use this same 
exception type (perhaps in a later change) in cases where bar is not found?  If 
so, I think it's worth considering something like "NotFoundImportError" or 
"ImportNotFoundError" that doesn't single out module.  Importing classes, etc. 
is quite a common pattern (e.g. examples appear in PEP 8).

--

___
Python tracker 

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



[issue17228] Building without PYMALLOC fails

2013-02-18 Thread Richard Yao

New submission from Richard Yao:

The preprocessor definition for uint is only defined when building with 
PYMALLOC, which breaks builds without PYMALLOC. There is a Gentoo bug report on 
this issue:

https://bugs.gentoo.org/show_bug.cgi?id=458168

I have attached a patch that I wrote that resolves this.

--
components: Build
files: python-3.3.0-rename-uint.patch
keywords: patch
messages: 182340
nosy: ryao
priority: normal
severity: normal
status: open
title: Building without PYMALLOC fails
type: compile error
versions: Python 3.3
Added file: http://bugs.python.org/file29118/python-3.3.0-rename-uint.patch

___
Python tracker 

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



[issue13829] exception error in _scproxy.so

2013-02-18 Thread Julian Scheid

Julian Scheid added the comment:

FWIW, I've run into the same issue in a homegrown application with 2.6.8, 2.7.2 
and 2.7.3 (these were the only versions I've tested).

Looking around a little bit, I suspect this might be a bug in 
SCDynamicStoreCopyProxies that's only present on OS X 10.7 and only triggered 
when invoked in a forked child (?) [1][2].

I've tried working around it by invoking SCDynamicStoreCopyProxies with a 
non-NULL SCDynamicStoreRef but to no avail. Since I don't need this Python 
application to use HTTP proxies, I'm working around it now like this:

proxy_handler = urllib2.ProxyHandler({})
opener = urllib2.build_opener(proxy_handler)
request = urllib2.Request(...)
response = opener.open(request)

[1] http://forums.macrumors.com/archive/index.php/t-1295113.html
[2] https://github.com/suminb/spider/issues/7

--
nosy: +Julian.Scheid

___
Python tracker 

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



[issue15976] Inconsistent behavior of search_for_exec_prefix() results in startup failure in certain cases

2013-02-18 Thread Muflone

Muflone added the comment:

Confirmed for Arch Linux x86_64 with python version 2.7.3

--
nosy: +Muflone
versions: +Python 3.3

___
Python tracker 

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



[issue17229] unable to discover preferred HTTPConnection class

2013-02-18 Thread Samwyse

New submission from Samwyse:

When a URL is opened, the opener-director is responsible for locating the 
proper handler for the specified protocol. Frequently, an existing protocol 
handler will be subclassed and then added to the collection maintained by the 
director. When urlopen is called, the specified request is immediately handed 
off to the director's "open" method which finds the correct handler and invokes 
the protocol-specific XXX_open method. At least in the case of the HTTP 
protocols, if an error occurs then the director is called again to find and 
invoke a handler for the error; these handlers generally open a new connection 
after adding headers to avoid the error going forward. Finally, it is important 
to note that at the present time, the HTTP handlers in urllib2 are built using 
a class (infourl) that isn't prepared to deal with a persistent connection, so 
they always add a "Connection: close" header to the request.

Unfortunately, NTLM only certifies the current connection, meaning that a 
"Connection: keep-alive" header must be used to keep it open throughout the 
authentication process. Furthermore, because the opener director only provides 
a do_open method, there is no way to discover the type of connection without 
also opening it. This means that the HTTPNtlmAuthHandler cannot use the normal 
HTTPHandler and must therefore must hardcode the HTTPConnection class. If a 
custom class is required for whatever reason, the only way to cause it to be 
used is to monkey-patch the code. For an example, see 
http://code.google.com/p/python-ntlm/source/browse/trunk/python26/ntlm_examples/test_ntlmauth.py

This can be avoided if, instead of putting the instantiation of the desired 
HTTP connection class inline, the HTTPHandler classes used a class instance 
variable. Something like the following should work without breaking any 
existing code:

class HTTPHandler(AbstractHTTPHandler):

_connection = httplib.HTTPConnection

@property
def connection(self):
"""Returns the class of connection being handled."""
return self._connection

def http_open(self, req):
return self.do_open(_connection, req)

http_request = AbstractHTTPHandler.do_request_

--
components: Library (Lib)
messages: 182343
nosy: samwyse
priority: normal
severity: normal
status: open
title: unable to discover preferred HTTPConnection class
versions: 3rd party, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 
3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue17119] Integer overflow when passing large string to Tkinter

2013-02-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage:  -> needs patch

___
Python tracker 

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



[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-02-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage:  -> patch review

___
Python tracker 

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



[issue13512] ~/.pypirc created insecurely

2013-02-18 Thread anatoly techtonik

anatoly techtonik added the comment:

CVE-2011-4944

--
nosy: +techtonik

___
Python tracker 

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



[issue17226] libintl should also check for libiconv

2013-02-18 Thread Ned Deily

Ned Deily added the comment:

Do you have a use case where this is needed?  As far as I know, Python itself 
doesn't reference libiconv directly.  libintl may but we're not building it, 
merely using it.  If libintl does reference it, the linker in use should try to 
satisfy the dependency for it.  We shouldn't have to specify the transitive 
closure of all dependent libraries.

--
nosy: +ned.deily

___
Python tracker 

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



[issue17227] devguide: buggy heading numbers

2013-02-18 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue17230] when forking without tty, code is run from start

2013-02-18 Thread jort bloem

New submission from jort bloem:

When calling os.fork() without a tty, a process reporting the parent's pid runs 
code BEFORE the fork().

When running on a tty, it behaves as expected: both parent and child continue 
running from statement immediately after os.fork()

See attached test.py, compare running it with tty vs. without.

to run without tty: ssh localhost `pwd`/test.py

--
components: None
messages: 182346
nosy: jort.bloem
priority: normal
severity: normal
status: open
title: when forking without tty, code is run from start
type: behavior
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue17230] when forking without tty, code is run from start

2013-02-18 Thread STINNER Victor

STINNER Victor added the comment:

There is no attached file.

I don't think that it's a bug that the child starts before the parent. It 
depends on the OS, OS version and many other things. You should use a 
synchronization mechanism to ensure the execution order.

--
nosy: +haypo

___
Python tracker 

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



[issue17226] libintl should also check for libiconv

2013-02-18 Thread Alan Hourihane

Alan Hourihane added the comment:

Hi Yes, when Python is built as static only, on a system when no dynamic 
loading is available. You have to explicitly link libiconv when libintl 
references it.

--

___
Python tracker 

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



[issue17230] when forking without tty, code is run from start

2013-02-18 Thread R. David Murray

R. David Murray added the comment:

Haypo: I think he's saying that a statement in the source before the os.fork 
call is executed in the child, which seem rather unlikely.  Your suggestion may 
be what is happening to confuse him into thinking that, but without the sample 
program we can't evaluate this any further.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue17230] when forking without tty, code is run from start

2013-02-18 Thread jort bloem

jort bloem added the comment:

Try attachment again.

--
Added file: http://bugs.python.org/file29119/test.py

___
Python tracker 

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



[issue17230] when forking without tty, code is run from start

2013-02-18 Thread jort bloem

jort bloem added the comment:

haypo: I understand that, after a fork, parent and child instructions are run 
in parallel; which one prints first is a matter of chance.

However, commands BEFORE THE FORK should not be re-run.

See test script. I would expect one "Start ", followed by a "parent " 
and a "child ". I would not expect to see (as I do) a second "Start ".

(The original program was long and complex, with numerous forks; this is the 
smallest program I could write to show the problem).

--

___
Python tracker 

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



[issue7063] Memory errors in array.array

2013-02-18 Thread R. David Murray

R. David Murray added the comment:

Stefan, IIRC you reworked some of the buffer/memoryview code.  Do you know if 
what is reported here is still an issue, and if so if it is worth fixing?

--
nosy: +r.david.murray, skrah

___
Python tracker 

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



[issue17230] when forking without tty, code is run from start

2013-02-18 Thread R. David Murray

R. David Murray added the comment:

I only see Start printed once (on linux).  What OS are you running this on?

--

___
Python tracker 

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



[issue17230] when forking without tty, code is run from start

2013-02-18 Thread STINNER Victor

STINNER Victor added the comment:

I can reproduce the issue using "python test.py|cat". The problem is that 
sys.stdout is buffered and the buffer is flushed twice: once in the parent, 
once in the child. Just call sys.stdout.flush() before os.fork() should fix 
your issue.

I don't think that Python should flush buffers of all streams before fork, so I 
propose to close this issue. Except if you see something interesting to add to 
Python documentation.

--

___
Python tracker 

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



[issue17119] Integer overflow when passing large string to Tkinter

2013-02-18 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue16278] os.rename documentation slightly inaccurate

2013-02-18 Thread Todd Rovito

Todd Rovito added the comment:

Over the weekend I caught this terrible cold and have not been able to work on 
this issue much.  Hopefully I can complete by next weekend 2/25/2013 thanks for 
your understanding.

--

___
Python tracker 

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



[issue6962] traceback.format_exception_only does not return SyntaxError carot correctly

2013-02-18 Thread R. David Murray

R. David Murray added the comment:

This appears to be out of date.  The output matches that of the interpreter (no 
extra newline) for 2.6.8, 2.7.3 and 3.2.1.  The carrot in this particular 
example points to the ) and not the newline; I'm not sure if that is ideal, but 
it is consistent and, as Amaury said, currently tested for.  

Closing this as out of date; if someone wants to analyze the ^/newline position 
issue and open a new bug if it seems appropriate, please do.

--
nosy: +r.david.murray
resolution:  -> out of date
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17226] libintl should also check for libiconv

2013-02-18 Thread Ned Deily

Ned Deily added the comment:

That helps a bit but, to be able to even test this, we would still need a 
specific example of a platform and a configuration where this is the case.  
It's not necessary or desirable to add on most platforms, I think.

--

___
Python tracker 

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



[issue7469] Design and History FAQ entry on Floating Point does not mention short repr.

2013-02-18 Thread R. David Murray

R. David Murray added the comment:

I've reviewed these docs again, and I don't see anything left to update 
(everything in the current 2.7 tutorial appears to be accurate).  I also did a 
grep on the FAQs, and don't see any prints that are statements, so those must 
have gotten fixed as part of other issues.

--
resolution:  -> out of date
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue7963] Misleading error message from object(arg)

2013-02-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b5adf2a30b73 by R David Murray in branch '3.2':
#7963: fix error message when 'object' called with arguments.
http://hg.python.org/cpython/rev/b5adf2a30b73

New changeset 0e438442fddf by R David Murray in branch '3.3':
#7963: fix error message when 'object' called with arguments.
http://hg.python.org/cpython/rev/0e438442fddf

New changeset 1f3ce7ba410b by R David Murray in branch 'default':
Merge: #7963: fix error message when 'object' called with arguments.
http://hg.python.org/cpython/rev/1f3ce7ba410b

--
nosy: +python-dev

___
Python tracker 

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



[issue7963] Misleading error message from object(arg)

2013-02-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0082b7bf9501 by R David Murray in branch '2.7':
#7963: fix error message when 'object' called with arguments.
http://hg.python.org/cpython/rev/0082b7bf9501

--

___
Python tracker 

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



[issue7963] Misleading error message from object(arg)

2013-02-18 Thread R. David Murray

R. David Murray added the comment:

I've applied this.  Note that this makes the object.__new__ message consistent 
with, say, str.__new__.  That is, 'str.__new__(str, 2, 3)' results in the 
message "TypeError: str() argument 2 must be str, not int".  So the new object 
error message is consistent with that convention:  object.__new__(object, 1) 
now gives "TypeError: object() takes no parameters"

--
nosy: +r.david.murray
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue11949] Make float('nan') unorderable

2013-02-18 Thread Raymond Hettinger

Raymond Hettinger added the comment:

-1 for a warning.  A should really have *no* expectations about a NaNs sort 
order.  For the most part, Python does not get into warnings business for every 
possible weird thing you could tell it to do (especially something as harmless 
as this).

Also warnings are a bit of PITA to shut-off.  For something like NaN ordering, 
a warning is likely to inflict more harm on the users than the NaN ordering 
issue itself.

--

___
Python tracker 

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



[issue17230] when forking without tty, code is run from start

2013-02-18 Thread jort bloem

jort bloem added the comment:

I agree that it is reasonable NOT to flush stdout on fork().

I don't think the outcome is reasonable. 

What about voiding all buffers after the fork for the child?

--

___
Python tracker 

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



[issue17231] Mark __del__ not being called in cycles as an impl detail

2013-02-18 Thread Maciej Fijalkowski

New submission from Maciej Fijalkowski:

Here: http://docs.python.org/2/reference/datamodel.html, as per python-dev 
discussion

--
assignee: docs@python
components: Documentation
messages: 182364
nosy: docs@python, fijall
priority: normal
severity: normal
status: open
title: Mark __del__ not being called in cycles as an impl detail
type: behavior

___
Python tracker 

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



[issue17232] Improve -O docs

2013-02-18 Thread Maciej Fijalkowski

New submission from Maciej Fijalkowski:

This is what the current documentation says:

-O
Turn on basic optimizations. This changes the filename extension for compiled 
(bytecode) files from .pyc to .pyo. See also PYTHONOPTIMIZE.

-OO
Discard docstrings in addition to the -O optimizations.

As far as I know, the only "optimization" that's done is removal of __debug__ 
sections and assert statements and has been like this for years. Maybe it 
should say so "-O does not do any optimizations, only removes assert statement" 
or so.

--
assignee: docs@python
components: Documentation
messages: 182365
nosy: docs@python, fijall
priority: normal
severity: normal
status: open
title: Improve -O docs
type: behavior

___
Python tracker 

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



[issue17230] when forking, buffered output is not flushed first.

2013-02-18 Thread Gregory P. Smith

Gregory P. Smith added the comment:

os.fork() is a low level system call wrapper.  Anyone using it needs to deal 
with flushing whatever buffers their application has before forking among many 
many other things.  There is a reason it lives in the os module.

It is already a dangerous system call to use from Python (ie: your child is 
likely to lock up if your parent had any threads).  There really is nothing we 
can or should do to make it better.

--
nosy: +gregory.p.smith
resolution:  -> wont fix
status: open -> closed
title: when forking without tty, code is run from start -> when forking, 
buffered output is not flushed first.

___
Python tracker 

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



[issue17233] http.client header debug output format

2013-02-18 Thread Kim Gräsman

New submission from Kim Gräsman:

Python 3.2.3 on 64-bit Windows 7.

When I set debuglevel on HTTPConnection to 1, the output seems jumbled, and I'm 
having trouble interpreting it.

Attached is a full, anonymized log from a conversation I was troubleshooting.

Here's an excerpt:

 send: b'GET /a HTTP/1.1\r\nHost: localhost:55380\r\nAccept-Encoding: 
identity\r\n\r\n'
 reply: 'HTTP/1.1 503 Service unavailable\r\n'
 header: Connection header: Content-Length header: Content-Type header: Date 
send: b'GET /a HTTP/1.1\r\nHost: localhost:55380\r\nAccept-Encoding: 
identity\r\n\r\n'
 reply: 'HTTP/1.1 503 Service unavailable\r\n'

- Does line 3, starting with header:, show headers for the request or response? 
I'm guessing response, but it didn't occur to me until just now, after a full 
day of looking at it.
- It would be nice if the header dump showed both header key and value
- There's a trailing "send:" at the end of the header: line, shouldn't that be 
on its own line?

Overall, not printing a newline after these debug statements makes it really 
hard to combine with other print debugging, as unrelated prints show up at the 
end of every line of httpclient's debug output.

I find "header" a bit confusing as a prefix, as it doesn't say whether it's 
request or response headers. Maybe change the prefix to "response-headers:" and 
also add "request-headers:", even if those are visible in the "send:" lines? 
Alternatively, why not show the response headers in the "reply:" dump?

Would you consider patches to address these concerns?

Thank you!

--
components: Library (Lib)
files: httpclient.debuglevel.txt
messages: 182367
nosy: Kim.Gräsman
priority: normal
severity: normal
status: open
title: http.client header debug output format
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file29120/httpclient.debuglevel.txt

___
Python tracker 

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