[issue13140] ThreadingMixIn.daemon_threads is not honored when parent is daemon

2011-10-09 Thread Florent Xicluna

New submission from Florent Xicluna :

I use the socketserver.ThreadingMixIn to create a TCPServer.

I set the server thread as daemon (t.daemon=True).
But I want the client threads to run as non-daemon.
According to the documentation, the "daemon_threads" class attribute should do 
the trick.

But it fails: if server is daemon, the clients are daemon too, even if 
daemon_threads=False.

Demo attached.

--
components: Library (Lib)
files: test_socketserver.py
messages: 145273
nosy: flox
priority: normal
severity: normal
stage: needs patch
status: open
title: ThreadingMixIn.daemon_threads is not honored when parent is daemon
type: behavior
versions: Python 2.6, Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file23361/test_socketserver.py

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



[issue13141] get rid of old threading API in the examples

2011-10-09 Thread Florent Xicluna

New submission from Florent Xicluna :

http://docs.python.org/dev/library/socketserver.html#asynchronous-mixins

Still there's getName or setDaemon in some example.

--
assignee: docs@python
components: Documentation
messages: 145274
nosy: docs@python, flox
priority: low
severity: normal
stage: needs patch
status: open
title: get rid of old threading API in the examples
type: behavior
versions: Python 2.7, Python 3.3

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



[issue13139] multiprocessing.map skips finally blocks

2011-10-09 Thread Florent Xicluna

Florent Xicluna  added the comment:

Same behavior on Python 3.2 with this code:


from multiprocessing import Pool
from time import sleep

def Process(x):
try:
print(x)
sleep(.6-x/10.)
raise Exception('Exception: %d' % x)
finally:
print('Finally: %d' % x)

Pool(3).map(Process, [1, 2, 3])

--
components: +Library (Lib) -None
nosy: +flox
versions: +Python 3.2, Python 3.3

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



[issue13126] find() slower than rfind()

2011-10-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue10444] A mechanism is needed to override waiting for Python threads to finish

2011-10-09 Thread Florent Xicluna

Florent Xicluna  added the comment:

Antoine wrote:
> You could instead enumerate() all threads and set their daemon flag
> to False, before shutting down the interpreter.

If it is intended to work this way, it should be mentioned in the documentation.

Currently the documentation for "Thread.daemon" says:
“This must be set before start() is called, otherwise RuntimeError is raised.”

--
nosy: +flox

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



[issue13187] relative imports don't work when circular

2011-10-15 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue992389] attribute error due to circular import

2011-10-16 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue10197] subprocess.getoutput fails on win32

2011-10-18 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue1757072] Zipfile robustness

2011-10-18 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue13207] os.path.expanduser breaks when using unicode character in the username

2011-10-18 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox
title: os.path.expanduser brakes when using unicode character in the username 
-> os.path.expanduser breaks when using unicode character in the username

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



[issue12170] index() and count() methods of bytes and bytearray should accept byte ints

2011-10-18 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue11085] expose _abcoll as collections.abc

2011-10-18 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue12737] str.title() is overzealous by upcasing combining marks inappropriately

2011-10-18 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue12458] Tracebacks should contain the first line of continuation lines

2011-10-18 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue13212] json library is decoding/encoding when it should not

2011-10-18 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox
stage:  -> needs patch
type:  -> behavior
versions:  -Python 2.6, Python 3.1, Python 3.4

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



[issue13213] generator.throw() behavior

2011-10-18 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue7723] sqlite only accept buffer() for BLOB objects (input/output)

2011-10-18 Thread Florent Xicluna

Changes by Florent Xicluna :


--
status: pending -> closed

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



[issue13141] get rid of old threading API in the examples

2011-10-19 Thread Florent Xicluna

Florent Xicluna  added the comment:

Proposed patch to refresh the socketserver examples.

--
keywords: +patch
stage: needs patch -> patch review
versions: +Python 3.2
Added file: http://bugs.python.org/file23459/issue13141.diff

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



[issue13193] test_packaging and test_distutils failures under Windows

2011-10-19 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue12989] Consistently handle path separator in Py_GetPath on Windows

2011-10-19 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue992389] attribute error due to circular import

2011-10-19 Thread Florent Xicluna

Changes by Florent Xicluna :


--
stage:  -> needs patch
versions: +Python 3.3 -Python 3.2

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



[issue13219] re module doc has minor inaccuracy in character sets

