[issue17303] Fix test discovery for test_future*

2013-02-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 83ae10bf608c by Ezio Melotti in branch '3.3':
#17303: test_future* now work with unittest test discovery.  Patch by Zachary 
Ware.
http://hg.python.org/cpython/rev/83ae10bf608c

New changeset 5599bbc275bc by Ezio Melotti in branch 'default':
#17303: merge with 3.3.
http://hg.python.org/cpython/rev/5599bbc275bc

--
nosy: +python-dev

___
Python tracker 

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



[issue17303] Fix test discovery for test_future*

2013-02-27 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!
I also removed a some "from test import support" that were no longer necessary.

test_future files could be reorganized a bit, since they are basically no-ops, 
and they aren't testing much.

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



[issue17304] Fix test discovery for test_hash.py

2013-02-27 Thread Roundup Robot

New submission from Roundup Robot:

New changeset 619ed4ed7087 by Ezio Melotti in branch '3.3':
#17304: test_hash now works with unittest test discovery.  Patch by Zachary 
Ware.
http://hg.python.org/cpython/rev/619ed4ed7087

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

--
nosy: +python-dev

___
Python tracker 

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



[issue17304] Fix test discovery for test_hash.py

2013-02-27 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!
Even here I removed a "from test import support" that was no longer needed.

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



[issue16935] unittest should understand SkipTest at import time during test discovery

2013-02-27 Thread Ezio Melotti

Ezio Melotti added the comment:

LGTM.

--

___
Python tracker 

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



[issue17251] LWPCookieJar load() set domain_specifed wrong

2013-02-27 Thread Maximiliano Curia

Maximiliano Curia added the comment:

I've deleted my previous patch, as I found the code working as intended.

The domain_specified signals whether the domain stores came from a Domain: tag 
inside a Set-Cookie request or is taken from the hostname of the request.

The rfc2965 dictates that a value taken from a Domain: tag should be
prepended with a "." if the values doesn't include it. Once stored in a 
LWPCookieJar the same logic is used to signal if the domain_specified is true 
or false. Thus the observed behaviour.

The LWP-Cookies-2.0 format is an extension to the perl format, that seeks 
compatibility adding some features.

About the domain matching, the rfc2965 documents this. I think the perl comment 
is an example for a.b.c.net, so that matchs with .b.c.net but not with b.c.net.

--

___
Python tracker 

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



[issue17307] HTTP PUT request Example

2013-02-27 Thread Senthil Kumaran

New submission from Senthil Kumaran:

I think an explicit HTTP put request example in the docs may help. Previously, 
I thought the POST example was enough as PUT is very similar, but given the 
folks are looking for it, an example of how to do a PUT request using httplib 
may be helpful.

Here is patch attached for review.

--
assignee: orsenthil
files: http_put_example.patch
keywords: patch
messages: 183124
nosy: ezio.melotti, orsenthil, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: HTTP PUT request Example
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29259/http_put_example.patch

___
Python tracker 

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



[issue17284] create mercurial section in devguide's committing.rst

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> Currently the section covers all the fundamental Mercurial-related operations 
> that a committers needs to know (set up, commit, merge, push), not just 
> committing.

The point of the change in section title is to have a title so non-committers 
know they can skip over the section.  I'm not wedded to the title I initially 
suggested.  "Mercurial Guide for Committers" is another possibility.  Mercurial 
information common to both committers and non-committers can go in a more 
generally titled section like "Working with Mercurial."

--

___
Python tracker 

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



[issue16930] mention limitations and/or alternatives to hg graft

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Why must we mention graft at all?  I've never had a need for it.  It seems 
simpler and just as effective to run `hg import` on the original patch.

I think it's preferable that the steps we recommend to work on all systems.  
Then we won't have to worry about documenting quirks, or responding to e-mails 
or tracker issues saying our recommended steps don't work.

--

___
Python tracker 

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



[issue16931] mention work-around to create diffs in default/non-git mode

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> AFAICT, the recommendation to use hg "git" format is currently only mentioned 
> in the Committing section 
> (http://docs.python.org/devguide/committing.html#minimal-configuration) but 
> not elsewhere, in particular, not http://docs.python.org/devguide/patch.html.

Good observation.  Personally, I think it makes sense to keep Mercurial 
information for both committers and non-committers (like configuring to use the 
"git" format) outside of the Mercurial section specific to committers.  This 
can be in a general Mercurial section before the section specific to 
committers, or else spread throughout (e.g. in the FAQ).

--

___
Python tracker 

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



[issue17284] create mercurial section in devguide's committing.rst

2013-02-27 Thread Ezio Melotti

Ezio Melotti added the comment:

> The point of the change in section title is to have a title so 
> non-committers know they can skip over the section.

In the first part of committing.rst there are also things for committers only, 
and some of the content of the "working with mercurial" might be interesting 
for non committers too.

We could add a note at the beginning of the page that says that this page is 
mainly intended for committers, and that contributors can skip it or just skim 
through it.

I also wonder if we should make the distinction between committers and 
contributors docs more evident, but in any case there's going to be
some overlapping.

--

___
Python tracker 

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



[issue16113] Add SHA-3 (Keccak) support

2013-02-27 Thread Ulrik Sverdrup

Ulrik Sverdrup added the comment:

Please do not go forward until NIST publishes its SHA-3 specification document. 
We don't know yet what parameters they will finally choose when making Keccak 
SHA-3.

--
nosy: +englabenny

___
Python tracker 

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



[issue15465] Improved documentation for C API version info

2013-02-27 Thread Kushal Das

Kushal Das added the comment:

Adding the updated patch with changes as suggested in the review

--
Added file: http://bugs.python.org/file29260/issue15465v2.patch

___
Python tracker 

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



[issue17284] create mercurial section in devguide's committing.rst

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I think making the sections more focused helps because sections are the 
linkable units, and sections can be freely moved around once they are more 
stand-alone (e.g. into or out of the FAQ).

In issue 16931 in response to Ned, I suggested adding a general Mercurial 
section before the Mercurial section specific to committers.  I can propose a 
patch.

--

___
Python tracker 

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



[issue17267] datetime.time support for '+' and 'now'

2013-02-27 Thread jbatista

jbatista added the comment:

IMHO this should be "safe" when the timezone is UTC for example, where there is 
no problems with daylight savings. What should be the behavior when adding a 
certain timedelta() and it crosses a date where there is an hour switch due to 
daylight savings? The unadvised would get incorrect results.

--
nosy: +jbatista

___
Python tracker 

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



[issue17284] create mercurial section in devguide's committing.rst

2013-02-27 Thread Ezio Melotti

Ezio Melotti added the comment:

The problem with that is that you have to navigate through different 
links/pages/sections though (see also msg182645).

--

___
Python tracker 

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



[issue16930] mention limitations and/or alternatives to hg graft

2013-02-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Why must we mention graft at all?  I've never had a need for it.  It
> seems simpler and just as effective to run `hg import` on the
> original patch.

`hg graft` actually works in some cases where `hg import` will fail,
because grafting uses the merge logic (so, for example, it is able to
recognize that some files were renamed between branches).

--

___
Python tracker 

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



[issue17302] HTTP/2.0 - Implementations/Testing efforts

2013-02-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> agreed on HTTP/1.1, is there a plan to fix it too ;) because the
> current http.server seems to be untouchable without breaking stuff
> all around :)

