[issue17487] wave.Wave_read.getparams should be more user friendly

2013-03-20 Thread Popa Claudiu

Popa Claudiu added the comment:

Updated the patch with test for .getparams.

--
Added file: http://bugs.python.org/file29499/wave_17487.patch

___
Python tracker 

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



[issue17484] add tests for getpass

2013-03-20 Thread Thomas Fenzl

Changes by Thomas Fenzl :


Added file: http://bugs.python.org/file29500/getpass_tests-3.diff

___
Python tracker 

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



[issue16692] Support TLS 1.1 and TLS 1.2

2013-03-20 Thread Michele Orrù

Michele Orrù added the comment:

synced with tip

> This decorator looks like it would be impressed in a simpler way,
> using unittest.skipIf (or unittest.skipUnless).

> It would be nice to check that connecting succeeds from a
> TLSv1_1 client on a SSLv23 server.

yep, thanks.


> Not sure why you test only with OP_NO_TLSv1_1.
I've just emulated older tests against older TSL protocols. Is there anything 
wrong you see? 


PS: I have removed ssl.PROTOCOL_* from test_constants, since they are already 
used in the global variable PROTOCOLS.

--
Added file: http://bugs.python.org/file29501/issue16692.2.patch

___
Python tracker 

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



[issue17489] random.Random implements __getstate__() and __reduce__()

2013-03-20 Thread Ramchandra Apte

Ramchandra Apte added the comment:

__getstate__ is for pickling instances [0], __reduce__ is for pickling the 
object itself [1]

^0 http://docs.python.org/2/library/pickle.html#object.__getstate__
^1 http://docs.python.org/2/library/pickle.html#object.__reduce__

--
nosy: +Ramchandra Apte

___
Python tracker 

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



[issue17053] pydoc should use inspect.signature instead of inspect.getfullargspec

2013-03-20 Thread Ronald Oussoren

Ronald Oussoren added the comment:

* renamed "render" method of inspect.Parameter and inspect.Signature
  to "_render" to avoid changing the public API

* updated patch for current tip (I got a merge conflict when pulling
  in the tip due to a patch for Lib/test/test_pydoc.py)

--
Added file: http://bugs.python.org/file29502/issue17053-v2.txt

___
Python tracker 

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



[issue12768] docstrings for the threading module

2013-03-20 Thread moijes12

moijes12 added the comment:

Hi

Since this is a duplicate of #17375, is the patch not going to make to the 
review stage at all?

--

___
Python tracker 

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



[issue17317] Benchmark driver should calculate actual benchmark count in -h

2013-03-20 Thread Anuj Gupta

Anuj Gupta added the comment:

The asterisk is visible now, Brett :) Please commit the patch at your 
convenience.

--

___
Python tracker 

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



[issue17323] Disable [X refs, Y blocks] ouput in debug builds

2013-03-20 Thread Ezio Melotti

Ezio Melotti added the comment:

Attached updated patch with docs and tests.
I changed the function to do the equivalent of "if 
sys._xoptions.get('showrefcount', False):" as proposed in msg183608.
Adding -X showrefcount to non-debug builds could be covered in a separate issue.
Cleaning up the test suite to avoid checking for the refcounts in stderr can 
also be done in a separate commit if necessary.

--
stage: needs patch -> patch review
Added file: http://bugs.python.org/file29503/issue17323-2.diff

___
Python tracker 

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



Re: [issue5051] test_update2 in test_os.py invalid due to os.environ.clear() followed by reliance on environ COMSPEC

2013-03-20 Thread Roumen Petrov

Hi Ned,


Ned Jackson Lovely added the comment:

[SNIP]

In both cases, the currently running python executable, fetched via 
sys.executable and run using os.popen, is used to print the value, instead of 
the shell's echo. This moves things closer towards cross-platform niceness, and 
removes the dependency on /bin/sh.

Unfortunately, I don't have a Windows machine readily available to test this 
on. Could apply your preferred patch, run it for me, and let me know if you 
have any problems?



$ uname -a
MINGW32_NT-5.1 QEMU 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 Msys
---
Python 3.4.0a0 (default, Mar 20 2013, 00:32:43)
[GCC 4.7.2] on win32
---
$ cat ...test_os.py

# Bug 1110478
def test_update2(self):
minimal_environ_keys = ('COMSPEC', 'PATH',)
minimal_environ = {k:os.environ[k] for k in minimal_environ_keys
if k in os.environ}
os.environ.clear()
os.environ.update(HELLO="World")
minimal_environ['HELLO'] = "World"
os.environ.update(minimal_environ)
python_cmd = "{0} -c \"import os;print(os.environ['HELLO'])\""
with os.popen(python_cmd.format(sys.executable)) as popen:
value = popen.read().strip()
self.assertEqual(value, "World")

# Bug 1110478
def test_update3(self):
self.assertTrue('HELLO' not in os.environ)
os.environ.update(HELLO="World")
python_cmd = "{0} -c \"import os;print(os.environ['HELLO'])\""
with os.popen(python_cmd.format(sys.executable)) as popen:
value = popen.read().strip()
self.assertEqual(value, "World")

@unittest.skipUnless(os.path.exists('/bin/sh'), 'requires /bin/sh')
def test_os_popen_iter(self):
with os.popen(
"/bin/sh -c 'echo \"line1\nline2\nline3\"'") as popen:
it = iter(popen)
self.assertEqual(next(it), "line1\n")
self.assertEqual(next(it), "line2\n")
self.assertEqual(next(it), "line3\n")
self.assertRaises(StopIteration, next, it)


result:

test_update (test.test_os.EnvironTests) ... ok
test_update2 (test.test_os.EnvironTests) ... ok
test_update3 (test.test_os.EnvironTests) ... ok
test_values (test.test_os.EnvironTests) ... ok


So with both (take2&take3) updates tests pass. Should work with MSVC 
builds.



May be test_os_popen_iter could be updated .


Regards,

Ned



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



[issue2052] Allow changing difflib._file_template character encoding.

2013-03-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

After thinking about it more, the real problem is that the charset setting must 
match the chars used and how they re encoded, so no one setting is right for 
all uses. An alternative to changing the default in existing versions is to at 
least document what it is and explain how to work around it with .replace -- 
for instance output.replace('ISO-8859-1', 'utf-8'). I agree that adding a 
parameter (charset=xxx) is a new feature.

--

___
Python tracker 

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



[issue17374] Remove restriction against Semaphore having a negative value

2013-03-20 Thread Charles-François Natali

Charles-François Natali added the comment:

>> POSIX semaphore don't support negative initial value.
>
> It was an early design decision to go with the Java threading model rather 
> than the POSIX model.  The Java API supports negative initial values -- the 
> same Dijkstra's original P() and V().

Hum, yes, but my point was that multiprocessing semaphores are
implemented atop POSIX semaphores, which don't support negative
initial values.
Also, since the API doesn't allow negative values, it's possible that
an implementation uses the native POSIX semaphores, and this change
would break such implementations.

> I just looked at the C code implementing multiprocessing Semaphore.  Removing 
> the negative count restriction there looks straight-forward.  I'll include it 
> in the patch or will open a separate tracker item for it.

I'm not so sure about this, how would you do it?

--

___
Python tracker 

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



[issue13477] tarfile module should have a command line

2013-03-20 Thread STINNER Victor

STINNER Victor added the comment:

I don't think that we need to support compressing/decompressing using
the standard input/output.