2011-10-20 Thread Florent Xicluna

Florent Xicluna  added the comment:

Well, the actual behavior is a little bit more complex to describe.

>>> re.match('[.-_a-z]', '-')
>>> re.match('[._-a-z]', '-')
<_sre.SRE_Match object at 0x100418e80>


>>> re.match('[.-_a-z]', 'b')
<_sre.SRE_Match object at 0x100418b88>
>>> re.match('[._-a-z]', 'b')

However, I don't think it is worth changing again the documentation.

--
nosy: +flox
type:  -> behavior

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



[issue12753] \N{...} neglects formal aliases and named sequences from Unicode charnames namespace

2011-10-20 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue7322] Socket timeout can cause file-like readline() method to lose data

2011-10-20 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue9168] setuid in smtp.py sheds privileges before binding port

2011-10-20 Thread Florent Xicluna

Florent Xicluna  added the comment:

Fixed. Thank you for the patch.

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

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



[issue13237] subprocess docs should emphasise convenience functions

2011-10-21 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox
type:  -> behavior

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



[issue13239] Remove <> operator from Grammar/Grammar

2011-10-21 Thread Florent Xicluna

Florent Xicluna  added the comment:

This is PEP 401.

"[Because] the != inequality operator ... was a horrible, finger pain inducing 
mistake, the FLUFL reinstates the <> diamond operator as the sole spelling. 
This change is important enough to be implemented for, and released in Python 
3.1. To help transition to this feature, a new future statement, from 
__future__ import barry_as_FLUFL has been added."

--
nosy: +flox
type:  -> behavior

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



[issue13240] computed gotos not enabled?

2011-10-21 Thread Florent Xicluna

New submission from Florent Xicluna :

According to issue 9203 the computed gotos should be enabled by default since 
3.2.
However, it is not visible from the interpreter.

