[issue20015] Allow 1-character ASCII unicode where 1-character str is required

2013-12-21 Thread Stefan Krah

Stefan Krah added the comment:

Well, generally I'd be against adding features, but this particular one
could be rationalized in the same way as PEP 414.  So I'm simply unsure
whether the feature should be added, but *if* it's added, it should
be backed by a pronouncement either from the RM or Guido.

--

___
Python tracker 

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



[issue20039] Missing documentation for argparse.ArgumentTypeError

2013-12-21 Thread Arnaut Billings

New submission from Arnaut Billings:

There is no documentation for argparse.ArgumentTypeError:

http://docs.python.org/3/library/unittest.html

Though it does appear in an example and its usage is simple enough to decipher 
what it means, it would none the less look more professional if there was 
formal documentation for it. Not only on what it is, but when it should 
actually be used, etc...

--
assignee: docs@python
components: Documentation
messages: 206723
nosy: arnaut-billings, docs@python
priority: normal
severity: normal
status: open
title: Missing documentation for argparse.ArgumentTypeError
versions: Python 3.3

___
Python tracker 

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



[issue20038] Crash due to I/O in __del__

2013-12-21 Thread STINNER Victor

STINNER Victor added the comment:

>
> This issue is a duplicate of issue #20037.

--

___
Python tracker 

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



[issue20015] Allow 1-character ASCII unicode where 1-character str is required

2013-12-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

PEP414 was about adding a feature to 3.3 well before the first alpha release. 

What Guido has recently said about 2.7 is that after 3 1/2 years we should 
concentrate on build issues such as came up with the new OSX and de-emphasize 
or even cease fixing bugs. He thinks that by now, people will have worked 
around the ones that matter.

--

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy: +skrah

___
Python tracker 

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



[issue20038] Crash due to I/O in __del__

2013-12-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution:  -> duplicate
status: open -> closed
superseder:  -> Calling traceback.format_exception() during Pyhon shutdown does 
crash Python

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Yes, the current idiom for calling PyModule_GetState in extension modules isn't 
safe (because it assumes nothing ever errors out, which can be wrong in the 
shutdown phase).

--
nosy: +gvanrossum, ncoghlan, pitrou

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Speaking of which, Victor, your script works here:

$ ./python futcrash.py 
Future/Task exception was never retrieved:
Traceback (most recent call last):
  File "futcrash.py", line 4, in 
raise ValueError()
ValueError

--

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ah, that was before the latest changes. Scratch that.

--

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

See issue18710 for an API proposal which may help in some cases.

Also, see https://mail.python.org/pipermail/python-dev/2013-August/127862.html 
for an involved discussion of issues with the current "module state" scheme.

--

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Note that the module state is only used when no explicit encoding is given to 
TextIOWrapper(), so the following patch fixes this particular issue:

$ hg di
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -852,7 +852,7 @@ textiowrapper_init(textio *self, PyObjec
 char *errors = NULL;
 char *newline = NULL;
 int line_buffering = 0, write_through = 0;
-_PyIO_State *state = IO_STATE;
+_PyIO_State *state = NULL;
 
 PyObject *res;
 int r;
@@ -891,6 +891,7 @@ textiowrapper_init(textio *self, PyObjec
 if (encoding == NULL) {
 /* Try os.device_encoding(fileno) */
 PyObject *fileno;
+state = IO_STATE;
 fileno = _PyObject_CallMethodId(buffer, &PyId_fileno, NULL);
 /* Ignore only AttributeError and UnsupportedOperation */
 if (fileno == NULL) {


However, since doing I/O at shutdown is not a particularly uncommon operation, 
we should still fix the general case to at least raise a proper exception.

--

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a patch with tests.

--
keywords: +patch
stage:  -> patch review
type:  -> crash
Added file: http://bugs.python.org/file33242/iostate_shutdown.patch

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I think that #19421 was also a duplicate of this issue. Updated example 
from this issue: attached script crash_logging_exc_info.py.

Output:
---
$ ./python crash_logging_exc_info.py
Erreur de segmentation (core dumped)
---

Output with iostate_shutdown.patch applied:
---
$ ./python ~/crash_logging_exc_info.py 
CRITICAL:root:error
Traceback (most recent call last):
  File "/home/haypo/crash_logging_exc_info.py", line 7, in __del__
raise ValueError()
ValueError
---

@Antoine: You should also add a test based on crash_logging_exc_info.py in 
test_logging, to test the whole feature (display a traceback during Python 
shutdown).

--
Added file: http://bugs.python.org/file33243/crash_logging_exc_info.py

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread STINNER Victor

STINNER Victor added the comment:

iostate_shutdown.patch: "_PyIO_State *state = IO_STATE;" looks weird to me. The 
macro should be take parenthesis: "_PyIO_State *state = IO_STATE();". When I 
read IO_STATE, it looks like a global variable, whereas it does call a real 
function.

--

___
Python tracker 

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



[issue20040] Tracing not disabled in generator when the system trace function returns None.

2013-12-21 Thread Xavier de Gaye

New submission from Xavier de Gaye:

The sys.settrace documentation states:
  The trace function is invoked (with event set to 'call') whenever a new local 
scope is entered;
  it should return a reference to a local trace function to be used that scope, 
or None if the scope shouldn’t be traced.

But when tracing a generator, 'line' events may be traced even though tracing 
has been disabled by
returning None at the 'call' event. Run the attached tracer.py with 0 as 
argument and see that
tracing does not stop as it should when count is 1:
$ python tracer.py 0
call gen with count 0
line
line
return
call gen with count 1
returning None: the scope shouldn’t be traced
line
return

However, when tracer.py is run with 1 as argument, tracing is (correctly) 
disabled when count is 1
and 2. This problem is closely related to issue 11992.
The dispatch_call() method of Bdb in the bdb module is broken when the frame is 
a generator and the
previous command is next, until or return (and when this problem is fixed).

--
components: Interpreter Core
files: tracer.py
messages: 206734
nosy: xdegaye
priority: normal
severity: normal
status: open
title: Tracing not disabled in generator when the system trace function returns 
None.
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file33244/tracer.py

___
Python tracker 

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



[issue19861] Update What's New for Python 3.4

2013-12-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +r.david.murray

___
Python tracker 

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



[issue20041] TypeError when f_trace is None and tracing.

2013-12-21 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
keywords: +patch
Added file: http://bugs.python.org/file33246/f_trace.patch

___
Python tracker 

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



[issue20041] TypeError when f_trace is None and tracing.

2013-12-21 Thread Xavier de Gaye

New submission from Xavier de Gaye:

Section 3.2 of 'The Python Language Reference' states:
  f_trace, if not None, is a function called at the start of each source code 
line

Run the attached tracer.py and see that although f_trace is None in both cases 
when 'cmd' is either
'delete' or 'set', the second case raises a TypeError exception:
$ python tracer.py
f_trace: None
delete start
delete done
f_trace: None
set start
Traceback (most recent call last):
  File "tracer.py", line 19, in 
foo('set')
  File "tracer.py", line 15, in foo
print(cmd, 'done')
  File "tracer.py", line 15, in foo
print(cmd, 'done')
TypeError: 'NoneType' object is not callable

Also, the frame.f_lineno may be wrong in a traceback when f_trace is set to 
None because
PyFrame_GetLineNumber() does not handle this case.

The attached patch fixes this issue.
The patch also fixes issue 11992 and issue 20040.
The patch also fixes the dispatch_call() method of Bdb in the bdb module when 
the frame is a
generator and the previous command is next, until or return.
The patch also provides a backward compatible solution to the performance 
enhancement described in
issue 16672.

--
components: Interpreter Core
files: tracer.py
messages: 206735
nosy: xdegaye
priority: normal
severity: normal
status: open
title: TypeError when f_trace is None and tracing.
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file33245/tracer.py

___
Python tracker 

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



[issue16672] improve tracing performances when f_trace is NULL

2013-12-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

A patch proposed in issue 20041 provides a backward compatible solution to this 
performance enhancement.

--

___
Python tracker 

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



[issue19463] assertGdbRepr depends on hash randomization / endianess

2013-12-21 Thread Stefan Krah

Stefan Krah added the comment:

Also on System Z:

http://buildbot.python.org/all/builders/System%20Z%20Linux%203.x/builds/1009/steps/test/logs/stdio

Setting priority to "normal", since it's the only test failing on
System Z and generally green buildbots are more useful.

--
keywords: +buildbot
nosy: +dmalcolm, skrah
priority: low -> normal

___
Python tracker 

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



[issue20040] Tracing not disabled in generator when the system trace function returns None.

2013-12-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

A patch is proposed in issue 20041.

--

___
Python tracker 

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



[issue11992] sys.settrace doesn't disable tracing if a local trace function returns None

2013-12-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

See also issue 20040.

--
nosy: +xdegaye

___
Python tracker 

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



[issue19463] assertGdbRepr depends on hash randomization / endianess

2013-12-21 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I didn't notice this issue. I created the duplicate #19753 and I did some 
changes to try to fix it.

--
nosy: +haypo

___
Python tracker 

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



[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Konstantin Zemlyak

New submission from Konstantin Zemlyak:

Running `py.exe юникод.py` in cmd window fails:

E:\>set PYLAUNCH_DEBUG=1

E:\>py юникод.py
launcher build: 32bit
launcher executable: Console
File 'C:\Users\Zart\AppData\Local\py.ini' non-existent
Using global configuration file 'C:\Windows\py.ini'
Called with command line: .pymaybe_handle_shebang: read 211 bytes
maybe_handle_shebang: BOM not found, using UTF-8
parse_shebang: found command: python3
locating Pythons in 64bit registry
locate_pythons_for_key: unable to open PythonCore key in HKCU
locate_pythons_for_key: "C:\Program Files\Python27\python.exe" is a 64bit 
executable
locate_pythons_for_key: "C:\Program Files\Python2\PCBuild\python.exe: 
?? ?? ? ? ?, ? ? ??? ? .
locate_pythons_for_key: "C:\Program Files\Python2\PCBuild\amd64\python.exe: 
?? ?? ? ? ?, ? ? ??? ? .
locate_pythons_for_key: "C:\Program Files\Python32\python.exe" is a 64bit 
executable
locate_pythons_for_key: "C:\Program Files\Python3\PCBuild\python.exe: 
?? ?? ? ? ?, ? ? ??? ? .
locate_pythons_for_key: "C:\Program Files\Python3\PCBuild\amd64\python.exe: 
?? ?? ? ? ?, ? ? ??? ? .
locate_pythons_for_key: "C:\Program Files\Python33\python.exe" is a 64bit 
executable
locate_pythons_for_key: "C:\Program Files\Python3\PCBuild\python.exe: 
?? ?? ? ? ?, ? ? ??? ? .
locate_pythons_for_key: "C:\Program Files\Python3\PCBuild\amd64\python.exe: 
?? ?? ? ? ?, ? ? ??? ? .
locating Pythons in native registry
locate_pythons_for_key: unable to open PythonCore key in HKCU
locate_pythons_for_key: "C:\Program Files (x86)\Python27\python.exe" is a 32bit 
executable
locate_pythons_for_key: "C:\Program Files (x86)\Python2\PCBuild\python.exe: 
?? ?? ? ? ?, ? ? ??? ? .
locate_pythons_for_key: "C:\Program Files 
(x86)\Python2\PCBuild\amd64\python.exe: ?? ?? ? ? ?, 
? ? ??? ? .
locate_pythons_for_key: "C:\Program Files (x86)\Python32\python.exe" is a 32bit 
executable
locate_pythons_for_key: "C:\Program Files (x86)\Python3\PCBuild\python.exe: 
?? ?? ? ? ?, ? ? ??? ? .
locate_pythons_for_key: "C:\Program Files 
(x86)\Python3\PCBuild\amd64\python.exe: ?? ?? ? ? ?, 
? ? ??? ? .
locate_pythons_for_key: "C:\Program Files (x86)\Python33\python.exe" is a 32bit 
executable
locate_pythons_for_key: "C:\Program Files (x86)\Python3\PCBuild\python.exe: 
?? ?? ? ? ?, ? ? ??? ? .
locate_pythons_for_key: "C:\Program Files 
(x86)\Python3\PCBuild\amd64\python.exe: ?? ?? ? ? ?, 
? ? ??? ? .
found configured value 'python3=3.2-32' in environment
search for Python version '3.2-32' found '"C:\Program Files 
(x86)\Python32\python.exe"'
run_child: about to run '"C:\Program Files (x86)\Python32\python.exe" .py'
C:\Program Files (x86)\Python32\python.exe: can't open file '.py': [Errno 2] No 
such file or directory
child process exit code: 2


Note "Called with command line: .py" in output shows that filename was mangled 
very early on. Invoking `юникод.py` (which is associated with py.exe) directly 
works fine though.

The problem lies in Windows handling of command-line arguments and fix to this 
is simple but non-obvious. Patch attached.

--
components: Unicode, Windows
files: pylauncher-fix-launcing-unicode-filenames.patch
keywords: patch
messages: 206741
nosy: ezio.melotti, haypo, zart
priority: normal
severity: normal
status: open
title: Python Launcher for Windows fails to invoke scripts with non-latin names
type: behavior
versions: Python 3.3
Added file: 
http://bugs.python.org/file33247/pylauncher-fix-launcing-unicode-filenames.patch

___
Python tracker 

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



[issue19463] assertGdbRepr depends on hash randomization / endianess

2013-12-21 Thread STINNER Victor

STINNER Victor added the comment:

When trying to workaround a bug in the implementation of the PEP 456 (which was 
not known as a bug at this time), I implemented something using subprocessing 
which may be reused on SystemZ (or maybe on all platforms):

changeset:   87290:11cb1c8faf11
user:Victor Stinner 
date:Wed Nov 20 12:27:48 2013 +0100
files:   Lib/test/test_gdb.py
description:
Issue #19183: Fix repr() tests of test_gdb, hash() is now platform dependent

--

___
Python tracker 

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



[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Konstantin Zemlyak

Changes by Konstantin Zemlyak :


Removed file: 
http://bugs.python.org/file33247/pylauncher-fix-launcing-unicode-filenames.patch

___
Python tracker 

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



[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Konstantin Zemlyak

Konstantin Zemlyak added the comment:

Sorry, fixed whitespaces in the patch.

--
Added file: 
http://bugs.python.org/file33248/pylauncher-fix-launcing-unicode-filenames.patch

___
Python tracker 

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



[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread STINNER Victor

STINNER Victor added the comment:

It looks like the wide character strings (wchar_t*) are misused. For example:

error(RC_NO_PYTHON, L"Requested Python version (%s) ...", &p[1]);
fwprintf(stdout, L"usage: %s ...\n\n", argv[0]);

The %s formatter is for byte string (char*), "%ls" should be used instead.

+   _setmode(_fileno(stdout), _O_WTEXT);

Extract of wprintf() documentation:

"The wprintf() and vwprintf() functions perform wide-character output to 
stdout.  stdout must not be byte oriented;  see  fwide(3)  for more 
information."

So _setmode() or fwide() should be used if I understood correctly. Or wprintf() 
should be replaced with printf() (still with "%ls" format)?

wprintf("%ls") replaces unencodable character string arguments by ? (U+003F), 
whereas printf("%ls") and wprintf("%s") truncates the output at the first 
undecodable/unencodable character:
http://unicodebook.readthedocs.org/en/latest/programming_languages.html#printf-functions-family

So wprintf() is probably better here.

--

___
Python tracker 

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



[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +brian.curtin, loewis, tim.golden

___
Python tracker 

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



[issue20040] Tracing not disabled in generator when the system trace function returns None.

2013-12-21 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +nedbat

___
Python tracker 

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



[issue20040] Tracing not disabled in generator when the system trace function returns None.

2013-12-21 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +pitrou, serhiy.storchaka

___
Python tracker 

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



[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Konstantin Zemlyak

Konstantin Zemlyak added the comment:

I don't care much about debug output though it probably should be fixed.

The point is that changing text mode of stdout has a weird side effect of 
fixing command-line arguments when invoking interactively from cmd.exe.

--

___
Python tracker 

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



[issue19861] Update What's New for Python 3.4

2013-12-21 Thread STINNER Victor

STINNER Victor added the comment:

There is a command to generate a list a list versionchanged, but I don't 
remember it.

--
nosy: +haypo

___
Python tracker 

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



[issue19380] Optimize parsing of regular expressions

2013-12-21 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue20043] test_multiprocessing_main_handling fails --without-threads

2013-12-21 Thread Stefan Krah

New submission from Stefan Krah:

http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/5874/steps/test/logs/stdio


test test_multiprocessing_main_handling crashed -- Traceback (most recent call 
last):
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/test/regrtest.py", 
line 1271, in runtest_inner
the_module = importlib.import_module(abstest)
  File 
"/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/importlib/__init__.py", 
line 129, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 2172, in _gcd_import
  File "", line 2155, in _find_and_load
  File "", line 2144, in _find_and_load_unlocked
  File "", line 1209, in _load_unlocked
  File "", line 1133, in _exec
  File "", line 1436, in exec_module
  File "", line 321, in _call_with_frames_removed
  File 
"/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/test/test_multiprocessing_main_handling.py",
 line 19, in 
import multiprocessing
  File 
"/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/multiprocessing/__init__.py",
 line 16, in 
from . import context
  File 
"/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/multiprocessing/context.py",
 line 3, in 
import threading
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/threading.py", line 
4, in 
import _thread
ImportError: No module named '_thread'

--
components: 2to3 (2.x to 3.x conversion tool)
keywords: buildbot
messages: 206747
nosy: skrah
priority: normal
severity: normal
stage: needs patch
status: open
title: test_multiprocessing_main_handling fails --without-threads
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue14228] It is impossible to catch sigint on startup in python code

2013-12-21 Thread STINNER Victor

STINNER Victor added the comment:

Sorry, but I don't understand this issue. Well, I understood the issue as "When 
I press CTRL+c to interrupt Python, Python does exit". What's wrong with that? 
Why do you send CTRL+c if you don't want Python to exit?

Using custom signal handler (SIG_IGN), it would be possible to ignore SIGINT 
during Python initialization. Using pthread_sigmask(), it is possible to defer 
the handling of the signal until user is able to setup its own custom signal 
handler (or just use try/except KeyboardInterrupt). But I don't like these 
options. I would like to be able to kill (stop) Python as early as possible 
with CTRL+c.

If you are only worried by the long traceback when importing the site module is 
interrupted, you can use -S. On UNIX, you can then use signal.pthread_sigmask() 
to defer the handling of SIGINT.

The whole issue remembers me the dummy question: "is the finally block executed 
even if I unplug the power cable?".

> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652926

This issue can be solved using python -S, calling signal.signal(SIGINT, 
signal.SIG_DFL) and then import the site module manually.

--
nosy: +haypo

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9158f201f6d0 by Antoine Pitrou in branch 'default':
Issue #20037: Avoid crashes when doing text I/O late at interpreter shutdown.
http://hg.python.org/cpython/rev/9158f201f6d0

--
nosy: +python-dev

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Applied Victor's comments and committed the fix.

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

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread STINNER Victor

STINNER Victor added the comment:

> Applied Victor's comments

Thanks!

--

___
Python tracker 

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



[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> patch review
versions: +Python 3.4

___
Python tracker 

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



[issue16136] Removal of VMS support

2013-12-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 568391b3eda9 by Christian Heimes in branch 'default':
Issue #16136: Remove VMS support and VMS-related code
http://hg.python.org/cpython/rev/568391b3eda9

--
nosy: +python-dev

___
Python tracker 

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



[issue19766] test_venv: test_with_pip() failed on "AMD64 Fedora without threads 3.x" buildbot: urllib3 dependency requires the threading module

2013-12-21 Thread Nick Coghlan

Nick Coghlan added the comment:

Donald updated CPython to pip 1.5rc2, so test_venv is now passing without 
threading support:

http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/5874/steps/test/logs/stdio

--
status: open -> closed

___
Python tracker 

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



[issue19766] test_venv: test_with_pip() failed on "AMD64 Fedora without threads 3.x" buildbot: urllib3 dependency requires the threading module

2013-12-21 Thread Nick Coghlan

Changes by Nick Coghlan :


--
resolution:  -> fixed
stage:  -> committed/rejected
type:  -> behavior

___
Python tracker 

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



[issue19744] test_venv fails if SSL/TLS is not available

2013-12-21 Thread Nick Coghlan

Nick Coghlan added the comment:

OK, since pip 1.5 will still have the SSL/TLS dependency, the approach I'll go 
with for 3.4 is to:

1. Have ensurepip refuse to bootstrap pip if the ssl module is not available 
(noting that we'll remove that restriction if pip 1.6 avoids the strict 
dependency)
2. Use import_fresh_module to check that behaviour
3. Ensure venv skips trying to bootstrap pip if the ssl module is not available 
(although the subprocess invocation in the venv tests could make that tricky to 
test when the ssl module actually *is* available)

--
assignee:  -> ncoghlan

___
Python tracker 

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



[issue19734] venv and ensurepip are affected by pip environment variable settings

2013-12-21 Thread Nick Coghlan

Changes by Nick Coghlan :


--
assignee:  -> ncoghlan

___
Python tracker 

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



[issue16136] Removal of VMS support

2013-12-21 Thread Christian Heimes

Christian Heimes added the comment:

All VMS code has been removed except for some code in Lib/platform.py.

MAL:
Do you want to keep the code in the platform module?

--
assignee:  -> lemburg
nosy: +lemburg
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue14228] It is impossible to catch sigint on startup in python code

2013-12-21 Thread telmich

telmich added the comment:

Victor, the problem is *not* that python exits. This is fine and virtually 
every other unix program behaves like that.

The problem is that python throws an ugly-to-read and completly senseless 
backtrace to the novice (end!) user by default. Backtraces are great for 
debugging and should be treated as such, but not presented to an end user by 
default.

But I as a developer, who wants to prevent the user seeing a backtrace while 
she does the most normal thing, this places a huge burden on me and I need to 
use undocumented workarounds to try to prevent this - in the case of a try... 
except block around my whole program even without suceess.

The point is that no programming language should shout its internals to an end 
user and prevent the developer from cushion it easily.

Think about "ls -lR" that throws debugging symbols at you, because you 
interrupted it - you would not want to see them, nor what you be happy if you 
had to cushion and especially not if this was not documented and hard to do.

So in short my request is to make python more user friendly by cushion the 
unnecessary backtrace of a Ctrl-C printed out.

--

___
Python tracker 

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



[issue20043] test_multiprocessing_main_handling fails --without-threads

2013-12-21 Thread Berker Peksag

Berker Peksag added the comment:

This is fixed by changeset http://hg.python.org/cpython/rev/239faf6b6e8d:

http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/5875/steps/test/logs/stdio

--
components: +Library (Lib), Tests -2to3 (2.x to 3.x conversion tool)
nosy: +berker.peksag
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue20043] test_multiprocessing_main_handling fails --without-threads

2013-12-21 Thread Christian Heimes

Christian Heimes added the comment:

Thanks! I wasn't aware of this issue.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue14228] Don't display traceback when import site is interrupted by CTRL+c

2013-12-21 Thread STINNER Victor

STINNER Victor added the comment:

"The problem is that python throws an ugly-to-read and completly senseless 
backtrace to the novice (end!) user by default."

Oh ok, I changed the title of the issue.

"Backtraces are great for debugging and should be treated as such, but not 
presented to an end user by default."

We may hide the traceback by default or even do not write anything by default, 
and write the traceback when -v option is used.

We may hide the traceback when -q is used.

--
title: It is impossible to catch sigint on startup in python code -> Don't 
display traceback when import site is interrupted by CTRL+c

___
Python tracker 

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



[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Konstantin Zemlyak

Konstantin Zemlyak added the comment:

There is something weird with my proposed fix. Right after submitting a bug 
with patch I've updated pythons on my system - 2.7.5 to 2.7.6, 3.3.2 to 3.3.3, 
and installed 3.4.0b1 - both 32- and 64-bit. Then my fixed py.exe stopped 
working.

Then I've added _setmode for stdin/stdout/stderr and rebuilt both debug/release 
and x86/x64 versions:

E:\>set PYLAUNCH_DEBUG=1

E:\>e:\cpython\PCbuild\py.exe юникод.py
launcher build: 32bit
launcher executable: Console
launcher charset: Multi-byte
File 'C:\Users\Zart\AppData\Local\py.ini' non-existent
File 'e:\cpython\PCbuild\py.ini' non-existent
Called with command line: .py
maybe_handle_shebang: read 211 bytes
maybe_handle_shebang: BOM not found, using UTF-8
parse_shebang: found command: python3
locating Pythons in 64bit registry
locate_pythons_for_key: unable to open PythonCore key in HKCU
locate_pythons_for_key: "C:\Program Files\Python27\python.exe" is a 64bit 
executable
locate_pythons_for_key: "C:\Program Files\Python2\PCBuild\python.exe: 
Синтаксическая ошибка в имени файла, имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files\Python2\PCBuild\amd64\python.exe: 
Синтаксическая ошибка в имени файла, имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files\Python32\python.exe" is a 64bit 
executable
locate_pythons_for_key: "C:\Program Files\Python3\PCBuild\python.exe: 
Синтаксическая ошибка в имени файла, имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files\Python3\PCBuild\amd64\python.exe: 
Синтаксическая ошибка в имени файла, имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files\Python33\python.exe" is a 64bit 
executable
locate_pythons_for_key: "C:\Program Files\Python3\PCBuild\python.exe: 
Синтаксическая ошибка в имени файла, имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files\Python3\PCBuild\amd64\python.exe: 
Синтаксическая ошибка в имени файла, имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files\Python34\python.exe" is a 64bit 
executable
locate_pythons_for_key: "C:\Program Files\Python3\PCBuild\python.exe: 
Синтаксическая ошибка в имени файла, имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files\Python3\PCBuild\amd64\python.exe: 
Синтаксическая ошибка в имени файла, имени папки или метке тома.
locating Pythons in native registry
locate_pythons_for_key: unable to open PythonCore key in HKCU
locate_pythons_for_key: "C:\Program Files (x86)\Python27\python.exe" is a 32bit 
executable
locate_pythons_for_key: "C:\Program Files (x86)\Python2\PCBuild\python.exe: 
Синтаксическая ошибка в имени файла, имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files 
(x86)\Python2\PCBuild\amd64\python.exe: Синтаксическая ошибка в имени файла, 
имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files (x86)\Python32\python.exe" is a 32bit 
executable
locate_pythons_for_key: "C:\Program Files (x86)\Python3\PCBuild\python.exe: 
Синтаксическая ошибка в имени файла, имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files 
(x86)\Python3\PCBuild\amd64\python.exe: Синтаксическая ошибка в имени файла, 
имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files (x86)\Python33\python.exe" is a 32bit 
executable
locate_pythons_for_key: "C:\Program Files (x86)\Python3\PCBuild\python.exe: 
Синтаксическая ошибка в имени файла, имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files 
(x86)\Python3\PCBuild\amd64\python.exe: Синтаксическая ошибка в имени файла, 
имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files (x86)\Python34\python.exe" is a 32bit 
executable
locate_pythons_for_key: "C:\Program Files (x86)\Python3\PCBuild\python.exe: 
Синтаксическая ошибка в имени файла, имени папки или метке тома.
locate_pythons_for_key: "C:\Program Files 
(x86)\Python3\PCBuild\amd64\python.exe: Синтаксическая ошибка в имени файла, 
имени папки или метке тома.
found configured value 'python3=3.3-32' in environment
search for Python version '3.3-32' found '"C:\Program Files 
(x86)\Python33\python.exe"'
run_child: about to run '"C:\Program Files (x86)\Python33\python.exe" .py'
C:\Program Files (x86)\Python33\python.exe: can't open file '.py': [Errno 2] No 
such file or directory
child process exit code: 2

E:\>e:\cpython\PCbuild\py_d.exe юникод.py
launcher build: 32bit
launcher executable: Console
launcher charset: Multi-byte
File 'C:\Users\Zart\AppData\Local\py.ini' non-existent
File 'e:\cpython\PCbuild\py.ini' non-existent
Called with command line: юникод.py
maybe_handle_shebang: read 211 bytes
maybe_handle_shebang: BOM not found, using UTF-8
parse_shebang: found command: python3
locating Pythons in 64bit registry
locate_pythons_for_key: unable to open PythonCore key in HKCU
locate_pythons_for_key: "C:\Program Files\Python27\python.exe" is a 64bit 
executable
locate_pythons_for_key: "C:\Program Files\Python2\PCBuild\python.exe: 
Синтаксическая ошибка в имени файла, имен

[issue19861] Update What's New for Python 3.4

2013-12-21 Thread R. David Murray

R. David Murray added the comment:

The command is listed in 'make help'.

It was seeing this issue go by that reminded me that this job needed to be 
done, but it's a big one and will probably take me until the actual release to 
finish it, assuming I manage to finish.  (The 3.3 What's New was never 
finished, but I started contributing to that rather late in the game.)

--

___
Python tracker 

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



[issue20044] gettext.install() ignores previous call to locale.setlocale()

2013-12-21 Thread Francis Moreau

New submission from Francis Moreau:

It seems that gettext.install() uses environment variables such as LANGUAGE, to 
find out which language it should use to find the translation file.

This means that any local settings done by setlocale() previoulsy are ignored.

I don't think it's the case with the C implementation.

--
components: Library (Lib)
messages: 206762
nosy: fmoreau
priority: normal
severity: normal
status: open
title: gettext.install() ignores previous call to locale.setlocale()
versions: Python 2.7

___
Python tracker 

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



[issue18603] PyOS_mystricmp unused and no longer available

2013-12-21 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue20044] gettext.install() ignores previous call to locale.setlocale()

2013-12-21 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue20042] Python Launcher for Windows fails to invoke scripts with non-latin names

2013-12-21 Thread Konstantin Zemlyak

Konstantin Zemlyak added the comment:

Some more fun stuff with command-line (I'm cutting output to few essential 
lines for easier reading):


e:\cpython\PCbuild\py.exe юникод.py
...
Called with command line: .py
run_child: about to run '"C:\Program Files (x86)\Python33\python.exe" .py'
C:\Program Files (x86)\Python33\python.exe: can't open file '.py': [Errno 2] No 
such file or directory
child process exit code: 2

e:\cpython\PCbuild\py.exe e:\юникод.py
...
Called with command line: e:\юникод.py
run_child: about to run '"C:\Program Files (x86)\Python33\python.exe" 
e:\юникод.py'
child process exit code: 0


E:\>e:\cpython\PCbuild\py.exe тест\unicode.py
...
Called with command line: ест\unicode.py
run_child: about to run '"C:\Program Files (x86)\Python33\python.exe" 
ест\unicode.py'
C:\Program Files (x86)\Python33\python.exe: can't open file '': [Errno 2] No such file or directory
child process exit code: 2

E:\>e:\cpython\PCbuild\py.exe e:\тест\unicode.py
...
Called with command line: e:\тест\unicode.py
run_child: about to run '"C:\Program Files (x86)\Python33\python.exe" 
e:\тест\unicode.py'
child process exit code: 0


E:\>e:\cpython\PCbuild\py.exe "юникод.py"
Called with command line: "юникод.py"
run_child: about to run '"C:\Program Files (x86)\Python33\python.exe" 
"юникод.py"'
child process exit code: 0




IOW, so long as command-line starts with ASCII character everything is fine. If 
not, then one or more characters gets mangled. Now I'm not sure whether it's a 
cmd.exe bug or C runtime one, and whether it's possible to workaround about it.

--

___
Python tracker 

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



[issue20045] setup.py register --list-classifiers is broken

2013-12-21 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola':

$ ./python -V
Python 3.4.0b1
$ ./python setup.py register --list-classifiers
running register
running check
Traceback (most recent call last):
  File "setup.py", line 2219, in 
main()
  File "setup.py", line 2214, in main
"Tools/scripts/2to3", "Tools/scripts/pyvenv"]
  File "/home/giampaolo/svn/python/3.4/Lib/distutils/core.py", line 149, in 
setup
dist.run_commands()
  File "/home/giampaolo/svn/python/3.4/Lib/distutils/dist.py", line 955, in 
run_commands
self.run_command(cmd)
  File "/home/giampaolo/svn/python/3.4/Lib/distutils/dist.py", line 974, in 
run_command
cmd_obj.run()
  File "/home/giampaolo/svn/python/3.4/Lib/distutils/command/register.py", line 
54, in run
self.classifiers()
  File "/home/giampaolo/svn/python/3.4/Lib/distutils/command/register.py", line 
90, in classifiers
log.info(response.read())
  File "/home/giampaolo/svn/python/3.4/Lib/distutils/log.py", line 44, in info
self._log(INFO, msg, args)
  File "/home/giampaolo/svn/python/3.4/Lib/distutils/log.py", line 33, in _log
msg = msg.encode(encoding, "backslashreplace").decode(encoding)
AttributeError: 'bytes' object has no attribute 'encode'

--
components: Distutils
messages: 206764
nosy: eric.araujo, giampaolo.rodola, tarek
priority: normal
severity: normal
status: open
title: setup.py register --list-classifiers is broken
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue16074] Bad error message in os.rename, os.link, and os.symlink

2013-12-21 Thread Jakub Wilk

Jakub Wilk added the comment:

As far as rename() and link() are concerned, either of the arguments can cause 
an ENOENT error:

os.rename('/dev/foobar', '/dev/barfoo') # fails because /dev/foobar doesn't 
exist

os.rename('/dev/null', '/foo/bar/baz') # fails because /foo/bar doesn't exist

--
nosy: +jwilk

___
Python tracker 

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-21 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks for the quick fix guys! Sorry for the duplicate bug (probably a race 
condition :-).

--

___
Python tracker 

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



[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-21 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue15216] Support setting the encoding on a text stream after creation

2013-12-21 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue19977] Use "surrogateescape" error handler for sys.stdin and sys.stdout on UNIX for the C locale

2013-12-21 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue19927] Path-based loaders lack a meaningful __eq__() implementation.

2013-12-21 Thread Larry Hastings

Larry Hastings added the comment:

That's not how this works, Eric.  I have to give you permission to add a new 
feature, which I remind you I have yet to do.

--

___
Python tracker 

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



[issue20039] Missing documentation for argparse.ArgumentTypeError

2013-12-21 Thread paul j3

paul j3 added the comment:

In argparse.py the status of ArgumentTypeError is ambiguous.

ArgumentError is listed as a public class, ArgumentTypeError is not.  It also 
says 'All other classes in this module are considered implementation details.'

ArgumentTypeError is a subclass of Exception (with no added functionality).

ArgumentTypeError is raised only once, in the FileType class (which is both a 
scripting convenience and example of a custom type).  As you note it is also 
used in the documentation example.  There is also one such example in 
test_argparse.py.

It is caught once, where it is converted into an ArgumentError.  It is handled 
much like a ValueError or TypeError - except that its message is passed through 
unchanged.  

In http://bugs.python.org/issue13824 I use it several times in the FileContext 
class for just this reason.  

In fact ArgumentTypeError could be documented as a footnote to the `type` 
block, saying to the effect: 'An ArgumentTypeError may be raised (instead of a 
ValueError or TypeError) to produce a custom error message.'

Normally an ArgumentTypeError is not passed back to the user code, consistent 
with the claim that it is not public.

--

Along the same line, should ArgumentError be documented better?  Currently it 
is just mentioned at the end, as a replacement for an optparse error class.

As best I can tell, the user code will only see an ArgumentError if the 
ArgumentParser.error method is customized.  Otherwise that error is caught and 
converted into a system exit.  Maybe the `error` paragraph in the documentation 
should get a sentence about ArgumentError.

In test_argparse.py, ArgumentError is used extensively (with a custom error 
method).

--
nosy: +paul.j3

___
Python tracker 

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



[issue20046] Optimize locale aliases table

2013-12-21 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch removes over 400 entities from locale alias tables. They are 
redundant because they can be calculated on fly.

Also it enables utf8 aliases. Now this adds not hundreds of redundant aliases, 
but only 8 new locales:

+'be_bg.utf8':   'bg_BG.UTF-8',
+'c.utf8':   'en_US.UTF-8',
+'en_dl.utf8':   'en_DL.UTF-8',
+'en_zw.utf8':   'en_ZS.UTF-8',
+'pa_pk.utf8':   'pa_PK.UTF-8',
+'sr_yu.utf8':   'sr_RS.UTF-8',
+'te_in.utf8':   'te_IN.UTF-8',
+'zh_sg.utf8':   'zh_SG.UTF-8',

--
components: Library (Lib)
files: locale_optimize_aliases.patch
keywords: patch
messages: 206769
nosy: lemburg, loewis, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Optimize locale aliases table
type: enhancement
Added file: http://bugs.python.org/file33249/locale_optimize_aliases.patch

___
Python tracker 

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



[issue20046] Optimize locale aliases table

2013-12-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Fix makelocalealias.py for Python 3, Fixed support for Indian 
locales

___
Python tracker 

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



[issue20046] Optimize locale aliases table

2013-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Example.

 'br_fr':'br_FR.ISO8859-1',
-'br_fr.iso88591':   'br_FR.ISO8859-1',
-'br_fr.iso885914':  'br_FR.ISO8859-14',
-'br_fr.iso885915':  'br_FR.ISO8859-15',
-'br_fr.iso885915@euro': 'br_FR.ISO8859-15',
-'br_fr.utf8@euro':  'br_FR.UTF-8',
-'br_fr@euro':   'br_FR.ISO8859-15',

Only one of 7 br_fr entities are left. For br_fr.iso88591, br_fr.iso885914 and 
br_fr.iso885915 just replaced encoding of base br_fr locale. For 
br_fr.iso885915@euro and br_fr.utf8@euro the @euro modifier is dropped because 
ISO8859-15 and UTF-8 already contains the euro character. For br_fr@euro 
default ISO8859-1 encoding replaced to ISO8859-15 and the @euro modifier is 
dropped.

So now the table contains only base entities which map lang_country to 
lang_country.encoding and special cases for deprecated and obscure aliases.

--

___
Python tracker 

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



[issue19463] assertGdbRepr depends on hash randomization / endianess

2013-12-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> http://buildbot.python.org/all/builders/System%20Z%20Linux%203.x/builds/1009/steps/test/logs/stdio

This is a different issue than the one reported here.

I'm not seeing any recent failures on "PPC64 PowerLinux 3.x". Christian, can we 
close?

--
nosy: +pitrou

___
Python tracker 

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



[issue19927] Path-based loaders lack a meaningful __eq__() implementation.

2013-12-21 Thread Eric Snow

Eric Snow added the comment:

My bad, Larry.  I guess I was reading between the lines too much. :)