2013/3/20 Brandon Craig Rhodes :
>
> Brandon Craig Rhodes added the comment:
>
> Larry Hastings  writes:
>
>> Huh.  tar *can* infer it from the data itself.  On the other hand, it
>> chooses explicitly not to.  I guess "tar" knows explicit is better
>> than implicit too ;-)
>
> I am told that the refusal of "tar" to introspect the data is because:
>
> (a) Tar runs "gunzip -c" (for example) as an external program; it does
> not actually compile against libz.
>
> (b) Streams in UNIX cannot be rewound.  Tar cannot look at the first
> block of an input pipe and then "put the block back" so that the same
> input can be fed directly to "gunzip" as its input.
>
> (c) Given (a) and (b), tar could only support data introspection of
> input from a pipe if it were willing to be a pass-through that, after
> reading and introspecting the first block, then fired up "gunzip" and
> sent ALL of the blocks through.  Which would require multiprocessing,
> threading, or async I/O so that tar could both read and write, which
> would make tar more complicated.
>
> (d) Therefore, tar refuses to even look.
>
> Since Python does bundle compression in its standard library, it can
> quite trivially step forward and actually do the data introspection that
> tar insists on not doing; the first few bytes of a tar archive are quite
> demonstrably different from the first bytes of a gzip stream, if I
> recall.
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue16475] Support object instancing and recursion in marshal

2013-03-20 Thread Ezio Melotti

Ezio Melotti added the comment:

I'm getting two failures after this:
==
ERROR: testRaising (test.test_exceptions.ExceptionTests)
--
Traceback (most recent call last):
  File "/home/wolf/dev/py/py3k/Lib/test/test_exceptions.py", line 51, in 
testRaising
marshal.loads(b'')
ValueError: bad marshal data (unknown type code)

--

and

==
ERROR: test_no_marshal 
(test.test_importlib.source.test_file_loader.SourceLoaderBadBytecodeTest)
--
Traceback (most recent call last):
  File "/home/wolf/dev/py/py3k/Lib/test/test_importlib/source/util.py", line 
23, in wrapper
to_return = fxn(*args, **kwargs)
  File 
"/home/wolf/dev/py/py3k/Lib/test/test_importlib/source/test_file_loader.py", 
line 364, in test_no_marshal
self._test_no_marshal()
  File 
"/home/wolf/dev/py/py3k/Lib/test/test_importlib/source/test_file_loader.py", 
line 265, in _test_no_marshal
self.import_(file_path, '_temp')
  File 
"/home/wolf/dev/py/py3k/Lib/test/test_importlib/source/test_file_loader.py", 
line 194, in import_
module = loader.load_module(module_name)
  File "", line 572, in _check_name_wrapper
  File "", line 1032, in load_module
  File "", line 1013, in load_module
  File "", line 548, in module_for_loader_wrapper
  File "", line 869, in _load_module
  File "", line 990, in get_code
  File "", line 668, in _compile_bytecode
ValueError: bad marshal data (unknown type code)

==
ERROR: test_no_marshal 
(test.test_importlib.source.test_file_loader.SourcelessLoaderBadBytecodeTest)
--
Traceback (most recent call last):
  File 
"/home/wolf/dev/py/py3k/Lib/test/test_importlib/source/test_file_loader.py", 
line 470, in test_no_marshal
self._test_no_marshal(del_source=True)
  File 
"/home/wolf/dev/py/py3k/Lib/test/test_importlib/source/test_file_loader.py", 
line 265, in _test_no_marshal
self.import_(file_path, '_temp')
  File 
"/home/wolf/dev/py/py3k/Lib/test/test_importlib/source/test_file_loader.py", 
line 194, in import_
module = loader.load_module(module_name)
  File "", line 1099, in load_module
  File "", line 548, in module_for_loader_wrapper
  File "", line 869, in _load_module
  File "", line 1105, in get_code
  File "", line 668, in _compile_bytecode
ValueError: bad marshal data (unknown type code)

--

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue2052] Allow changing difflib._file_template character encoding.

2013-03-20 Thread Ezio Melotti

Ezio Melotti added the comment:

I haven't looked at the code, but if an HTML page is generated it should 
probably be updated to use HTML5 and .

--

___
Python tracker 

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



[issue12768] docstrings for the threading module

2013-03-20 Thread Eli Bendersky

Eli Bendersky added the comment:

moijes12, since Raymond went ahead and committed a patch to 2.7 in #17375, I 
think patches to other versions should also be based on his patch. The most 
constructive thing you can do at this point is review his changes in 2.7 and 
help porting them to 3.x. Also, you can see if anything is missing/wrong since 
you've gained some experience about the module while writing the docstrings.

I'm sorry it went like that; don't take it personally - open-source development 
is a bazaar :-)

--

___
Python tracker 

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



[issue17374] Remove restriction against Semaphore having a negative value

2013-03-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I also don't think "Java does it" is a good design justification anymore.
Python's threading model is the Python threading model, even though it
may have been inspired by Java at the start :-)

--
title: Remove restriction against Semaphore having a negative value -> Remove 
restriction against Semaphore having a negative   value

___
Python tracker 

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



[issue13477] tarfile module should have a command line

2013-03-20 Thread Lars Gustäbel

Lars Gustäbel added the comment:

I'd like to re-emphasize that it is best to keep the whole thing as simple and 
straight-forward as possible. Offer some basic operations and that's it.

Although I am pretty accustomed to the original tar command line, I think we 
should copy zipfile's interface. It makes more sense to offer some kind of 
unified "Python" command line approach for archive access than keeping to old 
traditions.

I agree with Victor that we don't really need support for stdin/stdout. It only 
complicates matters. 

If everybody still votes for stdin/stdout, I'd like to point out that tarfile 
supports compression detection for streams. It would be best to use mode="r|*" 
throughout because it works for both normal files and stdin. Use 
mode="w|(compression)" for writing to files and stdout accordingly.

If we do not support stdin/stdout we no longer need all these compression 
options because for reading we do autodetection and for writing we could deduce 
the compression from the file extension (which is just some kind of 
autodetection too).

Another side note: We should be aware of the effects discussed in issue17102 
and issue1044. In my opinion tarfile as a library is obligated to behave like 
that, but maybe that's not acceptable for a command line tool.

--

___
Python tracker 

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



[issue17374] Remove restriction against Semaphore having a negative value

2013-03-20 Thread Ezio Melotti

Ezio Melotti added the comment:

You might want to rephrase the module docstring of Lib/threading.py then :)

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue17465] Gut devinabox

2013-03-20 Thread Brett Cannon

Brett Cannon added the comment:

OK, so I think supporting builds, runs, and reports is fine to start, but 
trying to get the setup step for Distribute working would be a bonus feature if 
we wanted to make this something we ask people to use on their own w/o guidance.

--

___
Python tracker 

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



[issue17374] Remove restriction against Semaphore having a negative value

2013-03-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> You might want to rephrase the module docstring of Lib/threading.py
> then :)

I think I already suggested rephrasing it but apparently it was lost
somewhere.

--

___
Python tracker 

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



[issue17435] threading.Timer.__init__() should use immutable argument defaults for args and kwargs

2013-03-20 Thread Denver Coneybeare

Denver Coneybeare added the comment:

Thanks r.david.murray.  I appreciate you taking the time to look at this issue!

--

___
Python tracker 

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



[issue17374] Remove restriction against Semaphore having a negative value

2013-03-20 Thread Ezio Melotti

Ezio Melotti added the comment:

msg183614 in #12768?

--

___
Python tracker 

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



[issue17329] Document unittest.SkipTest

2013-03-20 Thread Ezio Melotti

Ezio Melotti added the comment:

Now I get what you were trying to do.
What I don't like is that now the patch splits the section about skipping in 
two separate parts, while it would be better to keep it together IMHO.
You argument about having the "theory" first and the actual API later makes 
sense, and it's somewhat mirrored by e.g. the "basic example" section and the 
detailed API about TestCase and the assert methods later.
If we keep the two parts together we are left with two options:
1) add SkipTest to the existing section as I suggested initially;
2) move the whole section down below where the API is described;

1) it's simpler and it's enough IMHO, but if 2) is better I think it would be 
better to move it after the "deprecated aliases" section.

Michael, do you have any preference?

--

___
Python tracker 

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



[issue17493] Unskip SysModuleTest.test_recursionlimit_fatalerror on Windows

2013-03-20 Thread Zachary Ware

New submission from Zachary Ware:

With support.suppress_crash_popup(), we can stop skipping 
test_sys.SysModuleTest.test_recursionlimit_fatalerror on Windows.

--
components: Tests
files: test_sys_unskip.diff
keywords: patch
messages: 184765
nosy: ezio.melotti, zach.ware
priority: normal
severity: normal
status: open
title: Unskip SysModuleTest.test_recursionlimit_fatalerror on Windows
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29504/test_sys_unskip.diff

___
Python tracker 

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



[issue17460] Remove the strict and related params completely removing the 0.9 support

2013-03-20 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Serhiy - the bad thing IMO would be 'enforcing a new feature in order to save 
people from using deprecated feature'.

I am not against the addition of keyword only args for HTTPConnection in 3.4. A 
concrete need should be ascertained. Should we ask for python-dev suggestion?

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue17374] Remove restriction against Semaphore having a negative value

2013-03-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> msg183614 in #12768?

Exactly.

--

___
Python tracker 

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



[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-20 Thread karl

karl added the comment:

orsenthil,

Added test for python 3.3 for testing the case insensitivity for has_header and 
get_header. The tests fail as it should.
See issue-5550-test-1.patch

I will make a patch to urllib/request.py to make it work.
OK with you?

--
keywords: +patch
Added file: http://bugs.python.org/file29505/issue-5550-test-1.patch

___
Python tracker 

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



[issue17493] Unskip SysModuleTest.test_recursionlimit_fatalerror on Windows

2013-03-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 54ee934400b3 by Ezio Melotti in branch '3.2':
#17493: re-enable a test on Windows.  Patch by Zachary Ware.
http://hg.python.org/cpython/rev/54ee934400b3

New changeset 8d22b6ed44e6 by Ezio Melotti in branch '3.3':
#17493: merge with 3.2.
http://hg.python.org/cpython/rev/8d22b6ed44e6

New changeset 2873f4971281 by Ezio Melotti in branch 'default':
#17493: merge with 3.3.
http://hg.python.org/cpython/rev/2873f4971281

--
nosy: +python-dev

___
Python tracker 

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



[issue17493] Unskip SysModuleTest.test_recursionlimit_fatalerror on Windows

2013-03-20 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report and the patch!

--
assignee:  -> ezio.melotti
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17494] References to stack bottom are confusing

2013-03-20 Thread anatoly techtonik

New submission from anatoly techtonik:

If stack is saved in list and printed to the screen, it will be printed as:
[
  root,
  second,
  last
]

And the last elements is the bottom element. The documentation at 
http://docs.python.org/3/reference/datamodel.html#frame-objects refers "bottom 
element" to be the first one. That's confusing. It is better to avoid 
top/bottom and use first/last or root/terminal.

--
assignee: docs@python
components: Documentation
messages: 184771
nosy: docs@python, techtonik
priority: normal
severity: normal
status: open
title: References to stack bottom are confusing
versions: 3rd party, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 
3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue17495] email.quoprimime.body_encode can't handle characters that encodings.quopri_codec can

2013-03-20 Thread Ross Patterson

New submission from Ross Patterson:

When using email.charset.Charset to encode MIME bodie as quoted-printable, some 
characters that are encodable with the quopri_codec cause a KeyError in 
email.quoprimime:

Python 3.3.0 (default, Oct  7 2012, 14:43:21) 
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> text_encoded = b'mo \xe2\x82\xac'
>>> text = text_encoded.decode('utf-8')
>>> print(text)
mo €
>>> import codecs
>>> codecs.getencoder('quopri_codec')(text_encoded)[0]
b'mo=20=E2=82=AC'
>>> from email import charset
>>> c = charset.Charset('utf-8')
>>> c.header_encoding = charset.QP
>>> c.body_encoding = charset.QP
>>> c.header_encode(text)
'=?utf-8?q?mo_=E2=82=AC?='
>>> c.body_encode(text)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.3/email/charset.py", line 395, in body_encode
return email.quoprimime.body_encode(string)
  File "/usr/lib/python3.3/email/quoprimime.py", line 240, in body_encode
if body_check(ord(c)):
  File "/usr/lib/python3.3/email/quoprimime.py", line 81, in body_check
return chr(octet) != _QUOPRI_BODY_MAP[octet]
KeyError: 8364

--
components: email
messages: 184772
nosy: barry, r.david.murray, rpatterson
priority: normal
severity: normal
status: open
title: email.quoprimime.body_encode can't handle characters that 
encodings.quopri_codec can
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue9372] pulldom.DOMEventStream.__getitem__ is broken

2013-03-20 Thread Thomas Fenzl

Thomas Fenzl added the comment:

I added a depreciation warning to __getitem__.
Also added a testcase checking for it. As item access to DOMEventStream was 
never documented, no changes were made to the documentation.

--
keywords: +patch
nosy: +Thomas Fenzl
Added file: http://bugs.python.org/file29506/pulldom_deprecation.diff

___
Python tracker 

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



[issue17495] email.quoprimime.body_encode can't handle characters that encodings.quopri_codec can

2013-03-20 Thread Ross Patterson

Ross Patterson added the comment:

What is the reason that email.quoprimime doesn't use 
codecs.getencoder('quopri_codec') to do the actual character encoding?

--

___
Python tracker 

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



[issue5713] smtplib gets out of sync if server returns a 421 status

2013-03-20 Thread Kushal Das

Kushal Das added the comment:

Here is a patch along with test case update which can be cleanly applied into 
default.

--
nosy: +kushaldas
Added file: http://bugs.python.org/file29507/issue5713.patch

___
Python tracker 

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



[issue17429] platform.platform() can throw Unicode error

2013-03-20 Thread Toshio Kuratomi

Toshio Kuratomi added the comment:

Okay, new version of the patch with a unittest.

Re: os-release; I don't believe the current code can handle that file.  i\It 
changes format from a simple string (in most Linux distros) to key value pairs. 
 We'll probably need an update to the code to deal with that at some point in 
the future.

--
Added file: http://bugs.python.org/file29508/00175-platform-unicode.patch

___
Python tracker 

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



[issue17495] email.quoprimime.body_encode can't handle characters that encodings.quopri_codec can

2013-03-20 Thread R. David Murray

R. David Murray added the comment:

There is a long history behind quoprime in the email package, and I don't know 
all of it.  It is on my list of things to sort out (there is also potential 
duplication with the binascii module), but I haven't gotten to it yet.

The issue you report, though is a duplicate of issue 16948 and is already fixed 
in the repo.

You checked off 2.7.  Did you actually see a failure in 2.7?  It shouldn't be 
broken there.

--

___
Python tracker 

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



[issue17495] email.quoprimime.body_encode can't handle characters that encodings.quopri_codec can

2013-03-20 Thread Ross Patterson

Ross Patterson added the comment:

I thought I had tested it under 2.7, but I'm not entirely sure.

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

___
Python tracker 

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



[issue17495] email.quoprimime.body_encode can't handle characters that encodings.quopri_codec can

2013-03-20 Thread Ross Patterson

Changes by Ross Patterson :