Python 3.2.2 (default, Sep  7 2011, 10:55:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
>>> from sysconfig import get_config_var
>>> get_config_var('HAVE_COMPUTED_GOTOS')
1
>>> get_config_var('USE_COMPUTED_GOTOS')
0

--
components: Build
messages: 146090
nosy: flox, pitrou
priority: normal
severity: normal
status: open
title: computed gotos not enabled?
type: performance
versions: Python 3.2, Python 3.3

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



[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2011-10-21 Thread Florent Xicluna

Florent Xicluna  added the comment:

With the #error, I can confirm that computed gotos are enabled on OS X.

About sysconfig, we may change the code to set None if the value is "undef". I 
don't know the impact.


--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -404,7 +404,7 @@
 else:
 m = undef_rx.match(line)
 if m:
-vars[m.group(1)] = 0
+vars[m.group(1)] = None
 return vars

--

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



[issue12675] tokenize module happily tokenizes code with syntax errors

2011-10-22 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue13140] ThreadingMixIn.daemon_threads is not honored when parent is daemon

2011-10-22 Thread Florent Xicluna

Florent Xicluna  added the comment:

I would prefer to preserve the inheritance by default, and to change the 
daemonic attribute only if it is explicitly set to True or False.
This way it will be backward compatible.

Patch attached.

--
versions:  -Python 2.6
Added file: http://bugs.python.org/file23499/issue13140.diff

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



[issue13248] deprecated in 3.2, should be removed in 3.3

2011-10-23 Thread Florent Xicluna

New submission from Florent Xicluna :

The PEP 387 suggests that deprecated objects or arguments are removed in 
version (n+1).
I've listed these DeprecationWarnings in 3.2, which are still in 3.3.
I assume that most of these deprecated objects or arguments could be removed 
before next release.


*_pyio*
  argument "max_buffer_size" of BufferedWriter and BufferedRWPair
*argparse*
  argument "version" and related methods of ArgumentParser
*asyncore*
  shortcut "dispatcher.*" for "dispatcher.socket.*" attributes
*base64*
  functions "encodestring" and "decodestring"
*cgi*
  functions "parse_qs" and "parse_qsl"
*configparser*
  "ParsingError.filename", "RawConfigParser.readfp", "SafeConfigParser"
*decimal*
  "Context._clamp"
*difflib*
  "SequenceMatcher.isbjunk", "SequenceMatcher.isbpopular"
*gzip*
  "GzipFile.filename"
*http.client*
  argument "strict" of HTTPResponse and HTTPConnection
*lib2to3*
  methods "set_prefix" and "get_prefix" of "pytree.Base"
*mailbox*
  argument of type "StringIO" or "text mode files"
*ntpath*
  function "splitunc"
*tarfile*
  argument "exclude" of "TarFile.add"
*trace*
  old API
*unittest*
  "assert{DictContainsSubset,RaisesRegexp,RegexpMatches}", "fail*"
*xml.etree*
  "Element.getchildren", "XMLParser.doctype"

--
components: Library (Lib)
messages: 146236
nosy: flox
priority: normal
severity: normal
status: open
title: deprecated in 3.2, should be removed in 3.3
type: behavior
versions: Python 3.3

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



[issue13248] deprecated in 3.2, should be removed in 3.3

2011-10-23 Thread Florent Xicluna

Florent Xicluna  added the comment:

In addition, we have some object and attributes which are triggering 
"PendingDeprecationWarning" in 3.2.
We may keep these warnings in 3.3, or choose to turn some of them into 
"DeprecationWarning", to prepare their removal in 3.5.


*cgi*
  "cgi.escape"
*distutils"
  argument compress="compress" of make_tarball
  function "check_metadata" in "command.register"
  option "force-manifest" of "command.sdist"
*importlib*
  "abc.PyLoader" and "abc.PyPycLoader"
*nntplib*
  "_NNTPBase.xgtitle" and "_NNTPBase.xpath"
*smtpd*
  the class-private "__*" attributes
*xml.etree*
  method "getiterator" of "Element" and "ElementTree"

--

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



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Florent Xicluna

Florent Xicluna  added the comment:

in 3.x, same issue.
IMHO documentation should be fixed.

--
assignee:  -> docs@python
components: +Documentation
nosy: +bethard, docs@python, flox
stage:  -> needs patch
versions: +Python 3.2, Python 3.3

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



[issue13141] get rid of old threading API in the examples

2011-10-23 Thread Florent Xicluna

Changes by Florent Xicluna :


--
resolution:  -> fixed
stage: patch review -> committed/rejected

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



[issue13141] get rid of old threading API in the examples

2011-10-23 Thread Florent Xicluna

Changes by Florent Xicluna :


--
status: open -> closed

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



[issue11440] fix_callable should be dropped from lib2to3 / changed

2011-10-24 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox
type:  -> behavior

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



[issue11440] fix_callable should be dropped from lib2to3 / changed

2011-10-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

The decision should be left to the user.
IMHO, we could disable this automatic fixer.

--

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



[issue12501] callable(): remove/amend the deprecation warning in Python 2.7

2011-10-24 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox
type:  -> behavior

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



[issue13248] deprecated in 3.2, should be removed in 3.3

2011-10-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

I missed these warnings in C modules.


*array*
  "fromstring" and "tostring" methods
*io* (like _pyio)
  argument "max_buffer_size" of BufferedWriter and BufferedRWPair
*sys*
  "sys.getcheckinterval" and "sys.setcheckinterval"


and some complaints from Objects/typeobject.c:

  "object.__init__() takes no parameters"
  "object.__new__() takes no parameters"
  "object.__format__ with a non-empty format string is deprecated"
  "Type %.100s defines tp_reserved (formerly tp_compare) but not "
"tp_richcompare. Comparisons may not behave as intended."

--

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



[issue13255] wrong docstring for array.fromunicode

2011-10-24 Thread Florent Xicluna

New submission from Florent Xicluna :

The docstring should say "ustr.encode" instead of "ustr.decode".
The documentation page is correct.

>>> print(array.array.fromunicode.__doc__)
fromunicode(ustr)

Extends this array with data from the unicode string ustr.
The array must be a unicode type array; otherwise a ValueError
is raised.  Use array.frombytes(ustr.decode(...)) to
append Unicode data to an array of some other type.

--
assignee: docs@python
components: Documentation
messages: 146292
nosy: docs@python, flox
priority: normal
severity: normal
stage: needs patch
status: open
title: wrong docstring for array.fromunicode
type: behavior
versions: Python 3.2, Python 3.3

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



[issue13255] wrong docstrings in array module

2011-10-24 Thread Florent Xicluna

Changes by Florent Xicluna :


--
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
title: wrong docstring for array.fromunicode -> wrong docstrings in array module

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



[issue2470] Need fixer for dl (removed) -> ctypes module

2011-10-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

for the RTLD_ constants, refer to issue #13226.

--
nosy: +flox

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



[issue13258] replace hasattr(obj, '__call__') with callable(obj)

2011-10-24 Thread Florent Xicluna

New submission from Florent Xicluna :

Now that callable() is back in 3.2, we may replace hasattr(obj, '__call__') 
with callable(obj).

The built-in function is easier to read and gives better performance than 
attribute lookup.


$ ./python -m timeit "hasattr(None, '__call__')"
10 loops, best of 3: 4.09 usec per loop
$ ./python -m timeit "hasattr(str, '__call__')"
100 loops, best of 3: 1.3 usec per loop

$ ./python -m timeit "callable(None)"
100 loops, best of 3: 0.299 usec per loop
$ ./python -m timeit "callable(str)"
100 loops, best of 3: 0.369 usec per loop

--
components: Library (Lib)
messages: 146320
nosy: flox
priority: normal
severity: normal
status: open
title: replace hasattr(obj, '__call__') with callable(obj)
type: performance
versions: Python 3.2, Python 3.3

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



[issue13258] replace hasattr(obj, '__call__') with callable(obj)

2011-10-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

Proposed patch.

--
keywords: +patch
Added file: http://bugs.python.org/file23510/issue13258_callable.diff

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



[issue13258] replace hasattr(obj, '__call__') with callable(obj)

2011-10-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

Updated with a special note for "packaging".

--
Added file: http://bugs.python.org/file23511/issue13258_callable_v2.diff

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



[issue13258] replace hasattr(obj, '__call__') with callable(obj)

2011-10-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

We have so many alternatives, it's funny ...


def callable(obj):
return hasattr(obj, '__call__') or hasattr(obj, '__bases__')

def callable(obj):
return isinstance(obj, collections.abc.Callable)

def callable(obj):
return hasattr(obj, '__call__') or type(obj) == types.ClassType

def callable(obj):
return any("__call__" in klass.__dict__
   for klass in type(obj).__mro__)

--
stage:  -> patch review

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



[issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains

2011-10-26 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue4945] json checks True/False by identity, not boolean value

2011-10-26 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox
versions: +Python 3.3 -Python 2.6, Python 3.1

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



[issue13270] all classes are new style

2011-10-26 Thread Florent Xicluna

New submission from Florent Xicluna :

these last references to old/new classes should be dropped.
See patch.

--
assignee: docs@python
components: Documentation
files: all_classes_belong_to_new_style.diff
keywords: patch
messages: 146455
nosy: docs@python, flox
priority: normal
severity: normal
stage: patch review
status: open
title: all classes are new style
type: behavior
versions: Python 3.2, Python 3.3
Added file: 
http://bugs.python.org/file23530/all_classes_belong_to_new_style.diff

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



[issue10015] Creating a multiprocess.pool.ThreadPool from a child thread blows up.

2011-10-27 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue12657] Cannot override JSON encoding of basic type subclasses