The way to do it without breaking compatibility would be to write a new
handler, see my platonic proposal at
http://mail.python.org/pipermail/python-dev/2012-September/121806.html

--

___
Python tracker 

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



[issue16930] mention limitations and/or alternatives to hg graft

2013-02-27 Thread Ezio Melotti

Ezio Melotti added the comment:

Also I often made changes on the patch I imported and applied on 2.7 (e.g. 
update Misc/NEWS).  Reimporting the patch means that I would have to do it 
again, and both "hg import --no-c url_of_the patch" and "hg export 2.7 | hg 
import -" are more complicated than "hg graft 2.7".

--

___
Python tracker 

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



[issue17267] datetime.time support for '+' and 'now'

2013-02-27 Thread Ronald Oussoren

Ronald Oussoren added the comment:

datetime.time arithmetic cannot be timezone aware, as there is no associated 
date and hence you cannot possibly know if there it a DST transition.

I don't think this is a problem. Adding/removing time to a clock value has 
clear real-world semantics. Using the (naive) real world semantics is the best 
we can do and should generally give the expected answer.

As to cross-timezone comparisons: 

   time(0, tzinfo=est) - timedelta(hours=1) * 5 == time(0, tzinfo=utc)

fails because the LHS of '==' is a time in a different timezone than the value 
on the RHS. That's expected and correct.

--

___
Python tracker 

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



[issue17267] datetime.time support for '+' and 'now'

2013-02-27 Thread Petri Lehtinen

Petri Lehtinen added the comment:

A time object isn't associated with any date, so I don't really see a
problem here. The fact that you can shoot yourself in the leg can be
documented, noting that you should use datetime instead.

ISTM the reason why time objects even have an associated timezone is
to support easy calculations between times in different timezones.

--

___
Python tracker 

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



[issue16930] mention limitations and/or alternatives to hg graft

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

If you start with a patch against 3.x, which is the normal case, why go to the 
trouble of grafting from the patch modified for 2.7?  It seems you're just 
creating more trouble for yourself (introducing more conflicts you have to 
resolve, etc) when you already have a patch that is known to apply cleanly to 
3.x.

--

___
Python tracker 

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



[issue16930] mention limitations and/or alternatives to hg graft

2013-02-27 Thread Ezio Melotti

Ezio Melotti added the comment:

Because if the graft succeeds "hg graft 2.7" does everything (including porting 
extra modifications that I made before committing on 2.7 and the commit on 
3.2), if there are conflicts I just spend a few seconds more in kdiff3 to fix 
them.
Reapplying the patch means that I have to do import + commit at least, and 
possibly reapply manually changes that I've already done on 2.7.
(I'm assuming that the patch is applied on 2.7 and grafted on 3.2, but the 
opposite should also be valid.)

--

___
Python tracker 

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



[issue17302] HTTP/2.0 - Implementations/Testing efforts

2013-02-27 Thread karl

karl added the comment:

Read the thread. Thanks Antoine. Better understanding. I'm still discovering 
how the community is really working.

Trying to fix a few things in the mean time 

http://bugs.python.org/issue12921
http://bugs.python.org/issue747320
http://bugs.python.org/issue11448
http://bugs.python.org/issue7370 (maybe this one is a duplicate of 747320)

This one 
http://bugs.python.org/issue15799
which is still "open", make me thinks, that it might in the new class to have 
things for strict production rules, and some parsing rules with a warning mode, 
if the user cares.

Thanks again for the context Antoine. Maybe we should close this bug as 
postponed?

--

___
Python tracker 

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



[issue17302] HTTP/2.0 - Implementations/Testing efforts

2013-02-27 Thread Christian Heimes

Changes by Christian Heimes :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue16930] mention limitations and/or alternatives to hg graft

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> Reapplying the patch means that I have to do import + commit at least, and 
> possibly reapply manually changes that I've already done on 2.7.

Since 2.7 is more different from 3.2 than is 3.4, it seems more likely that 
grafting from 2.7 to 3.x will result in having to undo 2.7-specific changes 
and/or add back 3.x-specific changes, and even more so when skipping 3.2.

But this is all secondary to my point that we shouldn't include in our basic 
instructions things that we know won't work for some people when there is a 
straightforward alternative (and one that uses no new concepts).  At the very 
least, we should provide a working alternative alongside.

--

___
Python tracker 

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



[issue17299] Test cPickle with real files

2013-02-27 Thread R. David Murray

R. David Murray added the comment:

Serhiy, in Python3 the corresponding test uses io.BytesIO.  That means the 
additional tests are needed on Python3 as well, just a slightly different set, 
right?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue17305] IDNA2008 encoding missing

2013-02-27 Thread Marten Lehmann

Marten Lehmann added the comment:

At least from the GNU people, two separate projects exists for this matter:

libidn, the original IDNA translation (http://www.gnu.org/software/libidn/)
libidn2, the IDNA2008 translation 
(http://www.gnu.org/software/libidn/libidn2/manual/libidn2.html)

Btw.: Does Python provide a way to decode the ASCII-representation back to 
UTF-8?

>>> name.encode('idna')
'xn--mller-kva.com'

>>> name.encode('idna').decode('utf-8')
u'xn--mller-kva.com'

Otherwise I'd look for Python bindings of libidn2 or idnkit-2.

--

___
Python tracker 

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



[issue3588] sysconfig variable LINKFORSHARED has wrong value for MacOS X framework build

2013-02-27 Thread Andrew Jaffe

Andrew Jaffe added the comment:

Was this actually fixed? As per  it affects 
"python-config --ldflags" which is used by various build systems.

--
nosy: +Andrew.Jaffe

___
Python tracker 

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



[issue16848] Mac OS X: python-config --ldflags and location of Python.framework

2013-02-27 Thread Andrew Jaffe

Andrew Jaffe added the comment:

Will this be fixed? I note that the related LINKFORSHARED bug (which causes 
this, I think) is marked as resolved.

--
nosy: +Andrew.Jaffe

___
Python tracker 

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




[issue17305] IDNA2008 encoding missing

2013-02-27 Thread Marten Lehmann

Marten Lehmann added the comment:

For the embedded Python examples, please prepend the following lines:

from __future__ import unicode_literals
name='müller.com'

So regarding interoperability: Usually you only use one implementation in your 
code and hopefully the latest release, but in case someone needs to old one, 
maybe there should be a separate encodings.idna2008 class.

--

___
Python tracker 

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



[issue17307] HTTP PUT request Example

2013-02-27 Thread Ezio Melotti

Ezio Melotti added the comment:

Shouldn't that be done with urllib?

--
components: +Documentation
type:  -> enhancement

___
Python tracker 

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



[issue16848] Mac OS X: python-config --ldflags and location of Python.framework

2013-02-27 Thread Ronald Oussoren

Ronald Oussoren added the comment:

With framework build from yesterday this is not fixed for python 2.7, it prints:

-L/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -ldl 
-framework CoreFoundation -lpython2.7 -u _PyMac_Error 
Python.framework/Versions/2.7/Python

The bit and the end it unwanted:

   -u _PyMac_Error Python.framework/Versions/2.7/Python

The attached patch fixes the issue (I haven't committed yet because I don't 
have time to run the test suite right now). The patch works for me and should 
be fine as it mirrors the solution in the 3.x tree.

BTW. As noted before linking with '-framework Python' is not what you want to 
do, this causes problems when someone installs multiple framework versions: 
'-framework Python' then links to whatever framwork was installed last instead 
of the python version you ran 'python-config' for.

--
keywords: +patch
Added file: http://bugs.python.org/file29261/issue16848.patch

___
Python tracker 

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



[issue17305] IDNA2008 encoding missing

2013-02-27 Thread R. David Murray

R. David Murray added the comment:

Does this mean the differences are only in the canonicalization of unicode 
values?  IDNA is a wire protocol, which means that an application can't know if 
it is being asked to decode an idna1 or idna2 string unless there's something 
in the protocol that tells it.  But if the differences are only on the encoding 
side, and an idna1 decoder will "do the right thing" with the idna2 string, 
then that would be interoperable.  I'll have to read the standard, but I don't 
have time right now :)

idna is a codec:

>>> b'xn--mller-kva.com'.decode('idna')
'müller.com'

(that's python3, it'll be a unicode string in python2, obviously).

--

___
Python tracker 

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



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-27 Thread R. David Murray

R. David Murray added the comment:

I don't have the expertise required to do the 2.7 backport.  My naive attempt 
is attached, but the message attribute is not preserved (test failure).  If 
someone can fix the patch, I'll commit it.

--
keywords: +patch
Added file: http://bugs.python.org/file29262/exception_pickling.patch

___
Python tracker 

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



[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2013-02-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2c9f7ed28384 by R David Murray in branch '3.2':
#17296: backport fix for issue 1692335, naive exception pickling.
http://hg.python.org/cpython/rev/2c9f7ed28384

New changeset 67c27421b00b by R David Murray in branch '3.3':
Null merge for issue 1692335 backport.
http://hg.python.org/cpython/rev/67c27421b00b

New changeset 94f107752e83 by R David Murray in branch 'default':
Null merge for issue 1692335 backport.
http://hg.python.org/cpython/rev/94f107752e83

--

___
Python tracker 

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



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2c9f7ed28384 by R David Murray in branch '3.2':
#17296: backport fix for issue 1692335, naive exception pickling.
http://hg.python.org/cpython/rev/2c9f7ed28384

--

___
Python tracker 

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



[issue17308] Dialog.py crashes when putty Window resized

2013-02-27 Thread Harsha

New submission from Harsha:

Dialog.py crashes when putty windows is resized. 

return simple_menu(d, config, "Select an option:", choices)
  File "/log-root/config-ac", line 499, in simple_menu
code, tag = d.menu(str(text), height=15, width=45, menu_height=min(8, len(SI
MPLE_MENU_CHOICES)), choices=SIMPLE_MENU_CHOICES, **kwargs)
  File "/usr/lib/python2.6/site-packages/dialog.py", line 1253, in menu
(code, output) = self._perform(*(cmd,), **kwargs)
  File "/usr/lib/python2.6/site-packages/dialog.py", line 825, in _perform
child_rfd)
  File "/usr/lib/python2.6/site-packages/dialog.py", line 762, in _wait_for_prog
  ram_termination  "environment variable)" % exit_code)
dialog.DialogError/usr/lib/python2.6/site-packages/dialog.py:87: DeprecationWarn
ing: BaseException.message has been deprecated as of Python 2.6
  return "<%s: %s>" % (self.__class__.__name__, self.message)
: 

--
components: Windows
messages: 183154
nosy: harshaap
priority: normal
severity: normal
status: open
title: Dialog.py crashes when putty Window resized
type: crash
versions: Python 2.6

___
Python tracker 

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



[issue16620] Avoid using private function glob.glob1() in msi module and tools

2013-02-27 Thread Berker Peksag

Changes by Berker Peksag :


--
keywords: +patch
nosy: +berker.peksag
Added file: http://bugs.python.org/file29263/issue16620.diff

___
Python tracker 

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



[issue17309] __bytes__ doesn't work in subclass of int

2013-02-27 Thread Paul Koning

New submission from Paul Koning:

The __bytes__ special method has no effect in a subclass of "int" because the 
bytes() builtin checks for int or int subclass before it gets around to looking 
for that special method.  The attached example shows it.

--
components: Interpreter Core
files: bytes.py
messages: 183155
nosy: pkoning
priority: normal
severity: normal
status: open
title: __bytes__ doesn't work in subclass of int
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file29264/bytes.py

___
Python tracker 

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