--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue17495] email.quoprimime.body_encode can't handle characters that encodings.quopri_codec can

2013-03-20 Thread R. David Murray

R. David Murray added the comment:

OK, if you find it is a bug on 2.7 you can reopen.

--
stage:  -> committed/rejected
superseder:  -> email.mime.text.MIMEText: QP encoding broken with 
charset!=ISO-8859-1

___
Python tracker 

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



[issue16475] Support object instancing and recursion in marshal

2013-03-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Indeed, would be nice to fix the test failures.

Besides, it would be extra nice if you could run the test suite *before* 
pushing your changes. Otherwise you're wasting everyone else's time.

--

___
Python tracker 

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



[issue16997] subtests

2013-03-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5c09e1c57200 by Antoine Pitrou in branch 'default':
Issue #16997: unittest.TestCase now provides a subTest() context manager to 
procedurally generate, in an easy way, small test instances.
http://hg.python.org/cpython/rev/5c09e1c57200

--
nosy: +python-dev

___
Python tracker 

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



[issue16997] subtests

2013-03-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Finally committed :) Thanks everyone for the reviews and suggestions.

--
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



[issue17429] platform.platform() can throw Unicode error

2013-03-20 Thread Toshio Kuratomi

Toshio Kuratomi added the comment:

Added NEWS file.  Rebased against hg default.  Ready for review.

--
Added file: http://bugs.python.org/file29509/00175-platform-unicode.patch

___
Python tracker 

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



[issue17496] OS X test for Tk availability in runtktests.py doesn't work

2013-03-20 Thread Alex Gaynor

New submission from Alex Gaynor:

If I run:

$ python -mtest.test_tk

I get a skip, after speaking with people familiar with OS X, it appears that 
the condition for the skip uses old Carbon APIs, which are totally deprecated 
under 64-bit. Attached is a patch which should work.

--
files: tk-cond.diff
keywords: patch
messages: 184784
nosy: alex
priority: normal
severity: normal
status: open
title: OS X test for Tk availability in runtktests.py doesn't work
versions: Python 2.7
Added file: http://bugs.python.org/file29510/tk-cond.diff

___
Python tracker 

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



[issue16475] Support object instancing and recursion in marshal

2013-03-20 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

This should not have happened and it was indeed all tested. I'll investigate 
why these errors are happening.

--

___
Python tracker 

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



[issue5713] smtplib gets out of sync if server returns a 421 status

2013-03-20 Thread R. David Murray

R. David Murray added the comment:

I think this should be considered a bug fix.  While it is true that we are 
handling something that is a "more advanced" feature of the smpt protocl than 
what we are (currently) formally supporting in the module, the reality is that 
if one uses smtplib to communicate with a foreign mail server, you currently 
get unhandleable errors even if the library sticks to the currently supported 
RFC level.  I think that the fact that smtplib does the wrong then when it 
receives an unexpected error code followed by a connection close is a bug in 
smtplib regardless of what RFC level we are talking about.

In fact, this is one instance of a larger problem.  I have also seen a server 
that returns a 451 error code at the end of a data command *and then 
disconnects*.  I think that is out of spec even with the newer RFCs, but it is 
something that happens in the real world and so we should handle it.

The general problem in smtplib is that it does an rset on error, and if the 
other end has closed the connection, the rset raises a ServerDisconnectedError, 
masking the error code that the server actually reported.  This also should be 
fixed.

Clearly for 421 we should be doing a close and not an rset, and I think we may 
as well go ahead and do that even if we haven't upgraded the library to fully 
comply with the newer RFC yet, especially since we've got a patch here.  It is 
not a publicly visible API change, so I don't think the "new feature" rule 
needs to be applied strictly.  Correctly handling the case of rset finding the 
socket already closed would also have fixed this bug, and we should make that 
fix as well, since it seems that servers may unexpectedly close the connection 
after any error.

--
components: +email
nosy: +r.david.murray
versions: +Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue5051] test_update2 in test_os.py invalid due to os.environ.clear() followed by reliance on environ COMSPEC

2013-03-20 Thread Roumen Petrov

Roumen Petrov added the comment:

Hi Ned,

> Ned Jackson Lovely added the comment:
[SNIP]
> In both cases, the currently running python executable, fetched via 
> sys.executable and run using os.popen, is used to print the value, instead of 
> the shell's echo. This moves things closer towards cross-platform niceness, 
> and removes the dependency on /bin/sh.
>
> Unfortunately, I don't have a Windows machine readily available to test this 
> on. Could apply your preferred patch, run it for me, and let me know if you 
> have any problems?

$ uname -a
MINGW32_NT-5.1 QEMU 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 Msys
---
Python 3.4.0a0 (default, Mar 20 2013, 00:32:43)
[GCC 4.7.2] on win32
---
$ cat ...test_os.py

 # Bug 1110478
 def test_update2(self):
 minimal_environ_keys = ('COMSPEC', 'PATH',)
 minimal_environ = {k:os.environ[k] for k in minimal_environ_keys
 if k in os.environ}
 os.environ.clear()
 os.environ.update(HELLO="World")
 minimal_environ['HELLO'] = "World"
 os.environ.update(minimal_environ)
 python_cmd = "{0} -c \"import os;print(os.environ['HELLO'])\""
 with os.popen(python_cmd.format(sys.executable)) as popen:
 value = popen.read().strip()
 self.assertEqual(value, "World")

 # Bug 1110478
 def test_update3(self):
 self.assertTrue('HELLO' not in os.environ)
 os.environ.update(HELLO="World")
 python_cmd = "{0} -c \"import os;print(os.environ['HELLO'])\""
 with os.popen(python_cmd.format(sys.executable)) as popen:
 value = popen.read().strip()
 self.assertEqual(value, "World")

 @unittest.skipUnless(os.path.exists('/bin/sh'), 'requires /bin/sh')
 def test_os_popen_iter(self):
 with os.popen(
 "/bin/sh -c 'echo \"line1\nline2\nline3\"'") as popen:
 it = iter(popen)
 self.assertEqual(next(it), "line1\n")
 self.assertEqual(next(it), "line2\n")
 self.assertEqual(next(it), "line3\n")
 self.assertRaises(StopIteration, next, it)


result:

test_update (test.test_os.EnvironTests) ... ok
test_update2 (test.test_os.EnvironTests) ... ok
test_update3 (test.test_os.EnvironTests) ... ok
test_values (test.test_os.EnvironTests) ... ok


So with both (take2&take3) updates tests pass. Should work with MSVC builds.

May be test_os_popen_iter could be updated .

> Regards,
>
> Ned

--
nosy: +rpetrov

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-03-20 Thread R. David Murray

R. David Murray added the comment:

Having looked at the current handling of the data attribute in the context of 
another issue, I am now inclined to agree with you that full_url should be 
updated in order to have the API have a consistent behavior.  Although it isn't 
backward incompatible API wise, it is possible for existing code to depend on 
the other values *not* being recomputed (presumably unintentionally, since that 
would be a rather odd thing to do :), so I still think the change should only 
be made in 3.4.  I'm open to argument on that, though.

--

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-03-20 Thread R. David Murray

R. David Murray added the comment:

Oh, data being a property is 3.4 only.  So if consistency is the goal, this 
should definately be a 3.4 only change.

--

___
Python tracker 

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



