[issue7542] segfault on cPickle.loads("0.")

2009-12-18 Thread flox

flox  added the comment:

On 3.1, 3.2 same issue:

>>> pickle.loads(b'0')
Segmentation fault

------
nosy: +flox
versions: +Python 2.7, Python 3.1, Python 3.2

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



[issue7493] doc: patch for Doc/faq/design.rst

2009-12-18 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15594/doc_faq_design_py3k.diff

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



[issue7493] doc: patch for Doc/faq/design.rst

2009-12-18 Thread flox

flox  added the comment:

Updated patch with suggestions of Ezio.

--
title: doc: patch for py3k/Doc/faq/design.rst -> doc: patch for 
Doc/faq/design.rst
versions: +Python 2.6, Python 2.7
Added file: http://bugs.python.org/file15593/doc_faq_design.diff

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



[issue7493] doc: patch for py3k/Doc/faq/design.rst

2009-12-18 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15542/py3k_doc_faq_design.diff

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



[issue7537] test_format fails with -j combined with -v

2009-12-18 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15591/issue7537_tolerant_stdout.diff

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



[issue7537] test_format fails with -j combined with -v

2009-12-18 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15590/issue7537_tolerant_stdout.diff

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



[issue7537] test_format fails with -j combined with -v

2009-12-18 Thread flox

flox  added the comment:

Maybe the "sys.stdout.write" method can be wrapped in a decorator or a
context manager?

See example of decorator attached.

--
keywords: +patch
nosy: +flox
Added file: http://bugs.python.org/file15590/issue7537_tolerant_stdout.diff

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



[issue7458] crash in str.rfind() with an invalid start value

2009-12-18 Thread flox

flox  added the comment:

I proposed a patch which solve this issue and improve performance of
str.rfind. See issue 7462.

--

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



[issue7532] Extended slicing with classic class behaves strangely

2009-12-17 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15585/issue7532_classic_getitem.diff

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



[issue7532] Extended slicing with classic class behaves strangely

2009-12-17 Thread flox

flox  added the comment:

Patch augmented with extensive tests:
 * Classic class or New-style class
 * with or without __getslice__

--
Added file: http://bugs.python.org/file15586/issue7532_classic_getitem_v2.diff

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



[issue7532] Extended slicing with classic class behaves strangely

2009-12-17 Thread flox

flox  added the comment:

Mark,

Thank you for your analysis.

I looked at similar implementation of tp_as_sequence->sq_slice slots in
"stringobject.c" (and tuple, list).
I've added extra controls before the _PySlice_FromIndices call to let it
behave like new-style classes.

I have updated the tests.
It should be safe for 2.7, no?

--
keywords: +patch
Added file: http://bugs.python.org/file15585/issue7532_classic_getitem.diff

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



[issue7532] Extended slicing with classic class behaves strangely

2009-12-17 Thread flox

New submission from flox :

See attached example.

The Classic class should behave like the New-style class.

--
components: Interpreter Core
files: case_slice.py
messages: 96520
nosy: flox
severity: normal
status: open
title: Extended slicing with classic class behaves strangely
type: behavior
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file15582/case_slice.py

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



[issue7381] subprocess.check_output: "docstring has inconsistent leading whitespace"

2009-12-17 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15446/issue7381.diff

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



[issue7381] subprocess.check_output: "docstring has inconsistent leading whitespace"

2009-12-17 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15447/issue7381_py3k.diff

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



[issue7381] subprocess.check_output: "docstring has inconsistent leading whitespace"

2009-12-17 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15581/issue7381_py3k_v2.diff

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



[issue7381] subprocess.check_output: "docstring has inconsistent leading whitespace"

2009-12-17 Thread flox

flox  added the comment:

Patch updated to backport r51536 in trunk.
It makes "python -3" happier (do not compare None >= 0).

--
Added file: http://bugs.python.org/file15580/issue7381_v2.diff

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



[issue7520] Incorrect handling of nested calss

2009-12-15 Thread flox

flox  added the comment:

It seems to behave correctly on 2.7 and 3.1 (svn versions).

$ ./python Tools/scripts/2to3 ../doublequote.py 
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Refactored ../doublequote.py
--- ../doublequote.py (original)
+++ ../doublequote.py (refactored)
@@ -1,5 +1,5 @@
-import urllib
+import urllib.request, urllib.parse, urllib.error
 
 def doublequote(s):