--

___
Python tracker 

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



[issue20047] bytearray partition bug

2013-12-21 Thread Mark Lawrence

New submission from Mark Lawrence:

If partition is called with a single byte it works correctly but if called with 
the equivalent integer it returns the same bytearray with two empty arrays as 
follows.

py> ba = bytearray(range(8))
py> ba
bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07')
py> 3 in ba
True
py> ba.find(3) == ba.index(3) == ba.find(b'\x03')
True
py> ba.partition(b'\x03')
(bytearray(b'\x00\x01\x02'), bytearray(b'\x03'), bytearray(b'\x04\x05\x06
\x07'))
py> ba.partition(3)
(bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07'), bytearray(b''), bytearray
(b''))

More background on the thread starting here 
https://mail.python.org/pipermail/python-list/2013-December/663111.html which 
refers to Issue 12170.

--
components: Interpreter Core
messages: 206773
nosy: BreamoreBoy
priority: normal
severity: normal
status: open
title: bytearray partition bug
type: behavior
versions: Python 3.3

___
Python tracker 

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



[issue20047] bytearray partition bug

2013-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Similar bug was in 3.2:

>>> ba = bytearray(range(8))
>>> ba[2:6]
bytearray(b'\x02\x03\x04\x05')
>>> ba[2:6] = 2
>>> ba
bytearray(b'\x00\x01\x00\x00\x06\x07')

Now it is fixed.

--
nosy: +serhiy.storchaka
versions: +Python 3.4

___
Python tracker 

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



[issue20047] bytearray partition bug

2013-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Bytearray slice assignment bug was fixed in issue8401.

--
nosy: +ezio.melotti, georg.brandl, loewis, mark.dickinson, pitrou

___
Python tracker 

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



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-12-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a proper patch (for 3.3). Untested under Windows, but should work.

--
nosy: +pitrou
Added file: http://bugs.python.org/file33250/tempfile_lifetime.patch

___
Python tracker 

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



[issue19980] Improve help('non-topic') response

2013-12-21 Thread Elias Zamaria

Elias Zamaria added the comment:

I have created a patch that fixes this issue that terry.reedy described. It 
does not fix the problem described BreamoreBoy involving the empty string.

Please note that this is my first patch for Python so let me know if I am 
missing something or if I can do anything else to help.

--
keywords: +patch
nosy: +mikez302
Added file: http://bugs.python.org/file33251/help-response.patch

___
Python tracker 

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



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-12-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Oops, removed two debug lines.

--

___
Python tracker 

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



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-12-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Removed file: http://bugs.python.org/file33250/tempfile_lifetime.patch

___
Python tracker 

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



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-12-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Added file: http://bugs.python.org/file33252/tempfile_lifetime.patch

___
Python tracker 

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



[issue20048] zipfile's readline() drops data in universal newline mode

2013-12-21 Thread Alexander Belopolsky

New submission from Alexander Belopolsky:

This problem happens when I unpack a file from a 200+ MB zip archive as follows:

with zipfile.ZipFile(archive) as z:
data = b''
with z.open(filename, 'rU') as f:
for line in f:
data += line


I cannot reduce it to a test case suitable for posting here, but the culprit is 
the following code in zipfile.py:

def peek(self, n=1):
"""Returns buffered bytes without advancing the position."""
if n > len(self._readbuffer) - self._offset:
chunk = self.read(n)
self._offset -= len(chunk)

See http://hg.python.org/cpython/file/81f8375e60ce/Lib/zipfile.py#l605

The problem occurs when peek() is called on the boundary of the uncompress 
buffer and read() goes through more than one readbuffer.  The result is that 
self._offset is smaller than len(chunk) leading to a non-sensical negative 
self._offset upon return from peek().

This problem does not seem to appear in 3.x since 028e8e0b03e8.

--
messages: 206779
nosy: belopolsky
priority: normal
severity: normal
status: open
title: zipfile's readline() drops data in universal newline mode
versions: Python 2.7

___
Python tracker 

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



[issue20048] zipfile's readline() drops data in universal newline mode

2013-12-21 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
dependencies: +Add support for bzip2 compression to the zipfile module
keywords: +gsoc
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. Thank you Antoine.

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

___
Python tracker 

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



[issue20048] zipfile's readline() drops data in universal newline mode

2013-12-21 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
keywords: +3.2regression -gsoc
nosy: +alanmcintyre

___
Python tracker 

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



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-12-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f3b7a76fb778 by Antoine Pitrou in branch '3.3':
Issue #18879: When a method is looked up on a temporary file, avoid closing the 
file before the method is possibly called.
http://hg.python.org/cpython/rev/f3b7a76fb778

New changeset d68ab2eb7a77 by Antoine Pitrou in branch 'default':
Issue #18879: When a method is looked up on a temporary file, avoid closing the 
file before the method is possibly called.
http://hg.python.org/cpython/rev/d68ab2eb7a77

--
nosy: +python-dev

___
Python tracker 

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



[issue20048] zipfile's readline() drops data in universal newline mode

2013-12-21 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
keywords:  -3.2regression

___
Python tracker 

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



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-12-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Fixed in 3.3 and 3.4. I think 2.7 is irrelevant at this point.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue20048] zipfile's readline() drops data in universal newline mode

2013-12-21 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
components: +Library (Lib)
type:  -> behavior

___
Python tracker 

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



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-12-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: commit review -> committed/rejected
versions:  -Python 2.7

___
Python tracker 

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



[issue20045] setup.py register --list-classifiers is broken

2013-12-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
priority: normal -> high
stage:  -> needs patch
type:  -> behavior
versions:  -Python 3.2

___
Python tracker 

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



[issue20039] Missing documentation for argparse.ArgumentTypeError

2013-12-21 Thread Arnaut Billings

Arnaut Billings added the comment:

It seems what you're saying is that the ArgumentTypeError class should not be 
public, but being able to raise is should be public. If that's the case, I 
think it would be more clear to have an argparse.raiseArgumentTypeError method 
and document when it should be used.

If such classes are meant to be private, why not prepend their names with an 
underscore and remove them from the __all__ list? (I thought a leading 
underscore meant that a module level variable was private to that module.)

--

___
Python tracker 

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



[issue20048] zipfile's readline() drops data in universal newline mode

2013-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Does this patch fix a bug?

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file33253/zipfile_peek.patch

___
Python tracker 

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



[issue20048] zipfile's readline() drops data in universal newline mode

2013-12-21 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

It does!

--

___
Python tracker 

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



[issue7464] circular reference in HTTPResponse by urllib2

2013-12-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +pitrou

___
Python tracker 

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



[issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object

2013-12-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +pitrou

___
Python tracker 

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



[issue18144] FD leak in urllib2

2013-12-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +pitrou, serhiy.storchaka

___
Python tracker 

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



[issue20049] string.lowercase and string.uppercase can contain garbage

2013-12-21 Thread Alexander Pyhalov

New submission from Alexander Pyhalov:

When Python 2.6 (or 2.7) compiled with _XOPEN_SOURCE=600 on illumos  
string.lowercase and string.uppercase contain garbage when UTF-8 locale is 
used. 
(OpenIndiana bug report - https://www.illumos.org/issues/4411 ).
The reason is that with UTF-8 locale islower()/isupper() and similar functions 
are not expected to work with non-ascii symbols. 
So, code like 

n = 0;
for (c = 0; c < 256; c++) {
if (islower(c))
buf[n++] = c;
}

is expected to fail, because it calls islower on illegal UTF-8 symbols (with 
codes 128-255). It should be converted to something like

n = 0;
for (c = 0; c < 256; c++) {
if (isascii(c) && islower(c))
buf[n++] = c;
}

or to 

n = 0;
for (c = 0; c < 128; c++) {
if (islower(c))
buf[n++] = c;
}

Before doing this you should check if locale is UTF-8. However, almost all 
non-C locales on illumos are UTF-8. 


Example of incorrect behavior: 

Python 2.6.9 (unknown, Nov 12 2013, 13:54:48) 
[GCC 4.7.3] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import string
>>> string.lowercase
'abcdefghijklmnopqrstuvwxyz\\xaa\\xb5\\xba\\xdf\\xe0\\xe1\\xe2\\xe3\\xe4\\xe5\\xe6\\xe7\\xe8\\xe9\\xea\\xeb\\xec\\xed\\xee\\xef\\xf0\\xf1\\xf2\\xf3\\xf4\\xf5\\xf6\\xf8\\xf9\\xfa\\xfb\\xfc\\xfd\\xfe\\xff'
>>> string.uppercase
'ABCDEFGHIJKLMNOPQRSTUVWXYZ\\xc0\\xc1\\xc2\\xc3\\xc4\\xc5\\xc6\\xc7\\xc8\\xc9\\xca\\xcb\\xcc\\xcd\\xce\\xcf\\xd0\\xd1\\xd2\\xd3\\xd4\\xd5\\xd6\\xd8\\xd9\\xda\\xdb\\xdc\\xdd\\xde'
>>>

--
components: Unicode
messages: 206786
nosy: Alexander.Pyhalov, ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: string.lowercase and string.uppercase can contain garbage
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue20046] Optimize locale aliases table

2013-12-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 21.12.2013 20:33, Serhiy Storchaka wrote:
> 
> Serhiy Storchaka added the comment:
> 
> Example.
> 
>  'br_fr':'br_FR.ISO8859-1',
> -'br_fr.iso88591':   'br_FR.ISO8859-1',
> -'br_fr.iso885914':  'br_FR.ISO8859-14',
> -'br_fr.iso885915':  'br_FR.ISO8859-15',
> -'br_fr.iso885915@euro': 'br_FR.ISO8859-15',
> -'br_fr.utf8@euro':  'br_FR.UTF-8',
> -'br_fr@euro':   'br_FR.ISO8859-15',
> 
> Only one of 7 br_fr entities are left. For br_fr.iso88591, br_fr.iso885914 
> and br_fr.iso885915 just replaced encoding of base br_fr locale. For 
> br_fr.iso885915@euro and br_fr.utf8@euro the @euro modifier is dropped 
> because ISO8859-15 and UTF-8 already contains the euro character. For 
> br_fr@euro default ISO8859-1 encoding replaced to ISO8859-15 and the @euro 
> modifier is dropped.
> 
> So now the table contains only base entities which map lang_country to 
> lang_country.encoding and special cases for deprecated and obscure aliases.

Looks like an interesting approach, but I'd like to think about it
a day or two.

Some notes:
* the patch seems to include some unrelated changes, e.g. the
  devanagari fixes and a few new mappings
* the optimize step is called twice for some reason - is this
  intended ? if yes, please add a comment why this is done
* the patch would need some tests to make sure that the removed
  aliases indeed still map to the correct C locale strings

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

--

___
Python tracker 

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



[issue20048] zipfile's readline() drops data in universal newline mode

2013-12-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8b097d07488d by Serhiy Storchaka in branch '2.7':
Issue #20048: Fixed ZipExtFile.peek() when it is called on the boundary of
http://hg.python.org/cpython/rev/8b097d07488d

--
nosy: +python-dev

___
Python tracker 

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



[issue20048] zipfile's readline() drops data in universal newline mode

2013-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Than you for your report and irrefragable analysis.

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

___
Python tracker 

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



[issue20045] setup.py register --list-classifiers is broken

2013-12-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Fixed, thanks for reporting.

--
nosy: +pitrou
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue20045] setup.py register --list-classifiers is broken

2013-12-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cffed58b1bbd by Antoine Pitrou in branch '3.3':
Issue #20045: Fix "setup.py register --list-classifiers".
http://hg.python.org/cpython/rev/cffed58b1bbd

New changeset 597b69d3a74f by Antoine Pitrou in branch 'default':
Issue #20045: Fix "setup.py register --list-classifiers".
http://hg.python.org/cpython/rev/597b69d3a74f

--
nosy: +python-dev

___
Python tracker 

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



[issue20047] bytearray partition bug

2013-12-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Whatever the change, bytes and bytearray should act the same.

>>> b = bytes(range(8))
>>> b
b'\x00\x01\x02\x03\x04\x05\x06\x07'
>>> b.partition(3)
Traceback (most recent call last):
  File "", line 1, in 
b.partition(3)
TypeError: expected bytes, bytearray or buffer compatible object

As noted in the thread, ba.partition(a) apparently is executed as 
ba.partition(bytearray(a)) if a is not a bytearray (or maybe not a buffer 
object). bytearray(3) == bytearray((0,0,0)) and the latter is not in ba and 
hence the output given is 'correct'.

--
nosy: +terry.reedy

___
Python tracker 

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



  1   2   >