[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-20 Thread karl

karl added the comment:

First, Sanity check for myself to be sure to understand.
==
→ python3.3
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib.request
>>> req = urllib.request.Request('http://www.python.org/')
>>> req.headers
{}
>>> req.unredirected_hdrs
{}
>>> r = urllib.request.urlopen(req)
>>> req.headers
{}
>>> req.unredirected_hdrs
{'User-agent': 'Python-urllib/3.3', 'Host': 'www.python.org'}
>>> req.header_items()
[('User-agent', 'Python-urllib/3.3'), ('Host', 'www.python.org')]
>>> req.has_header('host')
False
>>> req.has_header('Host')
True
>>> req.get_header('host')
>>> req.get_header('Host')
'www.python.org'
>>> 'host' in req.unredirected_hdrs
False
>>> 'Host' in req.unredirected_hdrs
True
>>> 'host' in req.header_items()
False
>>> 'Host' in req.header_items()
False
>>> req.unredirected_hdrs.items()
dict_items([('User-agent', 'Python-urllib/3.3'), ('Host', 'www.python.org')])
>>> req.headers.get('Host', req.unredirected_hdrs.get('Host',None))
'www.python.org'
>>> req.headers.get('Host')
>>> req.headers.get('host'.capitalize(), 
>>> req.unredirected_hdrs.get('host'.capitalize(),None))
'www.python.org'
>>> req.headers.get('HOST'.capitalize(), 
>>> req.unredirected_hdrs.get('HOST'.capitalize(),None))
'www.python.org'
>>> req.headers.get('host'.title(), 
>>> req.unredirected_hdrs.get('host'.title(),None))
'www.python.org'
>>> 'host'.capitalize() in req.unredirected_hdrs
True
==

OK. The two add methods force the capitalization thought capitalize() (And not 
title() which is an issue by itself)

http://hg.python.org/cpython/file/3.3/Lib/urllib/request.py#l359

def add_header(self, key, val):
# useful for something like authentication
self.headers[key.capitalize()] = val

def add_unredirected_header(self, key, val):
# will not be added to a redirected request
self.unredirected_hdrs[key.capitalize()] = val


HTTP headers are case insensitive. The way the methods get_header() and 
has_header() are currently designed. We could also capitalize the variable 
before requesting it.


So something like 

def get_header(self, header_name, default=None):
return self.headers.get(
header_name.capitalize(),
self.unredirected_hdrs.get(header_name.capitalize(), default))


def has_header(self, header_name):
return (header_name.capitalize() in self.headers or
header_name.capitalize() in self.unredirected_hdrs)

The method to add headers on request is 

>>> req.add_header("foo-bar","booh")
>>> req.headers
{'Foo-bar': 'booh'}
>>> req.unredirected_hdrs
{'User-agent': 'Python-urllib/3.3', 'Host': 'www.python.org'}
>>> req.header_items()
[('Foo-bar', 'booh'), ('User-agent', 'Python-urllib/3.3'), ('Host', 
'www.python.org')]


So if someone add an header it will be capitalized. And the query will be 
correct.

The issue is more with addheader which doesn't have the same constraint.
http://hg.python.org/cpython/file/3.3/Lib/urllib/request.py#l1624

Personally I would have made everything case insensitive ;)

Also note that in this module the casing is not consistent when the values are 
hardcoded. Sometimes Content-Type, sometimes Content-type.

Anyway I submitted a patch with the code modification AND the test. And this is 
the result when running the test suite.

→ ./python.exe Lib/test/test_urllib2net.py 
test_sni (__main__.HTTPSTests) ... skipped 'test disabled - test server needed'
test_custom_headers (__main__.OtherNetworkTests) ... ok
test_file (__main__.OtherNetworkTests) ... ok
test_ftp (__main__.OtherNetworkTests) ... ok
test_headers_case_sensitivity (__main__.OtherNetworkTests) ... ok
test_sites_no_connection_close (__main__.OtherNetworkTests) ... 
/Users/karl/Documents/2011/cpython/Lib/socket.py:370: ResourceWarning: unclosed 

  self._sock = None
ok
test_urlwithfrag (__main__.OtherNetworkTests) ... ok
test_close (__main__.CloseSocketTest) ... ok
test_ftp_basic (__main__.TimeoutTest) ... ok
test_ftp_default_timeout (__main__.TimeoutTest) ... ok
test_ftp_no_timeout (__main__.TimeoutTest) ... ok
test_ftp_timeout (__main__.TimeoutTest) ... ok
test_http_basic (__main__.TimeoutTest) ... ok
test_http_default_timeout (__main__.TimeoutTest) ... ok
test_http_no_timeout (__main__.TimeoutTest) ... ok
test_http_timeout (__main__.TimeoutTest) ... ok

--
Ran 16 tests in 15.259s

OK (skipped=1)
[137983 refs]

--
Added file: http://bugs.python.org/file29511/issue-5550-2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.pyth

[issue16754] Incorrect shared library extension on linux

2013-03-20 Thread Sean Reifschneider

Sean Reifschneider added the comment:

Toshio and Matthias: This approach seems sane to me, Nick asked me to review 
this ticket.  I'm not coming up with any objections.  +1 for retiring SO at 
some point after 3.2, and EXT_SUFFIX and SHLIB_SUFFIX.

What documentation needs to be changed?  PEP 3149 (maybe just reference this 
being obsolete)?  What other documentation?

--
nosy: +jafo

___
Python tracker 

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



[issue17497] Unicode support for HTTP headers in http.client

2013-03-20 Thread Matt Tierney

New submission from Matt Tierney:

Changed the headers string charset to utf-8 since a header field may contain 
non-iso-8859-1 characters. For instance, a Location header field may contain 
Cyrillic characters.

--
components: Library (Lib)
files: tierney.patch
keywords: patch
messages: 184792
nosy: tierney
priority: normal
severity: normal
status: open
title: Unicode support for HTTP headers in http.client
type: enhancement
versions: Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file29512/tierney.patch

___
Python tracker 

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



[issue17498] error responses from server are masked in smtplib when server closes connection

2013-03-20 Thread R. David Murray

New submission from R. David Murray:

If an SMTP server returns an error code and then closes the connection, smtplib 
will attempt to send an RSET command, which will then raise a socket error, 
which smtplib turns into a ServerDisconnectedError, thereby loosing the 
information about what error code the server actually returned.  While (except 
for code 421, as noted in issue 5713) a server doing this is technically out of 
spec with the RFC, it is a reality of the internet that it happens, and smtplib 
should handle it correctly.
  
Since the RSET is just to get the protocol back to a known starting state after 
an error, I believe the fix is to have an internal _rset method that wraps the 
RSET call in a try/except and just ignores any ServerDiscoonected error.  The 
library would then call this internally instead of the public API method.  If 
the library client continues on after the error code it gets back from calling 
an smtplib method that results in the server closing the connection, it will 
get the ServerDisconnected error the next time it tries to send a command to 
the server.  Thus the behavior change introduced here is just to allow commands 
that end with server disconnects to return an error code instead of an 
(otherwise mysterious and quite possibly currently-mishandled) 
ServerDisconnected error.  Since any existing code will already need to handle 
errors from commands sent to servers that *don't* disconnect, I believe that 
this is a safe fix from a backward compatibility standpoint.

--
messages: 184793
nosy: r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: error responses from server are masked in smtplib when server closes 
connection
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue17498] error responses from server are masked in smtplib when server closes connection

2013-03-20 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +kushaldas

___
Python tracker 

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



[issue5713] smtplib gets out of sync if server returns a 421 status

2013-03-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Given that David is usually more conservative about calling things bugs than I 
am, knows more about this subject than me, and has explained that the change 
will make smptlib act more sanely in the face of external errors, I am 
reversing myself and agreeing with him.

The patch seems to tighten the test in a way relevant to the code change.

I see that there are several open smptlib issues.
Should we open one for 'update to rfc 5321'?
Does the absence of 'obsoleted by' (or similar) mean that it is still the 
latest?