-   return urllib.quote(urllib.quote(s))
+   return urllib.parse.quote(urllib.parse.quote(s))
 
RefactoringTool: Files that need to be modified:
RefactoringTool: ../doublequote.py

--
nosy: +flox

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



[issue7491] metaclass __cmp__ is ignored

2009-12-15 Thread flox

flox  added the comment:

Note: test_py3kwarn fails, probably since r76794.

--
nosy: +flox

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



[issue7516] Flag "-3" is silently ignored when running "regrtest.py -j2"

2009-12-15 Thread flox

flox  added the comment:

This issue (and the patch) is to warn the tester that the flags and
environment variables are ignored.

Sorry for the DeprecationWarning noise, it is some silly test on my sandbox.

--

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



[issue7516] Flag "-3" is silently ignored when running "regrtest.py -j2"

2009-12-15 Thread flox

flox  added the comment:

Minimal patch proposed.

--
keywords: +patch
Added file: http://bugs.python.org/file15568/issue7516_regrtest_mp.diff

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



[issue7516] Flag "-3" is silently ignored when running "regrtest.py -j2"

2009-12-15 Thread flox

New submission from flox :

~ $ ./python -3 Lib/test/regrtest.py -j2 test_py3kwarn
./Lib/encodings/__init__.py:100: DeprecationWarning:
 the 'hex' codec has been removed in Python 3.0
  level=0)
test_py3kwarn
test_py3kwarn skipped -- test.test_py3kwarn must be run with the -3 flag
1 test skipped:
test_py3kwarn
1 skip unexpected on linux2:
test_py3kwarn

--
components: Tests
messages: 96452
nosy: flox
severity: normal
status: open
title: Flag "-3" is silently ignored when running "regrtest.py -j2"
type: behavior
versions: Python 2.6, Python 2.7

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



