[issue17720] pickle.py's load_appends should call append() on objects other than lists

2013-04-13 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

Alright alright! Here's a less bogus patch. :)

--
stage: needs patch -> patch review
Added file: http://bugs.python.org/file29846/fix_loads_appends.patch

___
Python tracker 

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



[issue13922] argparse handling multiple "--" in args improperly

2013-04-13 Thread paul j3

paul j3 added the comment:

This patch removes only one '--', the one that put a '-' in the 
'arg_strings_pattern'.  It does this in 'consume_positionals' right before 
calling 'take_action'.  As before it does not do this if nargs is PARSER or 
REMAINDER.

test_argparse.py has two DoubleDashRemoval cases, that attempt to highlight the 
changes from production (delete all --) and development (delete first -- in 
each positional group) versions.

I have not made any changes to the documentation.  All it says now is:

"If you have positional arguments that must begin with - and don’t look like 
negative numbers, you can insert the pseudo-argument '--' which tells 
parse_args() that everything after that is a positional argument:"

--
Added file: http://bugs.python.org/file29845/dbldash.patch

___
Python tracker 

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



[issue16694] Add pure Python operator module

2013-04-13 Thread Zachary Ware

Zachary Ware added the comment:

> Zachary, I suppose Modules/_operator.c is a rename of Modules/operator.c.
> Could you generate your patch using "hg diff --git" so that history isn't 
> lost here?

Of course; I thought I already had, but apparently I messed that up a bit. v11 
is in the proper format.  In it, you can actually see what was changed in 
Modules/operator.c, which is the necessary s/operator/_operator/ changes, and a 
few extra commas removed from a couple of docstrings (to match the docstrings 
in the new Python versions).

> See also http://docs.python.org/devguide/committing.html#minimal-configuration

Thank you for that link! I had read through this some time ago, but either 
missed the part about the diff section, or it just didn't sink in or something. 
 That is now added to my hg config file :)

--
Added file: http://bugs.python.org/file29844/py_operator.v11.diff

___
Python tracker 

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



[issue10701] Error pickling a dict

2013-04-13 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

The mutating __getstate__ is very likely the problem here. I've attached a 
small test case which shows the described behavior.

We could fix this by always making a copy of any mutable container we  want to 
iterate over to save its items. Performance-wise this solution is not very 
attractive. We are better off documenting this behavior as a limitation of 
__getstate__.

--
Added file: http://bugs.python.org/file29843/issue10701.py

___
Python tracker 

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



[issue17711] Persistent id in pickle with protocol version 0

2013-04-13 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

Here's a patch that fix the bug.

--
assignee:  -> alexandre.vassalotti
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file29842/fix_bad_persid.patch

___
Python tracker 

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



[issue17701] Improving strftime documentation

2013-04-13 Thread David Wolever

David Wolever added the comment:

Fixed a misleading note about Unicode in localized formatters in file29841.

--

___
Python tracker 

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



[issue17701] Improving strftime documentation

2013-04-13 Thread David Wolever

Changes by David Wolever :


Added file: http://bugs.python.org/file29841/53a0e908f787.diff

___
Python tracker 

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



[issue16804] python3 -S -m site fails

2013-04-13 Thread Meador Inge

Changes by Meador Inge :


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

___
Python tracker 

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



[issue16804] python3 -S -m site fails

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset faa5d705c27d by Meador Inge in branch '3.3':
Issue #16804: Fix 'python -S -m site' failure.
http://hg.python.org/cpython/rev/faa5d705c27d

New changeset 8cbd8d8ac828 by Meador Inge in branch 'default':
Issue #16804: Fix 'python -S -m site' failure.
http://hg.python.org/cpython/rev/8cbd8d8ac828

--
nosy: +python-dev

___
Python tracker 

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



[issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation

2013-04-13 Thread STINNER Victor

STINNER Victor added the comment:

PyUnicode_DecodeCharmap() still uses _PyUnicodeWriter_Prepare() (even with my 
patch). It may be interesting to benchmark min_length vs prepare. If min_length 
is not slower, it should be used instead of prepare to avoid widen the buffer 
if the first written character is non-ASCII, b'\x80'.decode('cp1252') for 
example.

--

___
Python tracker 

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



[issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation

2013-04-13 Thread STINNER Victor

STINNER Victor added the comment:

PyUnicode_DecodeUnicodeEscape() should set writer.min_length instead of using 
_PyUnicodeWriter_Prepare(), but the following assertion fails (because 
writer.size is zero by default):

assert(writer.pos < writer.size || (writer.pos == writer.size && c == 
'\n'));

I don't understand this assertion, so I don't know how to modify it.

--

___
Python tracker 

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



[issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation

2013-04-13 Thread STINNER Victor

STINNER Victor added the comment:

I don't see how issue17694.patch can speedup Python because min_length is zero 
when overallocation is disabled. It may be noise of the benchmark script.

--

___
Python tracker 

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



[issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation

2013-04-13 Thread STINNER Victor

STINNER Victor added the comment:

Attached patch changes _PyUnicodeWriter_Init() API: it now only has one 
argument (the writer). Minimum length and overallocation must be configured 
using attributes. The problem with the old API was that it was not possible to 
configure minimum length and overallocation separatly.

Disable overallocation in CJK decoders: only set the minimum length.

Other changes:

 * Add min_char character to _PyUnicodeWriter. It is currenctly unused. Using 
_PyUnicodeWriter_Prepare(writer, 0, min_char) is different because it allocates 
immediatly the buffer, and calling _PyUnicodeWriter_Prepare() with size=0 is 
not supported (it does not widen the buffer if maxchar is bigger).
 * unicode_decode_call_errorhandler_writer() only enables overallocation if the 
replaced string is longer than 1 character
 * PyUnicode_DecodeRawUnicodeEscape() and _PyUnicode_DecodeUnicodeInternal() 
set minimum length instead of preallocating the whole buffer. It avoids the 
need of widen the buffer if the first written character is the biggest 
character. It also avoids an useless memory allocation if the decoder fails 
before the first write.
 * _PyUnicode_DecodeUnicodeInternal() checks for integer overflow when 
computing the minimum length
 * _PyUnicodeWriter_Update() is now responsible to set size to zero if readonly 
is set

The goal is to delay the first allocation until the first real write to be able 
to choose correctly the maximum character and the buffer size. If the buffer is 
allocated before the first write, even the first write must widen and/or 
enlarge the buffer.

--
Added file: http://bugs.python.org/file29840/writer_minlen.patch

___
Python tracker 

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



[issue9538] Replace confusing pseudoname 'object' in special methods section.

2013-04-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The problem, for me, is that in 3.3 Data Model, 'object' is being used with a 
3rd meaning, 'generic class' (or possibly 'subclass of object', if indeed every 
'class' must be 'object' subclass, in the strict sense of 'object'). This is in 
addition to 'object' the specific class and generic Python object (which in 
CPython is a PyObject structure instance). The normal two meanings are often 
differentiated by typography: normal type for plain old object, something else 
for *object*.

To add a bit to the confusion, 3.3.4. Customizing instance and subclass checks 
changes the prefix to 'class' instead of 'object' (which is what I would do in 
the whole section...)

class.__instancecheck__(self, instance)
class.__subclasscheck__(self, subclass)

It then goes on to explain that it does not really mean 'generic class' but 
'type/metaclass'. So, to me, the prefix here should really be 'metaclass'.

Peter, the patch applied fine to my copy of default. It is incomplete in that 
the replacement should be made everywhere or nowhere in 3.3, not just in 
3.3.2(.0) and 3.3.2.1. However, do not bother making a new patch until there is 
more agreement on a change than there is now.

A possible alternative to the given proposal is an explanation in the short 3.3 
header of the special use of 'object' within the section.

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

___
Python tracker 

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



[issue17701] Improving strftime documentation

2013-04-13 Thread David Wolever

David Wolever added the comment:

Ok, I've added some locale examples and fixed up the note numbering. See diff 
in file29839, and there is a live version to preview here: 
http://hul.wolever.net/python-doc/library/datetime.html#strftime-and-strptime-behavior

If I can get a +1 on this, I'll port it to Python 3.

--

___
Python tracker 

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



[issue17701] Improving strftime documentation

2013-04-13 Thread David Wolever

Changes by David Wolever :


Added file: http://bugs.python.org/file29839/ae18c5ae2c4d.diff

___
Python tracker 

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



[issue17701] Improving strftime documentation

2013-04-13 Thread David Wolever

Changes by David Wolever :


Removed file: http://bugs.python.org/file29836/b3b1dcdc8cee.diff

___
Python tracker 

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



[issue17708] sys.flags.hash_randomization doesn't return correct value

2013-04-13 Thread Masami HIRATA

Masami HIRATA added the comment:

We should add 'randomization' and 'seed' attribute to sys.hash_info, I think.

--

___
Python tracker 

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



[issue17708] sys.flags.hash_randomization doesn't return correct value

2013-04-13 Thread Stephen Tu

Stephen Tu added the comment:

But it would seem that setting PYTHONHASHSEED != "random" does disable hash 
randomization. also, not sure what the semantics of the following is:

$ PYTHONHASHSEED=1 python -R ...

right now, python3 basically ignores -R.

--

___
Python tracker 

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



[issue17708] sys.flags.hash_randomization doesn't return correct value

2013-04-13 Thread Masami HIRATA

Masami HIRATA added the comment:

It seems there is a misunderstanding on my part.

Python v3.3.1 documentation says,
"sys.flags The struct sequence flags exposes the status of command line flags. 
The attributes are read only."

I think that sys.flags.hash_randomization should be always 1 on Python v3.3.1

because the documentation says,
"-R 
Kept for compatibility. On Python 3.3 and greater, hash randomization is turned 
on by default."

--

___
Python tracker 

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



[issue17618] base85 encoding

2013-04-13 Thread Martin Morrison

Martin Morrison added the comment:

Updated patch that includes both my original implementation of Ascii85, as well 
as the Mercurial implementation of base85. A few notes/questions:

- I named the Mercurial base85 implementation functions with the "b85" prefix. 
For the Ascii85 ones, I used "a85". I considered overloading the same functions 
with a keyword argument to select which encoding, but rejected that. Thoughts?

- I made only minor modifications to the Mercurial code to use bytes throughout 
(to match all the other APIs in the module). I also updated the docstrings a 
bit. My goal was to change as little as possible to guarantee identical 
behaviour.

- I haven't made the changes to add a pure Python binascii module as suggested 
in msg186216. Although poorly named, "base64.py" already contains a number of 
other encodings, so this seemed the best place for these too. I'm happy to make 
that change as well though if you really want it as part of this issue.

--
Added file: http://bugs.python.org/file29838/issue17618-2.diff

___
Python tracker 

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



[issue17693] Use _PyUnicodeWriter API for CJK decoders

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d621bdaed7c3 by Victor Stinner in branch 'default':
Issue #17693: CJK encoders now use the new Unicode API (PEP 393)
http://hg.python.org/cpython/rev/d621bdaed7c3

--

___
Python tracker 

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



[issue17413] format_exception() breaks on exception tuples from trace function

2013-04-13 Thread ingrid

Changes by ingrid :


--
nosy: +bmac

___
Python tracker 

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



[issue17413] format_exception() breaks on exception tuples from trace function

2013-04-13 Thread ingrid

ingrid added the comment:

It seems that settrace works normally when an exception is raised in the python 
code with the raise keyword. If an exception is raised in the C code, settrace 
breaks as the C code passes all exceptions as strings. To fix this issue we 
just added a line to normalize the C exception within settrace. We included a 
regression test for this defect.

I paired on this with user bmac (http://bugs.python.org/user17692).

--
keywords: +patch
nosy: +ingrid
Added file: http://bugs.python.org/file29837/issue17413.patch

___
Python tracker 

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



[issue17701] Improving strftime documentation

2013-04-13 Thread David Wolever

Changes by David Wolever :


Added file: http://bugs.python.org/file29836/b3b1dcdc8cee.diff

___
Python tracker 

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



[issue17705] Fill Character cannot be \0

2013-04-13 Thread Eric V. Smith

Changes by Eric V. Smith :


--
assignee:  -> eric.smith

___
Python tracker 

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



[issue17701] Improving strftime documentation

2013-04-13 Thread David Wolever

Changes by David Wolever :


--
hgrepos: +182

___
Python tracker 

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



[issue17723] Use FileRead and FileWrite in fileio.c on Windows

2013-04-13 Thread STINNER Victor

STINNER Victor added the comment:

See issue #12939 which contains a patch.

--

___
Python tracker 

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



[issue17671] io.BufferedRWPair can use uninitialized members

2013-04-13 Thread Stephen Tu

Stephen Tu added the comment:

patch with test in test_io

--
Added file: http://bugs.python.org/file29835/bufferedio.withtest.patch

___
Python tracker 

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



[issue12181] SIGBUS error on OpenBSD (sparc64)

2013-04-13 Thread Trent Nelson

Trent Nelson added the comment:

Yeah those slaves are definitely due for an update.  It's on the list.

--

___
Python tracker 

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



[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-13 Thread Mike Milkin

Mike Milkin added the comment:

Made changes to to the tests and made changes to the error messages.

I think decode() is valid since the input is already ascii encoded.

--
Added file: http://bugs.python.org/file29834/Issue9682-full.patch

___
Python tracker 

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



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

2013-04-13 Thread Mark Dickinson

Mark Dickinson added the comment:

+1 on using PyNumber_Index.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue17722] 'round' function doesn't honour a descriptor __round__

2013-04-13 Thread Benjamin Peterson

Benjamin Peterson added the comment:

In this case, I had almost finished a patch as I was talking with you on IRC, 
but I had to go play in a show for 3 hours.

--

___
Python tracker 

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



[issue17722] 'round' function doesn't honour a descriptor __round__

2013-04-13 Thread Mark Dickinson

Mark Dickinson added the comment:

No problem.

Do you usually keep patches in your WC?

--

___
Python tracker 

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



[issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation

2013-04-13 Thread Vladimir Korolev

Vladimir Korolev added the comment:

For some reason can't figure out how to attach multiple files.  So here is the 
benchmark module

--
Added file: http://bugs.python.org/file29833/benchmark.py

___
Python tracker 

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



[issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation

2013-04-13 Thread Vladimir Korolev

Vladimir Korolev added the comment:

We have this issue triaged for at CPython hackathon in Boston.  Here is a patch 
for the issue.  

We only tested on Mac OS X 10.8.3,  which has zoned allocator,  so the memory 
profile is exactly the same with our without this patch.  The running time 
seems to be slightly better with the patch.  The benchmark we used runs for 
about 5.6 seconds with the patch vs.  5.9 seconds without the patch.  We run 
the benchmark multiple times and the results seem to be consistent.

Here are the results of the benchmarking and memory profile testing:

With FixWithout Fix

Mem  1535 nodes (6377296 bytes) 1535 nodes (6378144 bytes)
Time 5.68   5.9 sec



The memory profile was measured by the MacOS X 'heap' command.  The timings 
come from attached benchmark module.  The original benchmark module is taken 
from here http://bugs.python.org/file25558/benchmark.py  and was modified to 
test this issue.

--
keywords: +patch
nosy: +vladistan
Added file: http://bugs.python.org/file29832/issue17694.patch

___
Python tracker 

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



[issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation

2013-04-13 Thread Vladimir Korolev

Vladimir Korolev added the comment:

I'd like to note that the actual patch was written by Adam.Duston 
http://bugs.python.org/user17706

I just verified the results, measured the time/memory performance submitted the 
patch.

--

___
Python tracker 

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



[issue11957] re.sub confusion between count and flags args

2013-04-13 Thread Ezio Melotti

Ezio Melotti added the comment:

The change would still be backwards compatible (even though inspect.signature 
and similar functions might return something different).  Note that I'm not 
saying that's the best option, but it should be doable.

--

___
Python tracker 

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



[issue17722] 'round' function doesn't honour a descriptor __round__

2013-04-13 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Sorry for trampling on you; I had a patch already in my wc.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue17722] 'round' function doesn't honour a descriptor __round__

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cc59c215f19e by Benjamin Peterson in branch 'default':
properly lookup the __round__ special method (closes #17722)
http://hg.python.org/cpython/rev/cc59c215f19e

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

___
Python tracker 

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



[issue17724] urllib -- add_handler method refactoring for clarity

2013-04-13 Thread Max Mautner

New submission from Max Mautner:

Response handlers are registered with the OpenerDirector class in the 
urllib.request module using the add_handler method--it's a convoluted method 
that I refactored for legibility's sake.

--
files: urllib_add_handler.patch
keywords: patch
messages: 186853
nosy: Max.Mautner
priority: normal
severity: normal
status: open
title: urllib -- add_handler method refactoring for clarity
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file29831/urllib_add_handler.patch

___
Python tracker 

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



[issue16587] Py_Initialize breaks wprintf on Windows

2013-04-13 Thread John Ehresman

John Ehresman added the comment:

One way to fix this is to use the FileRead & FileWrite api functions directly 
as proposed in issue 17723  I would regard this as a change in behavior and not 
a simple bug fix because there is probably code written for 3.3 that assumes 
the C level stdout is in binary after python is initialized so would target 3.4 
for the change.

--
nosy: +jpe

___
Python tracker 

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



[issue16273] f.tell() returning negative number on Windows build

2013-04-13 Thread Armin Rigo

Changes by Armin Rigo :


--
nosy:  -arigo

___
Python tracker 

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



[issue4140] urllib2: request with digest auth through proxy fail

2013-04-13 Thread Jessica McKellar

Jessica McKellar added the comment:

jan.kollhof, thanks for the report and your work on this ticket!

The format of the client response to a server's digest challenge is detailed in 
RFC 2617, section 3.2.2: The Authorization Request Header.

The urllib2.py attachment is unfortunately the whole file and not a diff, but I 
think from the transcript in msg74918 that Jan is discussing the format of the 
digest-uri header. That field is in turn defined in RFC 2616, section 5.1.2: 
Request-URI.

Request-URI= "*" | absoluteURI | abs_path | authority

The absoluteURI form is REQUIRED when the request is being made to a
   proxy.

So I believe urllib2 has the correct, RFC-conforming behavior here by sending 
the full URI through a proxy, and the issue is with IIS.

Thus, I recommend that we close this ticket as invalid.

--
nosy: +jesstess

___
Python tracker 

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



[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Ned Jackson Lovely

Ned Jackson Lovely added the comment:

s/IOError/OSError/

--
Added file: http://bugs.python.org/file29830/issue2118-OSError.diff

___
Python tracker 

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



[issue17723] Use FileRead and FileWrite in fileio.c on Windows

2013-04-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +haypo, sbt

___
Python tracker 

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



[issue17723] Use FileRead and FileWrite in fileio.c on Windows

2013-04-13 Thread John Ehresman

New submission from John Ehresman:

File object's can use the win32 api FileRead and FileWrite instead of the CRT's 
read & write function.  This would eliminate the need to set the mode to binary 
on stdin & stdout, which is the underlying cause of issue 16587.  This could 
also possibly be the basis of adding nonblocking functionality.  An initial 
patch is attached, but I still need to verify what this does to the CRT mode of 
files that are opened by python (rather than already be opened, like stdin & 
stdout are).

--
files: use_filerw.patch
keywords: patch
messages: 186849
nosy: jpe
priority: normal
severity: normal
status: open
title: Use FileRead and FileWrite in fileio.c on Windows
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file29829/use_filerw.patch

___
Python tracker 

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



[issue17722] 'round' function doesn't honour a descriptor __round__

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Perhaps it will be good to add a new test when X doesn't not have a special 
method. I don't see this case is covered.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue17713] test_logging fails in test_compute_rollover_weekly_attime

2013-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I also find the original code totally unreadable. Why "currentTime = 0"? Why no 
comments on the various calculations? Vinay, it would be nice if you could make 
some efforts here.

--

___
Python tracker 

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



[issue5993] python produces zombie in webbrowser.open

2013-04-13 Thread Shaun Hickson

Shaun Hickson added the comment:

Just as an additional data point, I was also unable to recreate this on OS X 
10.8.3 using any browser.

--
nosy: +sphickson

___
Python tracker 

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



[issue17713] test_logging fails in test_compute_rollover_weekly_attime

2013-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Shaun, your patch fails if I remove the @skip decorator:

==
FAIL: test_compute_rollover_weekly_attime 
(test.test_logging.TimedRotatingFileHandlerTest)
--
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/test/test_logging.py", line 3989, in 
test_compute_rollover_weekly_attime
self.assertEqual(actual, expected)
AssertionError: 388800 != 302400


On the other hand, the original test works fine here. I guess the diagnosing 
isn't complete yet :-)

--
nosy: +pitrou

___
Python tracker 

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



[issue11957] re.sub confusion between count and flags args

2013-04-13 Thread Mike Milkin

Mike Milkin added the comment:

We could do that but we would be changing the signature before adding the 
warning

--

___
Python tracker 

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



[issue17713] test_logging fails in test_compute_rollover_weekly_attime

2013-04-13 Thread Shaun Hickson

Shaun Hickson added the comment:

Patch to fix test_compute_rollover_weekly_attime:

1) Use 6 rather than 7 for calculating expected rollover day

2) Roll all cases (rollover day earlier than current day, both days the same, 
and current day earlier than rollover day) into one if/else statement

--
keywords: +patch
Added file: http://bugs.python.org/file29828/issue17713.patch

___
Python tracker 

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



[issue17705] Fill Character cannot be \0

2013-04-13 Thread Jason Michalski

Jason Michalski added the comment:

I worked on a patch that allows NUL padding for longs, floats and complex 
numbers. It seems NUL was being used as a sentinel in the format string parsing 
when no padding character is given. It was then replaced with a space in each 
call to fill_padding if it was NUL.

--
keywords: +patch
nosy: +Jason.Michalski
Added file: http://bugs.python.org/file29827/cpython-3.3-17705.patch

___
Python tracker 

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



[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Agree with Serhiy. Better to direcly use OSError than IOError alias.

--
nosy: +asvetlov

___
Python tracker 

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



[issue17016] _sre: avoid relying on pointer overflow

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you, Nickolai, for the patch.

--

___
Python tracker 

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



[issue17016] _sre: avoid relying on pointer overflow

2013-04-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +Extension Modules
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions:  -Python 3.2

___
Python tracker 

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



[issue7100] test_xmlrpc: global name 'stop_serving' is not defined

2013-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Indeed, this issue looks obsolete. Thanks for taking a look!

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

___
Python tracker 

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



[issue15480] Drop TYPE_INT64 from marshal in Python 3.4

2013-04-13 Thread Dan Riti

Dan Riti added the comment:

Looks great, thanks Antoine! =)

--

___
Python tracker 

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



[issue15480] Drop TYPE_INT64 from marshal in Python 3.4

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 74a440984b20 by Antoine Pitrou in branch 'default':
Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal.
http://hg.python.org/cpython/rev/74a440984b20

--
nosy: +python-dev

___
Python tracker 

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



[issue17710] SystemError in cPickle for incorrect input

2013-04-13 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti :


Removed file: http://bugs.python.org/file29824/fix_quoted_string_python3.patch

___
Python tracker 

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



[issue15480] Drop TYPE_INT64 from marshal in Python 3.4

2013-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

So, I've just tweaked the patch a bit so that ints longer than machine size are 
still tested for. Congrats for your first contribution!

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

___
Python tracker 

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



[issue17710] SystemError in cPickle for incorrect input

2013-04-13 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

I was targeting head, not the release branches. It is fine to change the 
exception there as we don't make any guarantee about the exceptions raised 
during the unpickling process. It is easy enough to fix patch use ValueError 
for the release branch.

And adding guards is unnecessary after the removing the code for stripping 
trailing whitespace.

Here's slightly updated patch that check if readline() reached an EOF instead 
of a newline.

--
Added file: http://bugs.python.org/file29826/fix_quoted_string_python3.patch

___
Python tracker 

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



[issue7100] test_xmlrpc: global name 'stop_serving' is not defined

2013-04-13 Thread Jessica McKellar

Jessica McKellar added the comment:

To summarize (as I understand it) the state of this ticket:

* stop_serving no longer exists anywhere in the code base, so the proximal  
cause of the bug report from 2009 no longer exists.

* the tests in test_xmlrpc currently all pass without issue.

* If you tried to create a test in a subclass of BaseServerTestCase which never 
issues a request to the MyXMLRPCServer instance set up by http_server, it will 
hang. The reason is that BaseServerTestCase uses setUp and tearDown methods 
that force the test to coordinate a threading.Event with http_server; if no 
request is made to the XMLRPC server, the test will hang in tearDown waiting 
for the server to set the Event flag.

I think this ticket could be closed because the proximal issue no longer 
exists. Alternatively, a docstring could be added to BaseServerTestCase saying 
tests in subclasses must make at least 1 request else they should live in a 
different TestCase, or BaseServerTestCase could be refactored to not have this 
constraint.

--
nosy: +jesstess

___
Python tracker 

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



[issue17301] An in-place version of many bytearray methods is needed

2013-04-13 Thread Ned Jackson Lovely

Ned Jackson Lovely added the comment:

An mtranslate, or "mutating translate" method for bytearrays. My first C code 
in a long time, so be gentle. The name is bad, but I don't see a better 
suggestion below.

--
keywords: +patch
nosy: +n
Added file: http://bugs.python.org/file29825/issue17301.diff

___
Python tracker 

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



[issue11957] re.sub confusion between count and flags args

2013-04-13 Thread Ezio Melotti

Ezio Melotti added the comment:

Can't you use *args and **kwargs and then raise a deprecation warning if count 
and/or flags are in args?
Even if enums are merged in, there might still be issues depending on their 
implementation.

--

___
Python tracker 

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



[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-13 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Assigning to me. Will get back in 1 or 2 days.

--
assignee:  -> giampaolo.rodola

___
Python tracker 

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



[issue15480] Drop TYPE_INT64 from marshal in Python 3.4

2013-04-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue15480] Drop TYPE_INT64 from marshal in Python 3.4

2013-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Antoine, I just filled one out maybe 2 hours ago (I'm at a CPython
> sprint in Boston).

Ah, great, thank you!

--

___
Python tracker 

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



[issue995907] memory leak with threads and enhancement of the timer class

2013-04-13 Thread Yael

Yael added the comment:

I am working on a patch for a new class that uses a single background thread, 
it should be ready soon. One unintended consequence of this change is that with 
one thread, multiple timers that have the same timeout will no longer run in 
parallel, but one after the other.

--
nosy: +yael

___
Python tracker 

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



[issue15480] Drop TYPE_INT64 from marshal in Python 3.4

2013-04-13 Thread Dan Riti

Dan Riti added the comment:

Antoine, I just filled one out maybe 2 hours ago (I'm at a CPython sprint in 
Boston).

https://secure.echosign.com/public/viewAgreement?aid=T8FLXZG5LX3W2N&eid=T8GPRVI62IXF2Y&;

--

___
Python tracker 

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



[issue13510] Clarify that readlines() is not needed to iterate over a file

2013-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

In 3.x I think we'll want to drop the following sentence: "Since the two 
approaches manage line buffering differently, they should not be mixed". But it 
can wait for another issue.

--
nosy: +pitrou

___
Python tracker 

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



[issue15480] Drop TYPE_INT64 from marshal in Python 3.4

2013-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thank you, Daniel. The patch looks technically ok. Could you sign a contributor 
agreement? It will cover all your future contributions to Python: 
http://www.python.org/psf/contrib/

--
nosy: +pitrou

___
Python tracker 

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



[issue11957] re.sub confusion between count and flags args

2013-04-13 Thread Mike Milkin

Mike Milkin added the comment:

There is no sane way to issue a warning without changing the signature and we 
don't want to change the signature without issuing a deprecation warning for 
the function, so sadly option 3 is the only way for this to work, (Im going to 
not touch this till ENUMS are merged in.)

--

___
Python tracker 

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



[issue9538] Replace confusing pseudoname 'object' in special methods section.

2013-04-13 Thread peter recore

peter recore added the comment:

George,

When I build the docs with my changes, the links from the method names seem to 
work the same way as they do in the existing docs.

--

___
Python tracker 

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



[issue17710] SystemError in cPickle for incorrect input

2013-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Alexandre, I don't like your patch very much:
- you are changing the exception from ValueError to UnpicklingError (which 
doesn't derive from ValueError) in a bugfix release
- you aren't actually adding any guards in the C code, so it's not demonstrably 
more robust

--

___
Python tracker 

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



[issue17710] SystemError in cPickle for incorrect input

2013-04-13 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

I also wrote a patch for this. I took I slightly different approach though. I 
fixed the C implementation to be more strict on the quoting. Currently, it 
strips trailing non-printable characters, something pickle.py doesn't do.

I also cleaned up the tests to check this behavior.

--
Added file: http://bugs.python.org/file29824/fix_quoted_string_python3.patch

___
Python tracker 

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



[issue17710] SystemError in cPickle for incorrect input

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Of course, UnpicklingError is not a bug. Perhaps almost any exception except 
SystemError is not a bug. I mention it because it's a case where Python 3 
differs from Python 2.

I think _pickle.c patches can be simplified.

+if (len < 2)
+goto insecure;
 if (s[0] == '"' && s[len - 1] == '"') {

--

___
Python tracker 

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



[issue16273] f.tell() returning negative number on Windows build

2013-04-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> docs@python
components: +Documentation, IO -Interpreter Core
nosy: +docs@python
priority: high -> normal
stage: test needed -> patch review
versions: +Python 3.3, Python 3.4 -Python 2.7

___
Python tracker 

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



[issue16273] f.tell() returning negative number on Windows build

2013-04-13 Thread Sijin Joseph

Sijin Joseph added the comment:

Attaching a patch with a doc update to the tutorial, specifying that

1. The return value from f.tell is an opaque number for text files.
2. When seeking using text files the offset value needs to come from f.tell(). 
http://docs.python.org/3.4/library/io.html#io.TextIOBase.seek

--
keywords: +patch
nosy: +sijinjoseph
Added file: http://bugs.python.org/file29823/16273-doc-update.patch

___
Python tracker 

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



[issue17713] test_logging fails in test_compute_rollover_weekly_attime

2013-04-13 Thread Shaun Hickson

Shaun Hickson added the comment:

I was looking at this yesterday and this morning a little bit, and the expected 
value is too large by a day (e.g. as the test currently runs, actual = expected 
- (24 * 60 * 60)).

--
nosy: +sphickson

___
Python tracker 

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



[issue13510] Clarify that readlines() is not needed to iterate over a file

2013-04-13 Thread Dan Riti

Dan Riti added the comment:

After reading the comments, I generated a patch that does the following:

- Reorganize to present `for line in f:` as the first approach for reading 
lines. I refrained from saying it's the *preferred* approach, however I can add 
that if desired.
- Reorganize to present `f.readlines()` as the alternative approach.

Any feedback is more then welcome! Thanks.

--
keywords: +patch
nosy: +dan.riti
Added file: http://bugs.python.org/file29822/demote-readlines.patch

___
Python tracker 

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



[issue17722] 'round' function doesn't honour a descriptor __round__

2013-04-13 Thread Mark Dickinson

Mark Dickinson added the comment:

Non-leaky patch.

--
Added file: http://bugs.python.org/file29821/round_descriptor2.patch

___
Python tracker 

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



[issue17711] Persistent id in pickle with protocol version 0

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Even for alphanumeric strings Python 3 have a bug. It saves strings and load 
bytes objects.

--

___
Python tracker 

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



[issue16694] Add pure Python operator module

2013-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Zachary, I suppose Modules/_operator.c is a rename of Modules/operator.c.
Could you generate your patch using "hg diff --git" so that history isn't lost 
here?

See also http://docs.python.org/devguide/committing.html#minimal-configuration

--
nosy: +pitrou

___
Python tracker 

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



[issue17722] 'round' function doesn't honour a descriptor __round__

2013-04-13 Thread Mark Dickinson

New submission from Mark Dickinson:

Benjamin pointed out on #python-dev that the builtin round function should be 
using _PyObject_LookupSpecial to look up the __round__ method.  Here's a fix.

--
components: Interpreter Core
files: round_descriptor.patch
keywords: patch
messages: 186813
nosy: mark.dickinson
priority: normal
severity: normal
stage: patch review
status: open
title: 'round' function doesn't honour a descriptor __round__
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29820/round_descriptor.patch

___
Python tracker 

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



[issue17722] 'round' function doesn't honour a descriptor __round__

2013-04-13 Thread Mark Dickinson

Mark Dickinson added the comment:

Whoops.  That patch introduces a new refleak;  will fix shortly.

--

___
Python tracker 

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



[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

socket.error is another alias of OSError.

--

___
Python tracker 

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



[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-13 Thread R. David Murray

R. David Murray added the comment:

Thanks, Mike.  I made some review comments (you should have gotten an email, or 
look at them via the 'review' link on the patch).

--

___
Python tracker 

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



[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Since 3.3 IOError is an alias of OSError. We get rid of reference of IOError 
and other OSError aliases in the documentation and code, replacing them with 
OSError.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue17659] no way to determine First weekday (based on locale)

2013-04-13 Thread Kyle McMartin

Kyle McMartin added the comment:

Hacky patch at adding support for querying these values from nl_langinfo, and a 
new exported function from the locale module to return a guess at the first day 
of the week appropriate for Calendar.firstdayofweek

After writing this, I think it might be better to implement this as another 
hash, so keys can be queried and objects directly returned. I'll take a look at 
that approach soon.

Of course, all this is contingent on having support from libc, and it seems 
only Linux currently has this, and the *BSDs (and hence OS X via FreeBSD) do 
not. I'll look into that as well.

--
keywords: +patch
nosy: +jkkm
Added file: http://bugs.python.org/file29819/cpython-add-first-day-of-week.diff

___
Python tracker 

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



[issue16061] performance regression in string replace for 3.3

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks to Ezio Melotti and Daniel Shahaf for their great help in correcting my 
clumsy wording.

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

___
Python tracker 

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



[issue16061] performance regression in string replace for 3.3

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d396e0716bf4 by Serhiy Storchaka in branch 'default':
Issue #16061: Speed up str.replace() for replacing 1-character strings.
http://hg.python.org/cpython/rev/d396e0716bf4

--
nosy: +python-dev

___
Python tracker 

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



[issue17719] IDLE help text refers to incorrect Python version

2013-04-13 Thread R. David Murray

R. David Murray added the comment:

Thanks, Kent.  For the record, the issue for the deprecation is #16123, and the 
issue that introduced the incorrect line is #5066.

--
nosy: +r.david.murray
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17719] IDLE help text refers to incorrect Python version

2013-04-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eac4e23ce2fd by R David Murray in branch 'default':
#17719: fix incorrect version number in deprecation doc.
http://hg.python.org/cpython/rev/eac4e23ce2fd

--
nosy: +python-dev

___
Python tracker 

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



[issue9538] Replace confusing pseudoname 'object' in special methods section.

2013-04-13 Thread Georg Brandl

Georg Brandl added the comment:

Note that Sphinx searches for "object.__foo__" when :meth:`__foo__` is used; 
this change will break all those links.

For that reason I'm -1 to this change: I don't see the perceived issue as 
problematic anyway.

--

___
Python tracker 

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



[issue9297] SMTP with Sqlite3 file attached problem

2013-04-13 Thread Jessica McKellar

Jessica McKellar added the comment:

murilobr, thank you for the detailed and persistent bug report :)

I was not able to reproduce this issue when sending mail from myself to myself 
through an open Google SMTP server*, using either Python 2.7** or 3.1. Do you 
experience this issue with a GMail SMTP server? If not, this seems like 
something specific to your environment--perhaps a custom SMTP server you are 
using?

Unless someone can reproduce the issue, I recommend that we close this ticket.

* e.g. one from

$ nslookup
> set type=MX
> google.com
Server:192.168.1.1
Address:192.168.1.1#53
Non-authoritative answer:
google.commail exchanger = 10 aspmx.l.google.com.
google.commail exchanger = 50 alt4.aspmx.l.google.com.
google.commail exchanger = 20 alt1.aspmx.l.google.com.
google.commail exchanger = 30 alt2.aspmx.l.google.com.
google.commail exchanger = 40 alt3.aspmx.l.google.com.

** This is targeted at 3.1 but the example uses str.decode, which doesn't exist 
in Python 3, so I went back and checked on 2.7.

--
nosy: +jesstess
versions: +Python 2.7 -Python 3.1

___
Python tracker 

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



[issue13672] Add co_qualname attribute in code objects

2013-04-13 Thread James Pye

James Pye added the comment:

Considering the API changes necessary for adding qualname, perhaps a better 
solution would be to just start using the qualname instead of the function's 
"basename"--co_name is the qualname. This would offer an automatic improvement 
to the readability of coverage/profiling tool reports. Admittedly, not sure 
what kind of breakage might ensue... =\

--
nosy: +James.Pye

___
Python tracker 

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



[issue15480] Drop TYPE_INT64 from marshal in Python 3.4

2013-04-13 Thread Dan Riti

Dan Riti added the comment:

So I figured I'd give this one a shot...generated a patch to remove TYPE_INT64. 
Tests seem to pass, but please provide any guidance if I did something wrong! 
Thanks.

--
keywords: +patch
nosy: +dan.riti
Added file: http://bugs.python.org/file29818/marshall-remove-int64.patch

___
Python tracker 

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



[issue17720] pickle.py's load_appends should call append() on objects other than lists

2013-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, test is needed. Current tests don't cover this case.

I suggest to move obj.append out of the tight loop, as in C implementation.

append = obj.append
for item in items:
append(item)

--

___
Python tracker 

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



  1   2   3   >