--
stage: test needed -> patch review
type: enhancement -> behavior

___
Python tracker 

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



[issue2623] Patch: xmlrpclib client ignores datetime tzinfo when creating iso8601 dates

2013-03-20 Thread Thomas Fenzl

Thomas Fenzl added the comment:

Is this still relevant?
The new xmlrcp.client still dumps both naive and aware datetimes as ISO 8601 
strings without timezone information. xmlrpc.client.DateTime does not handle 
ISO 8601 with timezone information. 

So if it is, it could be updated to using strings without timezone for naive 
datetimes and with timezone for aware. Not sure if that could break clients 
parsing the xml themselves.

--
nosy: +Thomas Fenzl

___
Python tracker 

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



[issue17499] inspect.Signature and inspect.Parameter objects are mutable

2013-03-20 Thread Larry Hastings

New submission from Larry Hastings:

The documentation for Inspect.Signature and Inspect.Parameter states that the 
objects are immutable.  And they go to great lengths to provide a convenient 
interface allowing you to "replace" members.

However, the objects make only a pathetic effort at being immutable.  They hide 
their public API members (e.g. "name") behind a property, which they store 
internally in a member prefixed with an underscore (e.g. "_name").  BUT THE 
INTERNAL MEMBER IS EXTERNALLY MUTABLE.

Example code:

>>> def foo(i=3): pass
>>> sig = inspect.signature(foo)
>>> str(sig)
'(i=3)'
>>> sig.parameters['i']._name ='silly'
>>> str(sig)
'(silly3)'

--
components: Library (Lib)
messages: 184796
nosy: brett.cannon, larry
priority: low
severity: normal
stage: test needed
status: open
title: inspect.Signature and inspect.Parameter objects are mutable
type: behavior
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue1003195] segfault when running smtplib example

2013-03-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The original poster's links are dead. Without a reproducible problem with a 
current release, there is nothing we can do. Anyone who can provide such and 
will respond to requests for more information can reopen.

Note:
On Win 7 with 3.2, 3.3, current example exits on line
server = smtplib.SMTP('localhost')
with
socket.error: [Errno 10061] No connection could be made because the target 
machine actively refused it

--
nosy: +terry.reedy
resolution:  -> wont fix
stage:  -> test needed
status: open -> closed

___
Python tracker 

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



[issue17499] inspect.Signature and inspect.Parameter objects are mutable

2013-03-20 Thread Brett Cannon

Brett Cannon added the comment:

So what do you propose as a solution? Do you want to subclass tuple and then 
override __getitem__() so they can't index into the underlying tuple? Use 
__mangled names?

I mean if people are going to break the API to muck with stuff we can't stop 
them (nor can they complain if their code breaks).

--
versions:  -Python 3.3

___
Python tracker 

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



[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-20 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Karl - a patch is welcome. BTW, I wanted to search for an already existing and 
I think open issue with a patch ( probably written by me) somewhere. We have to 
see what's the diff of that issue with new one. I will share that issue in this 
id. But yeah, this is a good discussion and +1 for this fix.

--

___
Python tracker 

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



[issue17489] random.Random implements __getstate__() and __reduce__()

2013-03-20 Thread Víctor Terrón

Víctor Terrón added the comment:

Ramchandra, that is not the behavior that I am able to reproduce. Please see 
the attached example: in the presence of __reduce__(), __getstate__() is not 
being called whether the class or an instance its pickled. This is also in 
consonance with what is stated in the docs, which warn that "Although powerful, 
implementing __reduce__() directly in your classes is error prone. For this 
reason, class designers should use the high-level interface (i.e., 
__getnewargs__(), __getstate__() and __setstate__()) whenever possible".

--
Added file: http://bugs.python.org/file29513/issue17489_example.py

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2013-03-20 Thread Eric Snow

Eric Snow added the comment:

My current patch ends up with O(n) deletion, which won't fly, so I'm 
refactoring.  While I'm at it I'm also planning on using the BSD queue.h 
doubly-linked list rather than the one that I rolled.  I'm also going to pull 
the ordered dict implementation into it's own source file.  However, these 
things should not have much of an impact on most of the code I've already 
written.  I anticipate that the changes won't translate into a further large 
volume of work.

In talking to Raymond, he emphasized the importance of making sure we avoid 
reentrancy problems.  I'll be double-checking that and likely making use of the 
GIL in a couple spots.

While the bulk of the implementation is complete, the remaining work to do here 
is what I've described above, along with more testing.  An orthogonal problem 
is addressing the problem of the concrete dict API.  I'll bring that up 
separately when this issue is basically done.

--

___
Python tracker 

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



[issue5713] smtplib gets out of sync if server returns a 421 status

2013-03-20 Thread R. David Murray

R. David Murray added the comment:

Sure, a new issue for making sure smtplib conforms to 5321 would be good (we 
already did it for smptd; hopefully we didn't miss anything).

For the moment 5321 is the standard.  There's a new one coming, where utf-8 
will be allowed, but we're not quite ready to tackle that yet (soon, though, 
hopefully).

--

___
Python tracker 

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



[issue17497] Unicode support for HTTP headers in http.client

2013-03-20 Thread R. David Murray

R. David Murray added the comment:

My understanding is that iso-8859-1 is the standard, and really means "binary". 
 Turning it into unicode happens later.  See the WSGI PEPs for more information.

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

___
Python tracker 

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



[issue17499] inspect.Signature and inspect.Parameter objects are mutable

2013-03-20 Thread R. David Murray

R. David Murray added the comment:

"BUT THE INTERNAL MEMBER IS EXTERNALLY MUTABLE."

Your point being?  This is Python, the consenting adults language :).

--
nosy: +r.david.murray
resolution:  -> invalid
stage: test needed -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue16754] Incorrect shared library extension on linux

2013-03-20 Thread Matthias Klose

Matthias Klose added the comment:

proposed PEP change. Or should the change itself be documented in the PEP?

--

___
Python tracker 

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



[issue16754] Incorrect shared library extension on linux

2013-03-20 Thread Matthias Klose

Changes by Matthias Klose :


Added file: http://bugs.python.org/file29514/pep.diff

___
Python tracker 

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



[issue15013] smtplib: add low-level APIs to doc?

2013-03-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

By current standards, we normally document all public methods. 

.rset() and .noop() are trivial, "same as .docmd('funcname')"

.help() is almost trivial, just removing the first field of the reply (I assume 
a return code). 'returns message part of .putcmd('help')"

.mail(s, options) and .rcpt(r, options) are not so trivial. Explaining the 
possible options, I presume defined in the rfcs and used elsewhere by other 
methods, seems beyond the scope of the docs. "Open mail session; for *options* 
list, see RFCs" might be a possible entry.

.data(msg) also seems complicated in its details. I can see why the author left 
out such minutia for something that normally should not be called. I would be 
inclined to just say "Send message to server; see docstring for details."

--
nosy: +terry.reedy

___
Python tracker 

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



[issue12455] urllib2 forces title() on header names, breaking some requests

2013-03-20 Thread karl

karl added the comment:

terry.reedy:


You said: "and that has_header and get_header *require* the .capitalize() form 
and reject the .title() form."

I made a patch for these two. 
See http://bugs.python.org/issue5550

--

___
Python tracker 

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



[issue17150] pprint could use line continuation for long string literals

2013-03-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a new patch with more tests and updated docs.

--
Added file: http://bugs.python.org/file29515/str_pprint2.patch

___
Python tracker 

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



[issue16475] Support object instancing and recursion in marshal

2013-03-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f4c21179690b by Kristján Valur Jónsson in branch 'default':
Issue #16475: Simplify the interface to r_ref_allocate and improve comments.
http://hg.python.org/cpython/rev/f4c21179690b