2011-10-27 Thread Florent Xicluna

Changes by Florent Xicluna :


--
stage:  -> needs patch
type:  -> behavior

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



[issue13275] Recommend xml.etree for XML processing

2011-10-27 Thread Florent Xicluna

Changes by Florent Xicluna :


--
components: +XML
type:  -> behavior
versions: +Python 2.7, Python 3.2, Python 3.3

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



[issue13275] Recommend xml.etree for XML processing

2011-10-27 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue13280] argparse should use the new Formatter class

2011-10-27 Thread Florent Xicluna

Florent Xicluna  added the comment:

Well argparse exists since 2006 (ref [1]), and "should work on Python >= 2.3" 
(ref [2]).
It was merged in the standard library with Python 3.2.

However, I agree we may switch to the advanced string formatting for this 
module.


[1] http://objectmix.com/python/180879-%5Bann%5D-argparse-module.html
[2] http://pypi.python.org/pypi/argparse#compatibility

--
nosy: +flox
priority: normal -> low
versions:  -Python 3.2, Python 3.4

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



[issue13041] argparse: terminal width is not detected properly

2011-10-27 Thread Florent Xicluna

Changes by Florent Xicluna :


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

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



[issue13280] argparse should use the new Formatter class

2011-10-27 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +bethard

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



[issue13270] all classes are new style

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

the type>class change reflects the current output on 3.x

--

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



[issue13270] all classes are new style

2011-10-28 Thread Florent Xicluna

Changes by Florent Xicluna :