[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2013-02-27 Thread Matt Clarke

New submission from Matt Clarke:

I have had an issue arise with ctypes callbacks with 64bit Python on Windows.
Note: everything works fine with 32bit Python on Windows and on 32bit and 64bit 
Linux.

I have created a simple example to illustrate the issue I have (see 
attachment), but the real-life issue occurs with using Python to interact with 
the EPICS control software (http://www.aps.anl.gov/epics/) used at many major 
scientific institutes.

Basically, if I have a C callback that takes a struct (by value) greater than 8 
bytes then the callback returns nonsense. 8 bytes or less works fine.

Stepping through with the Windows debugger, if appears that something goes 
amiss between the callback being called in C and the closure_fcn(ffi_cif *cif, 
void *resp, void **args, void *userdata) function in ctypes's callback.c file. 
Unfortunately, the debugger won't let me step in between those two points.

Looking at the memory I can see the original data in memory at some memory 
address, X, and a copy of the data at X+40 bytes, but the args in the 
closure_fcn points at X-40 bytes (which is junk).

Using 32bit Python the data copy is at X-40 bytes and the args pointer in the 
closure_fcn also points at this.

EPICS has some 64bit C/C++ clients that work fine using callbacks on Windows. 
Likewise, doing the same sort of thing as ctypes does with EPICS from C# using 
PInvoke works fine.
 
Any help would be much appreciated.

--
components: ctypes
files: code.txt
messages: 183156
nosy: Matt.Clarke
priority: normal
severity: normal
status: open
title: Ctypes callbacks shows problem on Windows Python (64bit)
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file29265/code.txt

___
Python tracker 

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



[issue7423] nested generator expression produces strange results

2013-02-27 Thread Christopher King

Christopher King added the comment:

*At this point you need to take your arguments to python-ideas or python-dev 
(probably the latter),*

I used Python once and will probably never use it again.  I'm not nearly 
invested enough to evangelize on several mailing lists the validity of a bug 
that I've already reported.

If you want treat take my bug report as the ramblings of a selfish kook who 
doesn't know squat about language design or development, then you need take no 
further action.

However if you'd rather consider that someone with little investment in the 
language who took the time to form a cogent argument pointing out a surprising 
and possibly buggy behavior might in fact represent the sentiments of Python 
user base at large, then you should consider re-opening this bug.

--

___
Python tracker 

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



[issue17299] Test cPickle with real files

2013-02-27 Thread Aman Shah

Aman Shah added the comment:

Created a small patch for python 2.7 using file test_pickle.py .

--
nosy: +Aman.Shah
Added file: http://bugs.python.org/file29266/patch

___
Python tracker 

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



[issue17305] IDNA2008 encoding missing

2013-02-27 Thread Marten Lehmann

Marten Lehmann added the comment:

IDNA2008 should be backwards compatible. I can try to explain it in a practical 
example:

DENIC was the first registry that actually used IDNA2008 - at a time, where not 
even libidn2 officially included the changes required for it. This was mainly 
due to the point, that the German Latin Small Letter Sharp S ('ß') was treated 
differently to other German Umlauts ('ä', 'ö', 'ü') in the original IDNA spec: 
It was not punycoded, because the nameprep already replaced it by 'ss'. 
Replacing 'ß' with 'ss' is in general correct in German (e.g. if your keyboard 
doesn't allow to enter 'ß'), but then 'ä' would have to be replaced by 'ae', 
'ö' by 'oe' and 'ü' by 'ue' as well. 

Punycoding 'ä', 'ö', 'ü', but not 'ß' was inconsistent and it wouldn't allow to 
register a domain name like straße.de, because it was translated to strasse.de. 
Therefor DENIC supported IDNA2008 very early to allow the registration of 
domain names containing 'ß'.

The only thing I'm aware of in this situation is, that previously straße.de was 
translated to strasse.de, while with IDNA2008 it's being translated to 
xn--strae-oqa.de. So people that have hardcoded a URL containing 'ß' and who 
are expecting it to be translated to 'ss' would fail, because with IDNA2008 it 
would be translated to a different ASCII-hostname. But those people could just 
change 'ß' to 'ss' in their code and everything would work again.

On the contrary, people that have registered a domain name containing 'ß' in 
the meantime couldn't access it right now by specifying the IDN version, 
because it would be translated to the wrong domain name with the current Python 
IDNA encoding. So the current IDNA-Encoding should be upgraded to IDNA2008.

--

___
Python tracker 

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



[issue16669] Docstrings for namedtuple

2013-02-27 Thread Ankur Ankan

Changes by Ankur Ankan :


--
nosy: +Ankur.Ankan

___
Python tracker 

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



[issue2209] mailbox module doesn't support compressed mbox

2013-02-27 Thread Ankur Ankan

Changes by Ankur Ankan :


--
nosy: +Ankur.Ankan

___
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-02-27 Thread Ankur Ankan

Changes by Ankur Ankan :


--
nosy: +Ankur.Ankan

___
Python tracker 

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



[issue17305] IDNA2008 encoding missing

2013-02-27 Thread R. David Murray

R. David Murray added the comment:

That doesn't sound like interoperability to me, that sounds like backward 
incompatibility :(.  I hope you are right that it only affects people with 
hardcoded domain names, but that is still an issue.

In any case, since this is a new feature it can only go into Python3.4, however 
we decide to do it.

--
stage:  -> needs patch
versions:  -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 
3.5

___
Python tracker 

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



[issue17283] Lib/test/__main__.py should share code with regrtest.py

2013-02-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e0f3dcd30af8 by Chris Jerdonek in branch 'default':
Issue #17283: Share code between __main__.py and regrtest.py in Lib/test.
http://hg.python.org/cpython/rev/e0f3dcd30af8

--
nosy: +python-dev

___
Python tracker 

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



[issue17283] Lib/test/__main__.py should share code with regrtest.py

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks a lot for the review, Petri.

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



[issue15305] Test harness unnecessarily disambiguating twice

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

The fix for issue 17283 has been committed now, which should make this slightly 
easier to fix (e.g. change one place instead of two).

--

___
Python tracker 

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



[issue16406] move the "Uploading Packages" section to distutils/packageindex.rst

2013-02-27 Thread Éric Araujo

Éric Araujo added the comment:

LGTM.  Some comments on Rietveld.

--

___
Python tracker 

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



[issue17100] rotating an ordereddict

2013-02-27 Thread Raymond Hettinger

Raymond Hettinger added the comment:

My only attraction to adding any of the rotate variants is that they provide 
functionality that can't be done efficiently by a user without access to the 
underlying data structure.

However, looking only at the API, the methods seem a bit awkward and a bit at 
odds with how people think of ordered dicts (rotate is not a method that comes 
to mind for my mental model).   

When I built the OD code, I looked at many existing implementations (in Python 
and other languages), and I don't recall seeing rotation in any of them.

In the absence of strong use cases, I prefer to keep the API thin so that OD's 
remain easy to learn and remember.

--
priority: normal -> low

___
Python tracker 

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



[issue17299] Test cPickle with real files

2013-02-27 Thread Aman Shah

Aman Shah added the comment:

Fixed the patch by removing TESTFN from tearDown.

--
Added file: http://bugs.python.org/file29267/patch

___
Python tracker 

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



[issue16406] move the "Uploading Packages" section to distutils/packageindex.rst

2013-02-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a9565750930e by Chris Jerdonek in branch '2.7':
Issue #16406: combine the doc pages for uploading and registering to PyPI.
http://hg.python.org/cpython/rev/a9565750930e

New changeset f57ddf3c3e5d by Chris Jerdonek in branch '3.2':
Issue #16406: Combine the doc pages for uploading and registering to PyPI.
http://hg.python.org/cpython/rev/f57ddf3c3e5d

New changeset 58a28aa70fec by Chris Jerdonek in branch '3.3':
Issue #16406: Combine the doc pages for uploading and registering to PyPI.
http://hg.python.org/cpython/rev/58a28aa70fec

New changeset 44ebac378e51 by Chris Jerdonek in branch 'default':
Issue #16406: Combine the doc pages for uploading and registering to PyPI.
http://hg.python.org/cpython/rev/44ebac378e51

--
nosy: +python-dev

___
Python tracker 

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



[issue16406] move the "Uploading Packages" section to distutils/packageindex.rst

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks a lot for taking the time to review, guys.

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



[issue17311] use distutils terminology in "PyPI package display" section

2013-02-27 Thread Chris Jerdonek

New submission from Chris Jerdonek:

As suggested by Éric in a Rietveld comment to issue 16406, this issue is to 
make the "PyPI package display" section of the distutils docs use the right 
terminology:

"It’s too bad this part of the documentation use “package” with the meaning 
used on PyPI instead of following the naming conventions used in the rest of 
the distutils docs (see glossary).  Here I don’t know when “package” and “home 
page” mean pypi.python.org/project or pypi.python.org/project/release (the 
former being a shortcut to the latest release page)."

--
assignee: eric.araujo
components: Distutils, Documentation
keywords: easy
messages: 183169
nosy: chris.jerdonek, eric.araujo, tarek
priority: normal
severity: normal
stage: needs patch
status: open
title: use distutils terminology in "PyPI package display" section
type: enhancement
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



[issue16406] move the "Uploading Packages" section to distutils/packageindex.rst

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I created issue 17311 for a suggestion Éric made on Rietveld.

--

___
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-02-27 Thread moijes12

Changes by moijes12 :


Added file: http://bugs.python.org/file29268/12768_2.patch

___
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-02-27 Thread moijes12

moijes12 added the comment:

I've attached a new patch with some changes.

--

___
Python tracker 

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



[issue15305] Test harness unnecessarily disambiguating twice

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Here is a patch that updates Geoff's patch to the latest code, and addresses 
the directory creation issue.

--
Added file: http://bugs.python.org/file29269/issue15305-3.patch

___
Python tracker 

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



[issue17100] rotating an ordereddict

2013-02-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> In the absence of strong use cases, I prefer to keep the API thin
> so that OD's remain easy to learn and remember.

It could be a separate function or a dedicated subclass if you prefer.
But providing it in the stdlib would avoid 3rd party code having to poke inside 
the OD internals.

--

___
Python tracker 

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



[issue15305] Test harness unnecessarily disambiguating twice

2013-02-27 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
stage:  -> patch review
type:  -> enhancement
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue16930] mention limitations and/or alternatives to hg graft

2013-02-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

As a member of the devguide target audience, I think for this the devguide 
should give alternatives with brief pluses and minuses. After importing and 
applying a patch to the earliest applicable 2.x or 3.x, move it to the other 
series with graft (new, possible better merge,possible problem with case or 
series specific changes); re-import (possible loss of local edits); or even 
export/import (keep local changes, no case problems). Expanded, the previous 
sentence should only be 10 or at most 15 lines. Then each person can pick the 
method that works best for them, which might not always be the same method for 
each patch. In a few years, this topic will be obsolete except for security 
issues.

--

___
Python tracker 

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



[issue17312] test_aifc doesn't clean up after itself

2013-02-27 Thread Chris Jerdonek

New submission from Chris Jerdonek:

test_aifc's AIFCLowLevelTest.test_write_aiff_by_extension() leaves a test file 
behind.  I'm not sure what other versions are affected.

--
keywords: easy
messages: 183175
nosy: chris.jerdonek, r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: test_aifc doesn't clean up after itself
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue17312] test_aifc doesn't clean up after itself

2013-02-27 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
components: +Tests

___
Python tracker 

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



[issue17313] test_logging doesn't clean up after itself

2013-02-27 Thread Chris Jerdonek

New submission from Chris Jerdonek:

test_logging leaves behind a file called test.log in the current working 
directory.  I haven't narrowed down to the specific test, and I'm not sure what 
other versions are affected.

--
components: Tests
messages: 183176
nosy: chris.jerdonek, vinay.sajip
priority: normal
severity: normal
stage: needs patch
status: open
title: test_logging doesn't clean up after itself
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue17314] Stop using imp.find_module() in multiprocessing

2013-02-27 Thread Brett Cannon

New submission from Brett Cannon:

I'm trying to remove all uses of imp.find_module()/load_module() and 
multiprocessing seems to have a single use of both purely for (re)loading a 
module. The attached patch moves over to importlib.find_loader() and subsequent 
load_module() call to match the semantics of imp.find_module()/load_module(). 
If a guaranteed reload is not necessary then importlib.import_module() is a 
single-line change.

I ran the test suite, but there don't seem to be any explicit tests for this 
chunk of code (or am I missing something?).

--
assignee: sbt
components: Library (Lib)
files: remove_imp.find_module.diff
keywords: patch
messages: 183177
nosy: brett.cannon, sbt
priority: normal
severity: normal
stage: patch review
status: open
title: Stop using imp.find_module() in multiprocessing
versions: Python 3.4
Added file: http://bugs.python.org/file29270/remove_imp.find_module.diff

___
Python tracker 

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



[issue17315] test_posixpath doesn't clean up after itself

2013-02-27 Thread Chris Jerdonek

New submission from Chris Jerdonek:

test_posixpath leaves behind a file of the following form when running on Mac 
OS X:

lrwxr-xr-x @test_17700_tmpa -> @test_17700_tmpa/b

I'm not sure which test it is or which other versions are affected.

--
components: Tests
messages: 183178
nosy: chris.jerdonek
priority: normal
severity: normal
stage: needs patch
status: open
title: test_posixpath doesn't clean up after itself
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails

2013-02-27 Thread Brett Cannon

Brett Cannon added the comment:

I figured out what I have to do to make this work properly again to avoid the 
exception from being swallowed. Roughly:

# XXX calculate mode (_cache_bytecode)
# XXX create subdirectories as necessary (set_data)
# XXX write file (_write_atomic)
# Above replaces loader._cache_bytecode(file, cfile, bytecode)

That will bypass the try/except block causing the issues.

--
assignee:  -> brett.cannon
stage:  -> test needed

___
Python tracker 

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



[issue17177] Document/deprecate imp

2013-02-27 Thread Brett Cannon

Changes by Brett Cannon :


--
dependencies: +Deprecate imp.find_module()/load_module()

___
Python tracker 

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



[issue14797] Deprecate imp.find_module()/load_module()

2013-02-27 Thread Brett Cannon

Changes by Brett Cannon :


--
dependencies: +Stop using imp.find_module() in multiprocessing

___
Python tracker 

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



[issue14797] Deprecate imp.find_module()/load_module()

2013-02-27 Thread Brett Cannon

Brett Cannon added the comment:

Assuming issue #17314 gets fixed, that leaves the following uses of 
imp.find_module():

Lib/idlelib/EditorWindow.py
39:"""Version of imp.find_module() that handles hierarchical module names"""
45:(file, filename, descr) = imp.find_module(tgt, path)

Lib/modulefinder.py
482:return imp.find_module(name, path)

Lib/pkgutil.py
229:file, filename, etc = imp.find_module(subname, path)

Lib/test/test_imp.py
59:with imp.find_module('module_' + mod, self.test_path)[0] as fd:
64:imp.find_module('badsyntax_pep3120', path)
68:fp, filename, info  = imp.find_module('module_' + mod,
77:fp, filename, info = imp.find_module("tokenize")
91:file, filename, info = imp.find_module(temp_mod_name)
147:file, filename, info = imp.find_module(temp_mod_name)
187:  imp.find_module, "badsyntax_pep3120", [path])
201:x = imp.find_module("os")
213:x = imp.find_module(example)
223:fileobj, pathname, description = imp.find_module(m)

Lib/test/test_import.py
128:imp.find_module, TESTFN, ["."])