[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-12-15 Thread flox

Changes by flox :


--
nosy: +flox

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



[issue7515] Lib/test/regrtest.py -ulib2to3 yield "Invalid -u option"

2009-12-15 Thread flox

New submission from flox :

~ $ ./python Lib/test/regrtest.py --help
(...)
lib2to3 -   Run the tests for 2to3 (They take a while.)
(...)

~ $ ./python Lib/test/regrtest.py -ulib2to3
Invalid -u/--use option: lib2to3
Use --help for usage

--
components: Tests
messages: 96448
nosy: flox
severity: normal
status: open
title: Lib/test/regrtest.py -ulib2to3 yield "Invalid -u option"
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

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



[issue7514] doc: documentation for "sys.flags" is obsolete.

2009-12-15 Thread flox

New submission from flox :

Patch attached.

--
assignee: georg.brandl
components: Documentation
files: py3k_doc_sys_flags.diff
keywords: patch
messages: 96441
nosy: flox, georg.brandl
severity: normal
status: open
title: doc: documentation for "sys.flags" is obsolete.
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15565/py3k_doc_sys_flags.diff

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



[issue4770] binascii module, crazy error messages, unexpected behavior

2009-12-14 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15563/issue4770_binascii_py3k_v2.diff

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



[issue4770] binascii module, crazy error messages, unexpected behavior

2009-12-14 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15562/issue4770_binascii_py3k_v2.diff

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



[issue4770] binascii module, crazy error messages, unexpected behavior

2009-12-14 Thread flox

flox  added the comment:

Patch updated:
 * Added documentation
 * Switched to "payload.encode('ascii')" in the "email.message" module

Note: there was no ambiguity on the first line of the documentation:
« [These functions] convert between binary and various ASCII-encoded
binary representations »

So, it should only convert bytes in range(256) to bytes in range(128).

--
Added file: http://bugs.python.org/file15562/issue4770_binascii_py3k_v2.diff

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



[issue4770] binascii module, crazy error messages, unexpected behavior

2009-12-14 Thread flox

flox  added the comment:

I perform a "grep" on the email package (with patch applied).
There's some places where 'raw-unicode-escape' is used.

I understand that all "payload.encode('raw-unicode-escape')" should be
changed to "payload.encode('ascii')" when the payload is processed by
another transfer encoding (line 202, 207 and 214).
The last one (when 'content-transfer-encoding' is not recognized) should
remain unchanged?

All other uses of 'raw-unicode-escape' seem correct.



Lib/email/base64mime.py:112:
return a2b_base64(string.encode('raw-unicode-escape'))
Lib/email/header.py:111:
word = bytes(word, 'raw-unicode-escape')
Lib/email/message.py:202:
payload = payload.encode('raw-unicode-escape')
Lib/email/message.py:207:
payload = payload.encode('raw-unicode-escape')
Lib/email/message.py:214:
in_file = BytesIO(payload.encode('raw-unicode-escape'))
Lib/email/message.py:225:
return payload.encode('raw-unicode-escape')
Lib/email/message.py:767:
as_bytes = charset[2].encode('raw-unicode-escape')
Lib/email/utils.py:298:
rawbytes = bytes(text, 'raw-unicode-escape')

--

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



[issue4770] binascii module, crazy error messages, unexpected behavior

2009-12-14 Thread flox

flox  added the comment:

> Are you sure that this patch is correct (which RFC says
> that quoted printable should use our raw-unicode-escape
> codec ?):

I am not sure of anything. It is an "educated guess" at the most.
Since 'base64' and 'x-uuencode' both use 'raw-unicode-escape'...

See longer excerpt below.


Index: Lib/email/message.py
===
--- Lib/email/message.py(revision 76839)
+++ Lib/email/message.py(working copy)
@@ -189,24 +189,26 @@
 elif not isinstance(self._payload, list):
 raise TypeError('Expected list, got %s' % type(self._payload))
 else:
 payload = self._payload[i]
 if not decode:
 return payload
 # Decoded payloads always return bytes.  XXX split this part
out into
 # a new method called .get_decoded_payload().
 if self.is_multipart():
 return None
 cte = self.get('content-transfer-encoding', '').lower()
 if cte == 'quoted-printable':
+if isinstance(payload, str):
+payload = payload.encode('raw-unicode-escape')
 return utils._qdecode(payload)
 elif cte == 'base64':
 try:
 if isinstance(payload, str):
 payload = payload.encode('raw-unicode-escape')
 return base64.b64decode(payload)
 #return utils._bdecode(payload)
 except binascii.Error:
 # Incorrect padding
 pass
 elif cte in ('x-uuencode', 'uuencode', 'uue', 'x-uue'):
 in_file = BytesIO(payload.encode('raw-unicode-escape'))

--

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



[issue4770] binascii module, crazy error messages, unexpected behavior

2009-12-14 Thread flox

flox  added the comment:

This patch removes implicit encoding in binascii functions:
 - a2b_hex (=unhexlify)
 - a2b_qp
 - rledecode_hqx 

 * Tests module "test_binascii" is reviewed and simplified.
 * Fixes for "email", "pickle" and "quopri" modules to encode input.

All tests pass.

--
keywords: +patch
Added file: http://bugs.python.org/file15560/issue4770_binascii_py3k.diff

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



[issue4757] reject unicode in zlib

2009-12-14 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file1/issue4757_zlib_bytes.diff

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



[issue4770] binascii module, crazy error messages, unexpected behavior

2009-12-14 Thread flox

flox  added the comment:

I agree, we need consistency between all functions of this package.

I've run a small script to check what happens for all 16 functions of
the binascii package when they receive unicode input...

See attached script (and sample output).

IMHO 4 functions should be fixed to raise the same TypeError:
 - a2b_hex
 - a2b_qp
 - unhexlify
 - rledecode_hqx 

Documentation says that the functions in `binary` module « convert
between binary and various ASCII-encoded binary representations »
So... it's all binary.

Implicit encoding should not happen, never.

--
nosy: +flox
versions: +Python 3.1, Python 3.2 -Python 3.0
Added file: http://bugs.python.org/file15559/case_binascii.py

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



[issue4757] reject unicode in zlib

2009-12-14 Thread flox

flox  added the comment:

Fixed.

And some "bytearray" tests improved in test_zlib.

--
Added file: http://bugs.python.org/file15556/issue4757_zlib_bytes_v2.diff

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



[issue4757] reject unicode in zlib

2009-12-14 Thread flox

flox  added the comment:

Patch from haypo updated for r76830 .

Additional tests for TypeError, and to check that bytearray objects are
accepted.

--
Added file: http://bugs.python.org/file1/issue4757_zlib_bytes.diff

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



[issue4757] reject unicode in zlib

2009-12-14 Thread flox

flox  added the comment:

Definitely, zlib.compress should raise a TypeError (like bz2 does).

>>> import bz2, zlib
>>> bz2.compress('abc')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: argument 1 must be bytes or buffer, not str
>>> zlib.compress('abc')
b"x\x9cKLJ\x06\x00\x02M\x01'"

Someone can review the patch and merge it?

--
nosy: +flox
versions: +Python 3.2 -Python 3.0

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-14 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15553/issue6472_upstream_docs.diff

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-14 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15513/issue6472_upstream_docs.diff

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-14 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15471/issue6472_upstream_py3k.diff

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-14 Thread flox

flox  added the comment:

Small update of the patch for 3.2: the __cmp__method is replaced with
__eq__ method (on CommentProxy and PIProxy).

--
Added file: http://bugs.python.org/file15552/issue6472_upstream_py3k_v2.diff

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



[issue7499] doc: patch for py3k/Doc/faq/library.rst

2009-12-13 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15550/py3k_doc_faq_library.diff

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



[issue7499] doc: patch for py3k/Doc/faq/library.rst

2009-12-13 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15549/py3k_doc_faq_library.diff

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



[issue7499] doc: patch for py3k/Doc/faq/library.rst

2009-12-13 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15546/py3k_doc_faq_library.diff

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



[issue7499] doc: patch for py3k/Doc/faq/library.rst

2009-12-13 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15549/py3k_doc_faq_library.diff

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



[issue7500] doc: add warnings for FAQ which may not be accurate

2009-12-13 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15548/py3k_doc_faq_warnings.diff

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



[issue7500] doc: add warnings for FAQ which may not be accurate

2009-12-13 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15547/py3k_doc_faq_warnings.diff

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



[issue7500] doc: add warnings for FAQ which may not be accurate

2009-12-13 Thread flox

New submission from flox :

I reviewed some FAQ documents: issue7493, issue7495 and issue7499

But other documents may be inaccurate.
We may add a warning at the top of these documents, until someone
volunteer to review them.

Patch attached.

--
assignee: georg.brandl
components: Documentation
files: py3k_doc_faq_warnings.diff
keywords: patch
messages: 96360
nosy: flox, georg.brandl
severity: normal
status: open
title: doc: add warnings for FAQ which may not be accurate
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15547/py3k_doc_faq_warnings.diff

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



[issue7499] doc: patch for py3k/Doc/faq/library.rst

2009-12-13 Thread flox

New submission from flox :

I reviewed the documentation and tested the examples with Python 3.

I found some import and print statements to change.
Here is the patch.

Note: I added a warning for the question "How do I get a single
keypress" (without curses). The solution may not work as expected.

--
assignee: georg.brandl
components: Documentation
files: py3k_doc_faq_library.diff
keywords: patch
messages: 96359
nosy: flox, georg.brandl
severity: normal
status: open
title: doc: patch for py3k/Doc/faq/library.rst
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15546/py3k_doc_faq_library.diff

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



[issue7495] doc: patch for py3k/Doc/faq/programming.rst

2009-12-13 Thread flox

New submission from flox :

I reviewed the documentation and tested the examples with Python 3.

I found some parts which are changed or irrelevant.
Here is the patch.

The examples for Mandelbrot and Fibonacci work fine.

--
assignee: georg.brandl
components: Documentation
files: py3k_doc_faq_programming.diff
keywords: patch
messages: 96349
nosy: flox, georg.brandl
severity: normal
status: open
title: doc: patch for py3k/Doc/faq/programming.rst
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15544/py3k_doc_faq_programming.diff

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



[issue7493] doc: patch for py3k/Doc/faq/design.rst

2009-12-13 Thread flox

New submission from flox :

I reviewed the documentation and tested the examples with Python 3.

I found many parts which are changed or irrelevant.
Here is the patch.

--
assignee: georg.brandl
components: Documentation
files: py3k_doc_faq_design.diff
keywords: patch
messages: 96345
nosy: flox, georg.brandl
severity: normal
status: open
title: doc: patch for py3k/Doc/faq/design.rst
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15542/py3k_doc_faq_design.diff

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



[issue7492] doc: cPickle is really gone

2009-12-13 Thread flox

Changes by flox :


--
keywords: +patch
Added file: http://bugs.python.org/file15541/issue7492_cpickle.diff

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



[issue7492] doc: cPickle is really gone

2009-12-13 Thread flox

New submission from flox :

Word "cPickle" is still used on these pages.

http://docs.python.org/dev/py3k/library/shelve.html
http://docs.python.org/dev/py3k/library/copyreg.html

--
assignee: georg.brandl
components: Documentation
messages: 96342
nosy: flox, georg.brandl
severity: normal
status: open
title: doc: cPickle is really gone
versions: Python 3.1, Python 3.2

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



[issue7487] doc: Code is not always colored

2009-12-12 Thread flox

flox  added the comment:

The bug seems related to Sphynx on Python3.

These examples are NOT colored::

  class Z:
def __init__(self):
  pass

::

  class F:
def __foo__(self):
  pass

::

  class C:
  def method(self):
  pass

  c = C()
  c.method.__func__.whoami = 'my name is c'



While these examples are colored correctly::

  class A:
pass

  class B:
def b(self):
  pass

  class C(): pass

--

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



[issue7487] doc: Code is not always colored

2009-12-12 Thread flox

New submission from flox :

Some code samples are not syntax colored in the doc for Python 3.
In the documentation for Python 2, it is OK.

Example:
  http://docs.python.org/dev/py3k/library/stdtypes.html#methods
  http://docs.python.org/dev/library/stdtypes.html#methods

--
assignee: georg.brandl
components: Documentation
messages: 96306
nosy: flox, georg.brandl
severity: normal
status: open
title: doc: Code is not always colored
versions: Python 3.1, Python 3.2

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



[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-12 Thread flox

flox  added the comment:

> And this statement was not converted

s/this statement/this method call/

--

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



[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-12 Thread flox

flox  added the comment:

Martin,

actually, I was trying to convert some piece of code from python2 to
python3. And this statement was not converted by 2to3:
  "x.decode('base64').decode('zlib')"

So, I read the official documentation, and found no hint about the
removal of these codecs.
For my specific use case, I can use "zlib.decompress" and
"base64.decodebytes", but I find that the ".encode()" and ".decode()"
helpers were useful in Python 2.

I don't know all the background of the removal of these codecs. But I
try to contribute to Python, and help Python 3 become at least as
featureful, and useful, as Python 2.

So, after reading the above comments, I think we may end up with
following changes:
 * restore the "bytes-to-bytes" codecs in the "encodings" package
 * then create new helpers on bytes objects (either
   ".transform()/.untransform()" or ".encodebytes()/.decodebytes")

--

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



[issue7486] doc: Built-in Functions, exec statement is obsolete

2009-12-12 Thread flox

Changes by flox :


--
keywords: +patch
Added file: http://bugs.python.org/file15531/issue7486_doc_py3k.diff

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



[issue7486] doc: Built-in Functions, exec statement is obsolete

2009-12-12 Thread flox

New submission from flox :

In the documentation of "compile(...)", there's a mention of the "exec
statement".

--
assignee: georg.brandl
components: Documentation
messages: 96293
nosy: flox, georg.brandl
severity: normal
status: open
title: doc: Built-in Functions, exec statement is obsolete
versions: Python 3.1, Python 3.2

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



[issue7380] uuid.UUID.bytes gives a bytearray() instead of bytes

2009-12-11 Thread flox

Changes by flox :


--
versions:  -Python 3.0

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



[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-11 Thread flox

flox  added the comment:

I've ported the codecs from Py2:
base64, bytes_escape, bz2, hex, quopri, rot13, uu and zlib

It's not a big deal. Basically:
 - StringIO.StringIO --> io.BytesIO
 - 'string_escape' --> 'bytes_escape'

Will add documentation if we agree on the feature.

--
Added file: http://bugs.python.org/file15526/issue7475_missing_codecs_py3k.diff

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



[issue7466] Segmentation fault after about 20 seconds on lenovo T500

2009-12-11 Thread flox

flox  added the comment:

Ok. It is here:
  http://bugs.python.org/file15520/issue7466.diff

--

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



[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-11 Thread flox

flox  added the comment:

Thinking about it, I am +1 to reimplement the codecs.

We could implement new methods to replace the old one.
(similar to base64.encodebytes and base64.decodebytes)

>>> b'abc'.encodebytes('base64')
b'YWJj\n'
>>> b'abc'.encodebytes('zlib').encodebytes('base64')
b'eJxLTEoGAAJNASc=\n'
>>> b'UHl0aG9u'.decodebytes('base64').decode('utf-8')
'Python'

--
components: +Library (Lib)

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



[issue7475] No hint about codecs removed: base64 bz2 hex zlib ...

2009-12-11 Thread flox

Changes by flox :


--
keywords: +patch
Added file: http://bugs.python.org/file15523/issue7475_warning.diff

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



[issue7475] No hint about codecs removed: base64 bz2 hex zlib ...

2009-12-11 Thread flox

Changes by flox :


--
title: No hint about codecs removed : base64 bz2 hex zlib ... -> No hint about 
codecs removed: base64 bz2 hex zlib ...

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



[issue7475] No hint about codecs removed : base64 bz2 hex zlib ...

2009-12-11 Thread flox

Changes by flox :


--
versions: +Python 2.7

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



[issue7475] No hint about codecs removed : base64 bz2 hex zlib ...

2009-12-11 Thread flox

flox  added the comment:

Is it possible to add "DeprecationWarning" for these codecs
when using "python -3" ?

>>> {}.has_key('a')
__main__:1: DeprecationWarning: dict.has_key() not supported in 3.x;
use the in operator
False
>>> print `123`
:1: SyntaxWarning: backquote not supported in 3.x; use repr()
123
>>> 'abc'.encode('base64')
'YWJj\n'

--

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



[issue7475] No hint about codecs removed : base64 bz2 hex zlib ...

2009-12-11 Thread flox

flox  added the comment:

«Everything you thought you knew about binary data and Unicode
 has changed.»

Reopening for the documentation part.

This "mistake" deserves some words in the documentation:
  docs.python.org/dev/py3k/whatsnew/3.0.html
  #text-vs-data-instead-of-unicode-vs-8-bit

And the conversion may be automated with 2to3, maybe.

--
assignee:  -> georg.brandl
components: +2to3 (2.x to 3.0 conversion tool), Documentation -Library (Lib)
nosy: +georg.brandl
status: closed -> open
title: codecs missing: base64 bz2 hex zlib ... -> No hint about codecs removed 
: base64 bz2 hex zlib ...

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



[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-10 Thread flox

New submission from flox :

AFAIK these codecs were not ported to Python 3.

1. I found no hint in documentation on this matter.

2. Is it possible to contribute some of them, or there's a good reason
to look elsewhere?

--
components: Library (Lib)
messages: 96218
nosy: flox
severity: normal
status: open
title: codecs missing: base64 bz2 hex zlib ...
versions: Python 3.1, Python 3.2

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



[issue7466] Segmentation fault after about 20 seconds on lenovo T500

2009-12-10 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15521/issue7466.diff

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



[issue7466] Segmentation fault after about 20 seconds on lenovo T500

2009-12-10 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15520/issue7466.diff

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



[issue7466] Segmentation fault after about 20 seconds on lenovo T500

2009-12-10 Thread flox

flox  added the comment:

Well... here comes the patch.

--
keywords: +patch
Added file: http://bugs.python.org/file15520/issue7466.diff

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



[issue7466] Segmentation fault after about 20 seconds on lenovo T500

2009-12-10 Thread flox

flox  added the comment:

Fix is coming soon...

## Sample code:

import gc
tuple(gc.collect() for i in range(11))

## python: Objects/tupleobject.c:853: _PyTuple_Resize:
## Assertion `g->gc.gc_refs != (-2)' failed.


And Trunk is affected

--
versions: +Python 2.7

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



[issue7466] Segmentation fault after about 20 seconds on lenovo T500

2009-12-10 Thread flox

flox  added the comment:

Yes, confirmed too. Both 3.1 and 3.2 are broken.

Minimal sequence to trigger the bug:

"""
~ $ ./python 
Python 3.2a0 (py3k:76743M, Dec 10 2009, 12:19:41) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

"""
def m(i):
if i == 10:
return next(i for i in '0')

MAX_LOOP = 1<<10
t = range(11)
for i in range(MAX_LOOP):
  d = map(m, t)
  tup = tuple(d)

## python: Objects/tupleobject.c:853: _PyTuple_Resize:
## Assertion `g->gc.gc_refs != (-2)' failed.

--
components: +Interpreter Core
nosy: +flox
versions: +Python 3.2

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-09 Thread flox

flox  added the comment:

Patch for the documentation. (source: upstream documentation)

--
Added file: http://bugs.python.org/file15513/issue6472_upstream_docs.diff

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



[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-08 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15505/fastsearch_rfind.patch

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



[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-08 Thread flox

flox  added the comment:

(removed comment which should not be copied)

--
Added file: http://bugs.python.org/file15507/fastsearch_rfind.patch

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



[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-08 Thread flox

New submission from flox :

While looking at issue7458 I stopped on:

  /* XXX - create reversefastsearch helper! */

Here is the patch which is just the translation of the same algorithm
already implemented for "find/index".
http://effbot.org/zone/stringlib.htm

Note: it supersedes patch for 7458.

--
components: Interpreter Core
files: fastsearch_rfind.patch
keywords: patch
messages: 96157
nosy: flox
severity: normal
status: open
title: Implement fastsearch algorithm for rfind/rindex
type: performance
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15505/fastsearch_rfind.patch

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread flox

flox  added the comment:

I reviewed the patch, and it seems partially redundant.

Actually the "find" method was not broken.
There is already a test "if (str_len < 0) return -1;" for this one.

See attached patch.

--
Added file: http://bugs.python.org/file15501/issue7458_rfind.diff

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread flox

flox  added the comment:

I got it to crash (2.7):

~ $ ./python Lib/test/regrtest.py string_tests test_unicode test_str
test_unicode
test test_unicode failed -- Traceback (most recent call last):
AssertionError: -1 != -8276732

test_str
test test_str failed -- Traceback (most recent call last):
AssertionError: -1 != -255833

2 tests failed:
test_unicode test_str
[56425 refs]
~ $ 

Thank you haypo :)

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

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread flox

flox  added the comment:

This bug does not occur on Debian 64 bits.

 ~ $ uname -srvm
Linux 2.6.30-bpo.1-amd64 #1 SMP Mon Aug 17 08:42:50 UTC 2009 x86_64

Tested with variants:
from random import getrandbits
self.checkequal(-1, 'ab', 'find', 'xxx', getrandbits(64), 0)
self.checkequal(-1, 'ab', 'find', 'xxx', getrandbits(96), 0)
self.checkequal(-1, 'ab', 'rfind', 'xxx', getrandbits(64), 0)
    self.checkequal(-1, 'ab', 'rfind', 'xxx', getrandbits(96), 0)

--
nosy: +flox

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



[issue5596] memory leaks in py3k

2009-12-07 Thread flox

Changes by flox :


Added file: 
http://bugs.python.org/file15486/issue5596_zipimport_support_py3k.diff

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



[issue5596] memory leaks in py3k

2009-12-07 Thread flox

flox  added the comment:

Another false-positive in test_zipimport_support.
Both on 2.7 and 3.2.

Patch attached.

--
Added file: http://bugs.python.org/file15485/issue5596_zipimport_support.diff

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



[issue5596] memory leaks in py3k

2009-12-07 Thread flox

Changes by flox :


--
versions: +Python 2.7

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



[issue5596] memory leaks in py3k

2009-12-07 Thread flox

flox  added the comment:

And the test_urllib may leak on 2.7, too.

Patch attached.

--
Added file: http://bugs.python.org/file15482/issue5596_urllib.diff

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



[issue5596] memory leaks in py3k

2009-12-07 Thread flox

flox  added the comment:

Patch for the test refleaks:
 * test_pipes
 * test_urllib

--

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



[issue5596] memory leaks in py3k

2009-12-07 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15480/issue5596_pipes_py3k.diff

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



[issue5596] memory leaks in py3k

2009-12-07 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15479/issue5596_urllib_py3k.diff

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



[issue5596] memory leaks in py3k

2009-12-07 Thread flox

flox  added the comment:

test_textwrap seems OK with r76697

I still have leaks on test_pipes and test_urllib:

~ $ ./python Lib/test/regrtest.py -R : test_textwrap \
 test_pipes test_urllib
test_pipes leaked [0, -26, 0, 26] references, sum=0
test_pipes leaked [0, -26, 26, -26] references, sum=-26
test_pipes leaked [-26, 26, 0, 0] references, sum=0
test_pipes leaked [26, -26, 26, 0] references, sum=26
test_urllib leaked [0, 2, 0, 0] references, sum=2
test_urllib leaked [4, 6, 0, 2] references, sum=12
test_urllib leaked [2, 4, 2, 0] references, sum=8
test_urllib leaked [6, 6, 2, 0] references, sum=14

--
nosy: +flox

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-07 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15469/issue6472_upstream_py3k.diff

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-07 Thread flox

flox  added the comment:

I see some new features in the changelog.
I will try to update the documentation during the week.

(patch "py3k" fixed: support assignment of arbitrary sequences)

--
Added file: http://bugs.python.org/file15471/issue6472_upstream_py3k.diff

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



[issue1143] Update to latest ElementTree in Python 2.7

2009-12-07 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15470/issue1143_ET13_cET106.diff

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



[issue1143] Update to latest ElementTree in Python 2.7

2009-12-07 Thread flox

flox  added the comment:

Patch proposed with latest versions:
 * ElementTree 1.3a3-20070912
 * cElementTree 1.0.6-20090110

Attached to issue6472.

--
keywords: +patch
nosy: +flox
Added file: http://bugs.python.org/file15470/issue1143_ET13_cET106.diff

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-07 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15461/issue6472.diff

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-07 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15462/issue6472_py3k.diff

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-07 Thread flox

Changes by flox :


--
versions:  -Python 3.0
Added file: http://bugs.python.org/file15469/issue6472_upstream_py3k.diff

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-06 Thread flox

flox  added the comment:

I fixed it differently, using the upstream modules (Thank you Fredrik).
 * ElementTree 1.3a3-20070912
 * cElementTree 1.0.6-20090110

It works.
And it closes issue1143, too.

--
Added file: http://bugs.python.org/file15468/issue6472_upstream.diff

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-06 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15462/issue6472_py3k.diff

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-06 Thread flox

flox  added the comment:

Proposed patch fixes most of the discrepancies between both implementations.

It restores some features that were lost with Python 3:
 * cElement slicing and extended slicing
 * iterparse, cET.getiterator and cET.findall return an iterator
   (as documented)

Some tests were added to check these issues.

--
keywords: +patch
Added file: http://bugs.python.org/file15461/issue6472.diff

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-05 Thread flox

flox  added the comment:

There's many differences between both implementations.
I don't know if we can live with them or not.

~ $ ./python 
Python 3.1.1+ (release31-maint:76650, Dec  3 2009, 17:14:50) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from xml.etree import ElementTree as ET, cElementTree as cET
>>> from io import StringIO
>>> SAMPLE = ''
>>> IO_SAMPLE = StringIO(SAMPLE)


With ElementTree

>>> elt = ET.XML(SAMPLE)
>>> elt.getiterator()
[]
>>> elt.findall('')  # or '.'
[]
>>> elt.findall('./')
[]
>>> elt.items()
dict_items([])
>>> elt.keys()
dict_keys([])
>>> elt[:]
[]
>>> IO_SAMPLE.seek(0)
>>> next(ET.iterparse(IO_SAMPLE))
('end', )
>>> IO_SAMPLE.seek(0)
>>> list(ET.iterparse(IO_SAMPLE))
[('end', )]


With cElementTree

>>> elt_c = cET.XML(SAMPLE)
>>> elt_c.getiterator()

>>> elt_c.findall('')
[]
>>> elt_c.findall('./')
[]
>>> elt_c.items()
[]
>>> elt_c.keys()
[]
>>> elt_c[:]
Traceback (most recent call last):
TypeError: sequence index must be integer, not 'slice'
>>> IO_SAMPLE.seek(0)
>>> next(cET.iterparse(IO_SAMPLE))
Traceback (most recent call last):
TypeError: iterparse object is not an iterator
>>> IO_SAMPLE.seek(0)
>>> list(cET.iterparse(IO_SAMPLE))
[(b'end', )]

--

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



[issue6472] Inconsistent use of "iterator" in ElementTree doc & diff between Py and C modules

2009-12-05 Thread flox

Changes by flox :


--
nosy: +flox

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



[issue6058] Add cp65001 to encodings/aliases.py

2009-12-05 Thread flox

Changes by flox :


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

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



  1   2   >