--
resolution:  -> fixed
stage: patch review -> committed/rejected

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



[issue1294232] Error in metaclass search order

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

After changeset c72063032a7a I get this complain:

Python/bltinmodule.c: In function ‘builtin___build_class__’:
Python/bltinmodule.c:43: warning: unused variable ‘nbases’

--
nosy: +flox

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



[issue13270] all classes are new style

2011-10-28 Thread Florent Xicluna

Changes by Florent Xicluna :


--
status: open -> closed

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



[issue13287] urllib.request exposes too many names

2011-10-28 Thread Florent Xicluna

New submission from Florent Xicluna :

>>> len(dir())
4
>>> import urllib.request import *
>>> len(dir())
88


In this list we find 14 modules:
['base64', 'collections', 'ssl', 'bisect', 'http', 're', 'email', 'socket', 
'os', 'posixpath', 'hashlib', 'io', 'time', 'sys']

And many non-documented functions:
 - ftperrors
 - getproxies_environment
 - getproxies_macosx_sysconf
 - localhost
 - noheaders
 - parse_http_list
 - parse_keqv_list
 - proxy_bypass
 - proxy_bypass_environment
 - proxy_bypass_macosx_sysconf
 - quote
 - randombytes
 - request_host
 - urlunparse
 - splitattr
 - splithost
 - splitpasswd
 - splitport
 - splitquery
 - splittag
 - splittype
 - splituser
 - splitvalue
 - thishost
 - to_bytes
 - unquote
 - unwrap
 - urljoin
 - urlparse
 - urlsplit

It may be good to define __all__ for this module, and to preprend "_" on some 
of these names.

--
components: Library (Lib)
messages: 146568
nosy: flox
priority: normal
severity: normal
stage: needs patch
status: open
title: urllib.request exposes too many names
type: behavior
versions: Python 3.3

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



[issue13287] urllib.request exposes too many names

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

We should only expose the names which are documented.
The modules and the objects from urllib.parse don't need to be exposed in 
urllib.request.

I suggest to apply this patch on 3.3 only.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file23543/issue13287_urllib_request.diff

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



[issue13283] removal of two unused variable in locale.py

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

This patch looks good.
Is it relevant for minor releases 2.7.3 and 3.2.3? I cannot confirm.

--
nosy: +flox
priority: normal -> low
versions: +Python 3.2, Python 3.3

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



[issue13286] PEP 3151 breaks backward compatibility: it should be documented

2011-10-28 Thread Florent Xicluna

Changes by Florent Xicluna :


--
stage:  -> needs patch
type:  -> behavior

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



[issue13285] signal module ignores external signal changes

2011-10-28 Thread Florent Xicluna

Changes by Florent Xicluna :


--
components: +Library (Lib)
nosy: +flox
versions: +Python 3.3 -Python 2.6, Python 3.1

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



[issue2892] improve cElementTree iterparse error handling

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

unfortunately, I did not find the fix and the test in the upstream repository.

AFAIK, upstream should be there:
https://bitbucket.org/effbot/et-2009-provolone/src

--
components: +XML -Extension Modules
type: feature request -> behavior
versions: +Python 3.3

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



[issue2892] improve cElementTree iterparse error handling

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

Proposed patch for 3.3.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file23544/issue2892_etree_iterparse.diff

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



[issue7334] ElementTree: file locking in Jython 2.5 (OSError on Windows)

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

Changeset cff78ffb932a fixed the issue for 3.2.
I will consider backporting.

--
resolution:  -> fixed
stage: needs patch -> patch review
versions:  -Python 3.2

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