New changeset 42bf74b90626 by Kristján Valur Jónsson in branch 'default':
Issue #16475 : Correctly handle the EOF when reading marshal streams.
http://hg.python.org/cpython/rev/42bf74b90626

--

___
Python tracker 

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



[issue16754] Incorrect shared library extension on linux

2013-03-20 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue17498] error responses from server are masked in smtplib when server closes connection

2013-03-20 Thread Kushal Das

Kushal Das added the comment:

Working on a patch for this.

--

___
Python tracker 

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



[issue17500] move PC/icons/source.xar to http://www.python.org/community/logos/

2013-03-20 Thread Matthias Klose

New submission from Matthias Klose:

This is a proposal to move the PC/icons/source.xar from the core distribution 
to the python website. Afaics currently the derived file PC/icons/baselogo is 
only used, and http://www.python.org/community/logos/ has even other 
recommended svg files for the logo.

The logo files were added in issue1490384, and source.xar explained 
(http://bugs.python.org/issue1490384#msg50276) as:

   > source.xar; not sure either

   This is the primary vector graphics source of the icons -
   the other SVG and PNG files are just there because other
   people requested them.

   It's in Xara format, a previously proprietary graphics
   application which has now gone open-source and is heading
   rapidly towards being usable on Linux, but isn't quite there
   yet.

However Xara was never open-source and shipped with pre-built binaries afaicr, 
and today you can't download even that anymore. Besides not being used for the 
(windows) build, Debian cannot even distribute this file, because it cannot be 
modified in it's current form with free software, and therefore has to be 
removed for the upstream tarball for each Debian upload.  So it would help 
Debian to ship the unmodified upstream tarball.

The source.xar could be kept available on the python website together with the 
other logo files.

--
assignee: doko
messages: 184811
nosy: doko, loewis
priority: normal
severity: normal
status: open
title: move PC/icons/source.xar to http://www.python.org/community/logos/
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2013-03-20 Thread emmanuel

emmanuel added the comment:

Kevin,
I've read more carefully your messages and investigated some more.
It seems that there are several issues:
1/ To take input from a defined tty without interfering with standard file 
descriptors
2/ To have the result (object) of evaluation printed to a defined tty without 
interfering with standard file descriptors
3/ (optionally) To direct to the tty (or not) the output that is a side effect 
of the evaluation
Provided that no one messes with PyOS_ReadlineFunctionPointer (as with "import 
readline") it should be possible to solve 1 without modifying Python, and 
"approximately" solve 2 (with 3 implied out of necessity).
On the other hand, modifying Python as you suggest could solve 1, but issues 2 
and 3 would still remain and probably require some other modifications.

--

___
Python tracker 

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



[issue9506] sqlite3 mogrify - return query string

2013-03-20 Thread Sanjeev Paskaradevan

Sanjeev Paskaradevan added the comment:

An implementation of mogrify for pysqlite will necessarily be different from 
the Psycopg2 implementation because of the way queries are executed in Psycopg2 
vs. pysqlite.

In Pyscopg2 the arguments are bound into the query using mogrify and then 
executed using PQExec or PQsendQuery.

Whereas the pysqlite implementation uses sqlite3 prepared statements to bind 
the parameters using the interfaces defined here: 
http://www.sqlite.org/c3ref/bind_blob.html

As such, the pysqlite implementation never holds a "complete" sql statement 
with substituted parameters, as well, the sqlite3 C interfaces do not provide a 
way to retrive the complete statement.

We can implement a 'mogrify' method for pysqlite but by necessity it would not 
be "exactly" the same as the psycopg2 implementation.  For one thing the string 
thus generated would not be the statement that is sent to sqlite3.

Should we implement a mogrify anyway?

--
nosy: +Sanjeev

___
Python tracker 

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



[issue17499] inspect.Signature and inspect.Parameter objects are mutable

2013-03-20 Thread Larry Hastings

Larry Hastings added the comment:

Yes, it seems I've been living in a fool's paradise, happy and ignorant.  I 
thought that the behavior of garden-variety "immutable" objects was like tuple, 
where the implementor shored up the interface and the saboteur had to work 
*really* hard to modify the contents.  But apparently most immutable objects 
are more like Signature, where we tape up a hand-written sign saying "Plase 
Dont Chagne Anyting Wiht A Underbar In Frunt Kthxbai".

At least it's not hashable!

(Sorry for the noise.)

--
status: pending -> closed

___
Python tracker 

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



[issue17501] cannot create a raw string ending in backslash

2013-03-20 Thread Thomas Fenzl

New submission from Thomas Fenzl:

r'\' and r"\" cannot be parsed, because the backslash escapes the quotation 
ending the string, leading to a syntax error

--
messages: 184815
nosy: Thomas Fenzl
priority: normal
severity: normal
status: open
title: cannot create a raw string ending in backslash
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue17501] cannot create a raw string ending in backslash

2013-03-20 Thread STINNER Victor

STINNER Victor added the comment:

Correct, but it's easy to work around this issue. For example:

>>> print(r"a" "\\")
a\

--
nosy: +haypo

___
Python tracker 

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



[issue17501] cannot create a raw string ending in backslash

2013-03-20 Thread Thomas Fenzl

Thomas Fenzl added the comment:

right, and I only just saw it's documented

--

___
Python tracker 

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



[issue17501] cannot create a raw string ending in backslash

2013-03-20 Thread Thomas Fenzl

Changes by Thomas Fenzl :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue17501] cannot create a raw string ending in backslash

2013-03-20 Thread STINNER Victor

STINNER Victor added the comment:

This is part of the Python language (syntax). If the workaround is documented, 
we cannot do anything else, so I'm closing the issue.

--

___
Python tracker 

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



[issue5609] Create Unit Tests for nturl2path module

2013-03-20 Thread Thomas Fenzl

Thomas Fenzl added the comment:

The tests work on linux, so I removed the check for nt. 
Also I adapted them to the latest implementation using ':' instead of '|' as 
drive letter separator.

--
keywords: +patch
nosy: +Thomas Fenzl
Added file: http://bugs.python.org/file29516/test_urllib.diff

___
Python tracker 

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



[issue16310] zipfile: allow surrogates in filenames

2013-03-20 Thread Toshio Kuratomi

Toshio Kuratomi added the comment:

Okay, here's the first version of a patch to add surrogate support to a 
zipfile.  I think it's the minimum required to fix this bug.

When archiving, if a filename contains surrogateescape'd bytes, it switches to 
cp437 when it saves the filename into the zipfile.  This seems to be the 
strategy of other zip tools.  Nothing changes when unarchiving (probably to 
deal with what comes out of other tools).

The documentation is also updated to mention that unknown encodings are a 
problem that the zipfile module doesn't handle automatically for you.

I think we could do better but this is a major improvement over the status quo 
(no tracebacks).  Would someone care to review this for merge and then we could 
work on adding some notion of a user-specified encoding to override cp437 
encoding on dearchiving.  (which I think would satisfy:  issue10614, 
issue10972).

The use case in issue10757 might be fixed by this patch (or this patch plus the 
user specified encoding).  Have to look a little harder at it.

--
keywords: +patch
Added file: http://bugs.python.org/file29517/python3-zipfile-surrogate.patch

___
Python tracker 

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



[issue5713] smtplib gets out of sync if server returns a 421 status

2013-03-20 Thread R. David Murray

R. David Murray added the comment:

I had to rewrite the tests for 3.2, and I added tests to test all three cases 
where 421 is returned.  I'm in the process of merging this, but I'll upload the 
patch so that Kushal can see the test structure for the followon patch.