Lib/test/test_importhooks.py
118:file, filename, stuff = imp.find_module(subname, path)

--

___
Python tracker 

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



[issue14797] Deprecate imp.find_module()/load_module()

2013-02-27 Thread Brett Cannon

Brett Cannon added the comment:

The remaining uses of imp.load_module() after issue #17314 (which will probably 
all disappear as uses of imp.find_module() is removed):

Lib/idlelib/EditorWindow.py
48:module = imp.load_module(tgt, file, filename, descr)

Lib/pkgutil.py
291:mod = imp.load_module(fullname, self.file, self.filename, 
self.etc)

Lib/pydoc.py
47:#   - imp.load_module() cannot be prevented from clobbering existing
277:module = imp.load_module(name, file, path, (ext, 'r', kind))

Lib/test/test_imp.py
155:mod = imp.load_module(temp_mod_name, file, filename, info)
203:new_os = imp.load_module("os", *x)
217:mod = imp.load_module(example, *x)

Lib/test/test_importhooks.py
132:mod = imp.load_module(fullname, self.file, self.filename, 
self.stuff)

--

___
Python tracker 

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



[issue16651] Find out what stdlib modules lack a pure Python implementation

2013-02-27 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue14797] Deprecate imp.find_module()/load_module()

2013-02-27 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue17316] Add Django 1.5 to benchmarks

2013-02-27 Thread Brett Cannon

New submission from Brett Cannon:

Will also need a new Django benchmark target which should get listed in the 2n3 
overall target.

--
assignee: brett.cannon
messages: 183182
nosy: brett.cannon, pitrou
priority: low
severity: normal
status: open
title: Add Django 1.5 to benchmarks

___
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-02-27 Thread Brett Cannon

New submission from Brett Cannon:

E.g. when you run ``./perf.py -h`` it lists the py3k benchmark target as having 
4 benchmarks, but that's wrong since the 2n3 benchmark alone (which py3k 
includes) has 23 benchmarks.

--
keywords: easy
messages: 183183
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Benchmark driver should calculate actual benchmark count in -h

___
Python tracker 

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



[issue17316] Add Django 1.5 to benchmarks

2013-02-27 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +alex

___
Python tracker 

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



[issue12713] argparse: allow abbreviation of sub commands by users

2013-02-27 Thread Christian Ziemski

Christian Ziemski added the comment:

Ouch, I really missed this one for a long time. :-(
(I didn't understand the workflow correctly and overlooked the reviews.)
I apologize to everyone who has been involved!

Finally I'm back here and re-did my patch for 3.4 this time.

I followed the comments of the reviewers (and Vinay's suggestion) as far as 
possible.

--
versions: +Python 3.4 -Python 3.3
Added file: http://bugs.python.org/file29271/abbrev_subcmds_incl_tests_3.4.patch

___
Python tracker 

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



[issue17311] use distutils terminology in "PyPI package display" section

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

The link for convenience:

http://docs.python.org/dev/distutils/packageindex.html#pypi-package-display

--

___
Python tracker 

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



[issue17313] test_logging doesn't clean up after itself

2013-02-27 Thread Vinay Sajip

Vinay Sajip added the comment:

There are only three logging tests that open a handler to test.log: 
test_filename, test_filemode and test_incompatible.

AFAIK those tests have remained unchanged over several years, if not months. Is 
the failure repeatable? Which platform did the failure occur on?

--

___
Python tracker 

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



[issue17313] test_logging doesn't clean up after itself

2013-02-27 Thread Vinay Sajip

Vinay Sajip added the comment:

I investigated a little further. The file is created in the test directory 
(build/test_python_/) and, I assume, the dir is wiped at the end of the 
test.

I can go through and do an addCleanup(os.remove, 'test.log') in the relevant 
tests; that should do it. It probably affects all versions - I'm not sure it's 
worth bothering to change 2.x versions, though.

--

___
Python tracker 

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



[issue17079] Fix test discovery for test_ctypes.py

2013-02-27 Thread Zachary Ware

New submission from Zachary Ware:

Version 1 converts test_main() into load_tests().  Version 2 removes the now 
unnecessary import of run_unittest from support; thank you to Ezio for 
reminding me to look at imports in these patches.

--
Added file: http://bugs.python.org/file29272/test_ctypes_discovery.v2.diff

___
Python tracker 

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



[issue17082] Fix test discovery for test_dbm*.py

2013-02-27 Thread Zachary Ware

Zachary Ware added the comment:

Version 2 removes an unnecessary import in test_dbm_gnu.py

--
Added file: http://bugs.python.org/file29273/test_dbm-s_discovery.v2.diff

___
Python tracker 

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



[issue17313] test_logging doesn't clean up after itself

2013-02-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks for investigating.

Yes, currently regrtest.py deletes the containing directory.  But this doesn't 
happen when running with plain unittest.  If each test cleans up after itself, 
this will give us more flexibility in moving from regrtest to a unittest-based 
approach (there is an issue about this).  Currently, test_logging seems to be 
one of only a few test modules that don't do this.

It's probably okay to make the fix only in 3.4 since we won't be making 
progress on moving away from regrtest in maintenance releases.

--

___
Python tracker 

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



[issue17314] Stop using imp.find_module() in multiprocessing

2013-02-27 Thread Richard Oudkerk

Richard Oudkerk added the comment:

I think this change will potentially make the main module get imported twice 
under different names when we transfer pickled data between processes.  The 
current code (which is rather a mess) goes out of its way to avoid that.

Basically the main process makes sys.modules['__mp_main__'] an alias for the 
main module, and other process import the parent's main module with __name__ == 
'__mp_main__' and make sys.modules['__main__'] an alias for that.  This means 
that any functions/classes defined in the main module (from whatever process) 
will have

obj.__module__ in {'__main__', '__mp_main__'}

Unpickling such an object will succeed in any process without reimporting the 
main module.

Attached is an alternative patch which is more like the original code and seems 
to work.  (Maybe modifying loader.name is an abuse of the API.)

--
Added file: http://bugs.python.org/file29274/mp-importlib.diff

___
Python tracker 

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



[issue17313] test_logging doesn't clean up after itself

2013-02-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b7f5bff33c22 by Vinay Sajip in branch 'default':
Closes #17313: Deleted test file created by test_logging.
http://hg.python.org/cpython/rev/b7f5bff33c22

--
nosy: +python-dev
resolution:  -> fixed
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



[issue17318] xml.sax and xml.dom fetch DTDs by default

2013-02-27 Thread Raynard Sandwick

New submission from Raynard Sandwick:

Note that URIs in the following are only meant as links when in parentheses; 
otherwise, they are identifiers and mostly will not yield useful results. I 
have only worked with xml.sax in Python 2.6 and 2.7, so I cannot speak to its 
current state in later versions.

The condition described in Python issue #2124 
(http://bugs.python.org/issue2124) may yet be a defect, and is at the least a 
reasonably important enhancement, but apparently was not sufficiently 
specified, so I will attempt to clarify. As an aside, it is similar to a 
libxml2 issue on which I have also commented today 
(https://bugzilla.gnome.org/show_bug.cgi?id=162776), whose statement of issue 
actually contains what I would expect to be correct behavior if the toggling 
action were setting an option/feature rather than importing an additional 
module.

The most common case, and the reason w3c has been inundated with the described 
requests, is that every time any user anywhere uses xml.sax in its default form 
to parse an XHTML document containing a doctype declaration, a request is sent 
to www.w3.org for the contents of that DTD from the URI in its system 
identifier. This is not documented anywhere (which would be the primary reason 
to call this a defect), and is confusing because it has the effect of using the 
terms parser and validator (or "validating parser," whichever is the preferred 
name) interchangeably.

The w3c is largely to blame, since their own definition document for XML 
(http://www.w3.org/TR/REC-xml/#sec-external-ent) defines the DTD as a "special 
kind of external entity," and then goes on to say that XML processors *MAY* use 
any combination of pubid+sysid to find an alternative method of resolving the 
reference, but otherwise *MUST* use the URI.

However, this is only necessary when *validating* XML. The DTD is a "mostly 
useless, but required" (http://en.wikipedia.org/wiki/Document_Type_Declaration) 
entity in HTML5, e.g., but is not required in XML generally. Even when present, 
the only time a processor should consult the DTD is during validation, not 
parsing. If the default parser revealed by xml.sax is a validator rather than 
just a parser, that should be communicated clearly to the user. When we discuss 
a CSV parser, we expect it to accept lines separated by some character, each 
with columns separated by commas. We do not expect it to verify that certain 
values are found in certain columns of the first line unless we specify that it 
should. In specifying that it should, we have asked for a validator rather than 
a parser. This issue is related to the XML analogue of that distinction.

The most valid and important complaint in the referenced blog post is: "don't 
fetch stuff unless you actually need it," which is what xml.sax users may be 
unwittingly doing if validation is the default behavior. Further, if xml.sax 
were actually *not* conducting validation by default, there is no reason 
whatever to retrieve the DTD, since any external entity references can remain 
unresolved in well-formed XML prior to validation.

Note that the features, http://xml.org/sax/features/external-general-entities, 
.../external-parameter-entities, and .../validation have no specified defaults 
(http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html#package_description).
 Making these enabled by default causes network-required side effects, which I 
would contend is improper: unless a user asks for network activity, none should 
occur. An implicit request for network activity, such as validation, should be 
fully and widely-visibly documented as a legitimate side effect.

The set of primary use cases for the xml.sax parsers certainly include 
validation, but users will often be unaware that it is the default, and more 
importantly be unaware that the parser will therefore request the DTD from its 
URI. While the feature, .../external-general-entities, partially solves the 
problem, it is not a full solution, because a well-formed XML document can 
contain external entities regardless of the location of DTD subsets. The w3c's 
description ("special kind of external entity") is important here - the DTD is 
special for a reason, and has its own tag/specifier as a result: resolving 
general external entities after intentionally omitting an external DTD subset 
is an acceptable use case, especially in a non-validating parser.

My proposal would be to enhance/fix xml.sax by doing the following:

1) allow toggling of external DTD subset loading via a feature such as 
http://apache.org/xml/features/nonvalidating/load-external-dtd 
(http://xerces.apache.org/xerces-j/features.html),
2) cause the feature, http://xml.org/sax/features/validation, to automatically 
enable the DTD loading feature as well, just as it does for the two currently 
implemented external entity features,
3) document the default behavior, specially noting that users can expect URIs 
to be resolved, across the net

[issue17314] Stop using imp.find_module() in multiprocessing

2013-02-27 Thread Brett Cannon

Brett Cannon added the comment:

It is an abuse since I didn't design that part of the API to function that way, 
but it's cool that it just happens to. =)

I do see your use-case and it is legitimate, although extremely rare and 
narrow. Let me think about whether I want to add specific support either 
through your approach, Richard, or if I want to decouple the setting of module 
attributes so that it is more along the lines of::

  main_module = imp.new_module('__mp_main__')
  loader.set_attributes(main_module)  # BRAND-NEW; maybe private to the stdlib?
  main_module.__name__ = '__mp_main__'
  code_object = loader.get_code(main_name)
  sys.modules['__main__'] = sys.modules['__mp_main__'] = main_module  # OLD
  exec(code_object, main_module.__dict__)

I'm currently leaning towards the latter option since it's an annoying bit to 
get right and it doesn't hurt anything to expose.

--
assignee: sbt -> brett.cannon

___
Python tracker 

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



[issue16901] In http.cookiejar.FileCookieJar() the .load() and .revert() methods don't work

2013-02-27 Thread Demian Brecht

Demian Brecht added the comment:

(Note: Additional context can be found here: http://bugs.python.org/issue16942, 
which seems to be a dupe of this report)

I haven't had any feedback to my proposal on python-ideas about the removal of 
LWPCookieJar and MozillaCookieJar and the introduction of LWPCookieProcessor 
and MozillaCookieProcessor yet 
(http://thread.gmane.org/gmane.comp.python.ideas/19673), which could be 
indicative of this change simply not being acceptable. However, on the outside 
chance that's not the case, I've submitted a patch covering the proposed 
implementations. All tests pass. 

The patch addresses some of the oddities around FileCookieJar looking, but not 
behaving as an abstract class as well as inheriting from a concrete class 
(CookieJar). The change aligns LWPCookies and MozillaCookies with the 
HTTPCookies. This should fix the questions around why FileCookieJar can't be 
used directly. If this change looks reasonable, corresponding documentation 
changes will be made as well.

Note: This change /does/ break backwards compatibility. I'm not sure what the 
process is for that, so if this change is eventually applied, pointers as to 
what should be integrated where would be helpful.

--
keywords: +patch
Added file: http://bugs.python.org/file29275/cookiejar_16901.patch

___
Python tracker 

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



[issue2124] xml.sax and xml.dom fetch DTDs by default

2013-02-27 Thread Raynard Sandwick

Raynard Sandwick added the comment:

I have opened issue #17318 to try to specify the problem better. While I do 
think that catalogs are the correct fix for the validation use case (and thus 
would like to see something more out-of-the-box in that vein), the real trouble 
is that users are often unaware that they're sending requests to DTD URIs, so 
some combination of fixes in default behavior and/or documentation is 
definitely needed.

The external_ges feature does help, in a way, but is poorly communicated to new 
users, and moreover does not respect the difference between external DTD 
subsets and external general entities (there's a reason "DOCTYPE" isn't spelled 
"ENTITY").

The default behavior is not well documented, and the constraining behavior of 
DTDs is frequently unnecessary. Either a user should have to explicitly enable 
validation, or it should be irrevocably obvious to a user that validation is 
the default behavior, and in both cases it should be blatantly documented that 
validation may cause network side effects. I think the input has been 
reasonable all around, and yet I find it rather insane that this issue didn't 
eventually at least result in a documentation fix, thanks to what looks like 
push-back for push-back's sake, though I will gladly admit the conclusion that 
it was underspecified is entirely valid.

Anyway, further info in the new issue...

--
nosy: +rsandwick3

___
Python tracker 

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



[issue16901] In http.cookiejar.FileCookieJar() the .load() and .revert() methods don't work

2013-02-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I suspect most people don't use or care much about cookies and cookie jar and 
do not understand the issue of proposal enough to comment. My feeling is that 
the patch probably breaks more than is necessary to fix the immediate problem 
and too much for current releases. For one, just the name change seems 
unnecessary. I need to look at HTTPCookies before I can say more.

--

___
Python tracker 

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



[issue12345] Add math.tau

2013-02-27 Thread Waldir Pimenta

Waldir Pimenta added the comment:

Following-up sbaird's comment, I must point out that those aren't 
Python-specific results. Filtering them by appending &l=python to the urls 
yields:
- "TAU = 2 * Math.PI": 6
- "TAU = 2*Math.PI": 2
- "TAU=2*Math.PI": 0
- "TAU = Math.PI * 2": 0
- "TAU = Math.PI*2": 2
- "TAU=Math.PI*2": 1
(total: 11)

- "TAU = 2 * PI": 9
- "TAU = 2*PI": 12
- "TAU=2*PI": 0
- "TAU = PI * 2": 2
- "TAU = PI*2": 0
- "TAU=PI*2": 0
(total: 23)

Then again, the results for all languages are still helpful to estimate the 
overall adoption of the notation in code, and indeed the global usage of these 
patterns (in github only) is in the hundreds.

Also, it's worth taking a look at the usage of the twopi constant, which is 
already defined in several languages 
(http://en.wikipedia.org/w/index.php?oldid=509096802#Support_in_programming_languages),
 and has been manually defined in python quite often, proving its usefulness:

- https://github.com/search?l=python&q=twopi&type=Code (~2k results in python, 
and ~58k overall)
- https://github.com/search?l=python&q=two_pi&type=Code (~200 results in 
python, ~23k overall)

--
nosy: +waldir

___
Python tracker 

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



[issue17305] IDNA2008 encoding missing

2013-02-27 Thread Marten Lehmann

Marten Lehmann added the comment:

I found an interesting link about this issue:

http://www.unicode.org/faq/idn.html

I also checked a domain name of a client that ends with 'straße.de': IE, 
Firefox and Chrome still use IDNA2003, Opera already does IDNA2008.

In IDNA2008 a lot of characters aren't allowed any longer (like symbols or 
strike-through letters). But I think this doesn't have any practical relevance, 
because even while IDNA2003 formally allowed these characters, domain name 
registries disallowed to register internationalized domain names containing any 
of these characters.

Most registries restricted the allowed characters very strong, e.g. in the .de 
zone you cannot use Japanese characters, only those in use within the German 
language. Some other registries expect you to submit a language property during 
the domain registration and then only special characters within that language 
are allowed in the domain name. Also, most registries don't allow to register a 
domain name that mixes different languages.

So IDNA2008 is the future and hopefully shouldn't break a lot. I don't know of 
any real life use of the IDNA encoding other than DNS / URLs. I don't know how 
many existing modules in PyPI working with URLs already make use of the current 
encodings.idna class but I guess it would cause more work if they all would 
have to change their code to use name.encode('idna2008') or work with an 
outdated encoding in the end if unchanged than just silentely switching to 
IDNA2008 for encodings.idna and add encodings.idna2003 for those who really 
need the old one for some reason. Reminds me a bit on the range() / xrange() 
thing. Now the special new xrange() is the default and called just range() 
again. I guess in some years we'll look back on the IDNA2003/2008 transition 
the same way.

--

___
Python tracker 

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



[issue17318] xml.sax and xml.dom fetch DTDs by default

2013-02-27 Thread R. David Murray

R. David Murray added the comment:

I believe this is a subset of issue 17239, and it may be appropriate to close 
it as a duplicate.  I'll let that up to Chris, though, since he knows what 
still needs to be specified/worked out.

--
assignee:  -> christian.heimes
nosy: +christian.heimes, r.david.murray

___
Python tracker 

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



[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2013-02-27 Thread karl

New submission from karl:

def send_response_only(self, code, message=None):
http://hg.python.org/cpython/file/3.3/Lib/http/server.py#l448

There is no type checking on code or if the code is appropriate. Let's take 


==
#!/usr/bin/env python3.3
import http.server


class HTTPHandler(http.server.BaseHTTPRequestHandler):
"A very simple server"
def do_GET(self):
self.send_response(200)
self.send_header('Content-type', 'text/plain')
self.end_headers()
self.wfile.write(bytes('Response body\n\n', 'latin1'))

if __name__ == '__main__':
addr = ('', 9000)
http.server.HTTPServer(addr, HTTPHandler).serve_forever()
=

A request is working well.

=
→ http GET localhost:9000
HTTP/1.0 200 OK
Server: BaseHTTP/0.6 Python/3.3.0
Date: Thu, 28 Feb 2013 04:00:44 GMT
Content-type: text/plain

Response body

=

And the server log is 

127.0.0.1 - - [27/Feb/2013 23:00:44] "GET / HTTP/1.1" 200 -

Then let's try


=
#!/usr/bin/env python3.3
import http.server


class HTTPHandler(http.server.BaseHTTPRequestHandler):
"A very simple server"
def do_GET(self):
self.send_response(999)
self.send_header('Content-type', 'text/plain')
self.end_headers()
self.wfile.write(bytes('Response body\n\n', 'latin1'))

if __name__ == '__main__':
addr = ('', 9000)
http.server.HTTPServer(addr, HTTPHandler).serve_forever()
=

The response is

=
→ http GET localhost:9000
HTTP/1.0 999 
Server: BaseHTTP/0.6 Python/3.3.0
Date: Thu, 28 Feb 2013 03:55:54 GMT
Content-type: text/plain

Response body

=

and the log server is

127.0.0.1 - - [27/Feb/2013 22:55:12] "GET / HTTP/1.1" 999 -

And finally 

=
#!/usr/bin/env python3.3
import http.server


class HTTPHandler(http.server.BaseHTTPRequestHandler):
"A very simple server"
def do_GET(self):
self.send_response('foobar')
self.send_header('Content-type', 'text/plain')
self.end_headers()
self.wfile.write(bytes('Response body\n\n', 'latin1'))

if __name__ == '__main__':
addr = ('', 9000)
http.server.HTTPServer(addr, HTTPHandler).serve_forever()
=

The response is then

=
→ http GET localhost:9000
HTTPConnectionPool(host='localhost', port=9000): Max retries exceeded with url: 
/
=

and the server log is 

127.0.0.1 - - [27/Feb/2013 22:56:39] "GET / HTTP/1.1" foobar -

Exception happened during processing of request from ('127.0.0.1', 53917)
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/socketserver.py",
 line 306, in _handle_request_noblock
self.process_request(request, client_address)
  File 
"/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/socketserver.py",
 line 332, in process_request
self.finish_request(request, client_address)
  File 
"/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/socketserver.py",
 line 345, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File 
"/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/socketserver.py",
 line 666, in __init__
self.handle()
  File 
"/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/http/server.py",
 line 400, in handle
self.handle_one_request()
  File 
"/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/http/server.py",
 line 388, in handle_one_request
method()
  File "../25/server.py", line 8, in do_GET
self.send_response('foobar')
  File 
"/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/http/server.py",
 line 444, in send_response
self.send_response_only(code, message)
  File 
"/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/http/server.py",
 line 459, in send_response_only
(self.protocol_version, code, message)).encode(
TypeError: %d format: a number is required, not str


Both error messages and server logs are not very helpful. 
Shall we fix it? 
What others think?

I guess there should be test cases too?
I'm happy to make unit test cases for it though I might need a bit of guidance 
as I'm not comfortable with unit test cases mocking connections.

--
components: Library (Lib)
messages: 183201
nosy: karlcow, orsenthil
priority: normal
severity: normal
status: open
title: http.server.BaseHTTPRequestHandler send_response_only doesn't check the 
type and value of the code.
type: enhancement
versions: Python 3.3

___

[issue17307] HTTP PUT request Example

2013-02-27 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Ezio. yes in 3.3 onwards it should be done in urllib.request. I was having 2.7 
docs in my mind, but I ended up writing for latest with the intention to 
backport. I have updated the patch to include both ways, while backporting to 
2.7 and 3.2, plan to include only the httplib ones.

--
Added file: http://bugs.python.org/file29276/issue17307-2.patch

___
Python tracker 

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



[issue17305] IDNA2008 encoding missing

2013-02-27 Thread R. David Murray

R. David Murray added the comment:

Ah, excellent, that document looks like exactly what I was looking for.

Now, when someone is going to get around to working on this, I don't know.

(Note that the xrange/range change was made at the Python2/Python3 boundary, 
where we broke backward compatibility.  I doubt that we are ever going to do 
that kind of transition again, but we do have ways to phase in changes in the 
default behavior over time.)

--

___
Python tracker 

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



[issue1709112] test_1686475 of test_os & pagefile.sys

2013-02-27 Thread Ezio Melotti

Ezio Melotti added the comment:

Now the test (see Lib/test/test_os.py:470) has been changed to:

try:
os.stat(r"c:\pagefile.sys")
except FileNotFoundError:
pass # file does not exist; cannot run test
except OSError as e:
self.fail("Could not stat pagefile.sys")

so this should work properly now.

I can't find the code changed by the second patch in Modules/posixmodule.c, so 
I'm going to close this issue as out of date.

--
nosy: +ezio.melotti
resolution:  -> out of date
stage: test needed -> 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



  1   2   >