[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

Confirmed in 3.3.
The patch does not apply cleanly on trunk.

--
stage: test needed -> needs patch
versions: +Python 3.3 -Python 3.1

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



[issue6057] sqlite3 error classes should be documented

2011-10-28 Thread Florent Xicluna

Changes by Florent Xicluna :


--
stage:  -> needs patch
versions: +Python 3.3 -Python 3.1

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



[issue6655] etree iterative find[text]

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

ElementTree 1.3 added the "iterfind" method to Python 2.7 and 3.2.
http://docs.python.org/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.iterfind

--
resolution:  -> out of date
stage: test needed -> committed/rejected
status: open -> closed

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



[issue9375] ElementPath parser in ElementTree 1.3 does not reject "element//" as invalid

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

This behavior is verified with unit tests.
I don't plan to change it.

--
resolution:  -> wont fix
stage:  -> committed/rejected
status: open -> pending

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



[issue8277] ElementTree won't parse comments

2011-10-28 Thread Florent Xicluna

Changes by Florent Xicluna :


--
status: open -> closed

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

3.1 is no longer in scope for this issue.

--
resolution:  -> out of date
status: open -> closed

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



[issue7710] Inconsistent Exception for int() conversion

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

On 3.2 it is fixed (I didn't find the related changeset).

Not backported to 2.7.

--
versions:  -Python 3.1, Python 3.2

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



[issue4221] inconsistent exception from int is confusing

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

No more bug with Python 3.2.

On 2.7, we still experience the behavior described in msg75290.

--
versions:  -Python 2.6, Python 3.1, Python 3.2

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



[issue9708] cElementTree iterparse does not support "parser" argument

2011-10-28 Thread Florent Xicluna

Florent Xicluna  added the comment:

Documentation should be fixed for 3.2 and 2.7.
Patch welcomed.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
stage: test needed -> needs patch

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



[issue13291] latent NameError in xmlrpc package

2011-10-29 Thread Florent Xicluna

New submission from Florent Xicluna :

There's two names which should be fixed in "xmlrpc" package:

--- a/Lib/xmlrpc/client.py
-elif isinstance(other, (str, unicode)):


--- a/Lib/xmlrpc/server.py
-response = xmlrpclib.dumps(
-xmlrpclib.Fault(1, "%s:%s" % (exc_type, exc_value)),


We may extend test coverage too.

--
components: Library (Lib), XML
messages: 146622
nosy: flox
priority: normal
severity: normal
stage: test needed
status: open
title: latent NameError in xmlrpc package
type: behavior
versions: Python 3.2, Python 3.3

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



[issue13291] latent NameError in xmlrpc package

2011-10-29 Thread Florent Xicluna

Florent Xicluna  added the comment:

Proposed fix, with some tests.

--
keywords: +patch
stage: test needed -> patch review
Added file: http://bugs.python.org/file23549/issue13291_xmlrpc.diff

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



[issue13291] latent NameError in xmlrpc package

2011-10-30 Thread Florent Xicluna

Florent Xicluna  added the comment:

Thank you. Patch updated.

--
Added file: http://bugs.python.org/file23551/issue13291_xmlrpc_v2.diff

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



[issue13292] missing versionadded for bytearray

2011-10-30 Thread Florent Xicluna

New submission from Florent Xicluna :

versionadded is missing here:
http://docs.python.org/library/functions.html#bytearray

--
assignee: docs@python
components: Documentation
messages: 146633
nosy: docs@python, flox
priority: normal
severity: normal
stage: needs patch
status: open
title: missing versionadded for bytearray
type: behavior
versions: Python 2.7

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



[issue13293] xmlrpc.client encode error

2011-10-30 Thread Florent Xicluna

Florent Xicluna  added the comment:

binary data should be wrapped with Binary.
http://docs.python.org/dev/library/xmlrpc.client.html#binary-objects

--
components: +Library (Lib), XML
nosy: +flox
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

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



[issue1467929] %-formatting and dicts

2011-10-30 Thread Florent Xicluna

Changes by Florent Xicluna :


--
stage: needs patch -> patch review
versions: +Python 3.3

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



[issue2979] use_datetime in SimpleXMLRPCServer

2011-10-30 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox
stage: needs patch -> patch review
versions: +Python 3.3 -Python 3.2

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



[issue13297] xmlrpc.client could accept bytes for input and output

2011-10-30 Thread Florent Xicluna

New submission from Florent Xicluna :

Since Python 3 makes clear the distinction between bytes and string, there is 
no more reason to use the xmlrpc.client.Binary wrapper for binary objects.

The xmlrpc library may deal with bytes and bytearray normally.
To support backward compatibility, the ServerProxy will have a keyword argument 
"use_bytes" similar to the "use_datetime" from issue #1120353.

--
components: Library (Lib), XML
messages: 14
nosy: flox
priority: normal
severity: normal
status: open
title: xmlrpc.client could accept bytes for input and output
type: feature request
versions: Python 3.3

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



[issue13297] xmlrpc.client could accept bytes for input and output

2011-10-30 Thread Florent Xicluna

Changes by Florent Xicluna :


--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file23564/issue13297_xmlrpc_bytes.diff

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



[issue13293] xmlrpc.client encode error

2011-10-30 Thread Florent Xicluna

Florent Xicluna  added the comment:

FWIW, I opened a feature request #13297.

--

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



[issue2979] use_datetime in SimpleXMLRPCServer

2011-10-30 Thread Florent Xicluna

Changes by Florent Xicluna :


--
assignee:  -> flox

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



[issue13298] Result type depends on order of operands for bytes and bytearray

2011-10-30 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2011-10-31 Thread Florent Xicluna

New submission from Florent Xicluna :

See msg146725 on issue 13291.

on linux
>>> datetime(1,  2, 10, 11, 41, 23).strftime("%Y")
'1'

on osx
>>> datetime(1,  2, 10, 11, 41, 23).strftime("%Y")
'0001'


>>> datetime.strptime('0001', '%Y')
datetime.datetime(1, 1, 1, 0, 0)

>>> datetime.strptime('1', '%Y')
ValueError: time data '1' does not match format '%Y'

--
components: Library (Lib)
messages: 146740
nosy: flox
priority: normal
severity: normal
stage: test needed
status: open
title: datetime.strftime("%Y") not consistent for years < 1000
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue13291] latent NameError in xmlrpc package

2011-10-31 Thread Florent Xicluna

Florent Xicluna  added the comment:

This last issue is in the datetime module. issue #13305

--
status: open -> closed

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



[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2011-10-31 Thread Florent Xicluna

Florent Xicluna  added the comment:

FWIW, issue #1777412 added support for years < 1000 to Python 3.3 strftime.

--
nosy: +belopolsky, haypo
stage: test needed -> needs patch
versions:  -Python 2.7, Python 3.2

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



[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2011-10-31 Thread Florent Xicluna

Florent Xicluna  added the comment:

There's many discrepancies between OS X and Linux about time formatting...

OS X
>>> from datetime import datetime
>>> datetime(1900, 1, 1).strftime("%6Y")
'6Y'

Linux
>>> from datetime import datetime
>>> datetime(1900, 1, 1).strftime("%6Y")
'001900'

BTW, these discrepancies are already mentioned:
http://docs.python.org/dev/library/datetime.html#strftime-strptime-behavior

“The full set of format codes supported varies across platforms, because Python 
calls the platform C library’s strftime() function, and platform variations are 
common.”

We should had an asterisk to the "%Y" saying that the padding is not consistent 
across platforms.

--

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



[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2011-10-31 Thread Florent Xicluna

Florent Xicluna  added the comment:

Proposed patch to fix the issue in xmlrpc.client

--
keywords: +patch
Added file: http://bugs.python.org/file23577/issue13305_xmlrpc_patch.diff

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



[issue2979] use_datetime in SimpleXMLRPCServer

2011-10-31 Thread Florent Xicluna

Florent Xicluna  added the comment:

Latest comment is unrelated to this feature request.
It goes with issue #13305.

--

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



[issue3173] external strftime for Python?

2011-10-31 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

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



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Florent Xicluna

New submission from Florent Xicluna :

After changeset 55a3b563f0db the Gentoo buildbot is complaining.


==
FAIL: test_strptime (test.test_time.TimeTestCase)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.ochtman-gentoo-amd64/build/Lib/test/test_time.py",
 line 159, in test_strptime
time.strptime(strf_output, format)
ValueError: time data 'LMT' does not match format '%Z'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.ochtman-gentoo-amd64/build/Lib/test/test_time.py",
 line 162, in test_strptime
(format, strf_output))
AssertionError: conversion specifier '%Z' failed with 'LMT' input.

--

--
components: Tests
keywords: buildbot
messages: 146776
nosy: flox
priority: normal
severity: normal
stage: test needed
status: open
title: test_time fails: time data 'LMT' does not match format '%Z'
type: behavior
versions: Python 3.3

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



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Florent Xicluna

Florent Xicluna  added the comment:

It seems that "mktime" is buggy on Gentoo.
You can try to reset its state in some way before to retry strftime:


t = time.gmtime(time.time())
s = time.strftime('%Z', t)
print(s)

time.mktime((-1, 1, 1, 0, 0, 0, -1, -1, -1))
s = time.strftime('%Z', t)
print(s)

time.mktime((1, 1, 1, 0, 0, 0, 0, 0, -1))
s = time.strftime('%Z', t)
print(s)


I guess it could output:
SAST
LMT
SAST

--

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



  1   2   3   4   5   6   7   8   9   10   >