--
Added file: http://bugs.python.org/file29518/smtp421.patch

___
Python tracker 

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



[issue13234] os.listdir breaks with literal paths

2013-03-20 Thread Santoso Wijaya

Santoso Wijaya added the comment:

Done.

--

___
Python tracker 

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



[issue5713] smtplib gets out of sync if server returns a 421 status

2013-03-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bc538bc8e65d by R David Murray in branch '3.2':
#5713: Handle 421 error codes during sendmail by closing the socket.
http://hg.python.org/cpython/rev/bc538bc8e65d

New changeset cf5c40025af2 by R David Murray in branch '3.3':
Merge: #5713: Handle 421 error codes during sendmail by closing the socket.
http://hg.python.org/cpython/rev/cf5c40025af2

New changeset ce4154268c47 by R David Murray in branch 'default':
Merge: #5713: Handle 421 error codes during sendmail by closing the socket.
http://hg.python.org/cpython/rev/ce4154268c47

--
nosy: +python-dev

___
Python tracker 

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



[issue2786] Names in traceback should have class names, if they're methods

2013-03-20 Thread Illia Polosukhin

Illia Polosukhin added the comment:

The issue is not that easy to address - because PyFunctionObject is not 
available from PyEval_EvalCodeEx.

Another note, is that the issue of reporting only function name without class 
name is observed in many places, not just for example above.

Still, will try to make a patch that will address the issue.

--

___
Python tracker 

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



[issue1747670] Limiting data copy in xmlrpclib

2013-03-20 Thread Thomas Fenzl

Thomas Fenzl added the comment:

Adapted the patch to python3.3
It may be useful with large amounts of transfered data avoiding a copy and 
freeing memory earlier.
The functionality is tested with the existing unit tests.

--
nosy: +Thomas Fenzl
versions: +Python 3.4 -Python 2.7
Added file: http://bugs.python.org/file29519/xmlrpc_less_copy.diff

___
Python tracker 

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



[issue17490] Use converter functions to implement ast.literal_eval

2013-03-20 Thread Nick Coghlan

Nick Coghlan added the comment:

Updated patch attached. The complexity grew a bit, as it turned out to be 
useful for the converter functions to be able to tell the difference between 
top level conversions and recursive invocations. I also realised that:

- the complex number conversion currently allows arbitrarily deep nesting of 
addition and subtraction
- handling this properly made an exception based "Failed to convert" API far 
more sensible

The docstrings are updated, but ast.convert_node is tested only indirectly 
through the ast.literal_eval tests and the main docs haven't been updated at 
all.

At this point, I'm most interested in feedback from Larry as to whether or not 
this is helpful to him in implementing argument clinic.

--
Added file: 
http://bugs.python.org/file29520/issue17490_ast_literal_eval_converters.diff

___
Python tracker 

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



[issue17490] Use converter functions to implement ast.literal_eval

2013-03-20 Thread Nick Coghlan

Changes by Nick Coghlan :


Removed file: 
http://bugs.python.org/file29496/ast_literal_eval_converter_functions.diff

___
Python tracker 

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



[issue17490] Use converter functions to implement ast.literal_eval

2013-03-20 Thread Nick Coghlan

Nick Coghlan added the comment:

Now that I've actually implemented it, I'm fairly sure it's not a good idea. It 
might be better if we remove the recursive behaviour.

As it is, Larry's fairly happy with what he is already doing (calling ast.parse 
and walking the tree) and I think that's actually simpler than using this API 
would be.

--

___
Python tracker 

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



[issue5713] smtplib gets out of sync if server returns a 421 status

2013-03-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fbf54209de75 by R David Murray in branch '3.2':
#5713: fix timing issue in smtplib tests.
http://hg.python.org/cpython/rev/fbf54209de75

New changeset 0de74602692f by R David Murray in branch '3.3':
Merge: #5713: fix timing issue in smtplib tests.
http://hg.python.org/cpython/rev/0de74602692f

New changeset 6dc948e4ea8f by R David Murray in branch 'default':
Merge: #5713: fix timing issue in smtplib tests.
http://hg.python.org/cpython/rev/6dc948e4ea8f

--

___
Python tracker 

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



[issue17498] error responses from server are masked in smtplib when server closes connection

2013-03-20 Thread Kushal Das

Kushal Das added the comment:

The following patch adds a _rset method which catches any 
SMTPServerDisconnected exception, also includes the corresponding test and 
test_421_from_mail_cmd assert statement typo fix.

--
keywords: +patch
Added file: http://bugs.python.org/file29521/issue17498.patch

___
Python tracker 

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



[issue1154351] add get_current_dir_name() to os module

2013-03-20 Thread Marc Adam Anderson

Marc Adam Anderson added the comment:

This enhancement has been implemented. The code is based on hoffman's code. 
Tests for this enhancement, as well as tests for os.getcwd() have also been 
added. The docs have been updated and tested locally.

--
keywords: +patch
nosy: +marcadam
Added file: http://bugs.python.org/file29522/get_current_dir_name.patch

___
Python tracker 

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



[issue5712] tkinter - askopenfilenames returns string instead of tuple in windows 2.6.1 release

2013-03-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2ce557101136 by R David Murray in branch '3.2':
#5712: Preemptively fix some other possible timing issues.
http://hg.python.org/cpython/rev/2ce557101136

New changeset c412ca9aa915 by R David Murray in branch '3.3':
Merge: #5712: Preemptively fix some other possible timing issues.
http://hg.python.org/cpython/rev/c412ca9aa915

New changeset 5b0669ff19c5 by R David Murray in branch 'default':
Merge: #5712: Preemptively fix some other possible timing issues.
http://hg.python.org/cpython/rev/5b0669ff19c5

--
nosy: +python-dev

___
Python tracker 

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



[issue5712] tkinter - askopenfilenames returns string instead of tuple in windows 2.6.1 release

2013-03-20 Thread R. David Murray

Changes by R. David Murray :


--
Removed message: http://bugs.python.org/msg184831

___
Python tracker 

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



[issue5713] smtplib gets out of sync if server returns a 421 status

2013-03-20 Thread R. David Murray

R. David Murray added the comment:

Thanks Mark and Kushal.

--
assignee: barry -> 
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions:  -Python 2.7

___
Python tracker 

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



[issue17206] Py_XDECREF() expands its argument multiple times

2013-03-20 Thread Illia Polosukhin

Illia Polosukhin added the comment:

Compiled baseline and patched version with GCC in Ubuntu 12.10 (running in 
VMWare).

Benchmarking results are attached:
./perf.py -b 2n3 -f ../cpython/baseline/python ../cpython/experiment/python | 
tee perf-linux.log

--
Added file: http://bugs.python.org/file29523/perf-linux.log

___
Python tracker 

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



[issue17206] Py_XDECREF() expands its argument multiple times

2013-03-20 Thread Illia Polosukhin

Illia Polosukhin added the comment:

Additionally, disassembled ceval.o and compared baseline with experiment (with 
applied patch): no actual differences found.

Attached archive contains ceval from both baseline and experiment builds:
 - cevalb.cc - processed file of baseline build
 - ceval.cc - processed file of experiment build
diff ceval.cc cevalb.cc - shows differences introduced by patch.
 - cevalb.o - object file of baseline build
 - ceval.o - object file of experiment build
 - cevalb.asm - disassembly of baseline object file
 - ceval.asm - disassembly of experiment object file
diff ceval.asm cevalb.asm - doesn't show any differences in generated assembly 
code.

--
Added file: http://bugs.python.org/file29524/asmdiff_17206.zip

___
Python tracker 

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



  1   2   >