[issue21727] Ambiguous sentence explaining `cycle` in itertools documentation

2014-06-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I see no real difference here and AFAICT the current wording has not caused any 
confusion since it was written a decade ago.

--
assignee: docs@python -> rhettinger
priority: normal -> low

___
Python tracker 

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



[issue12387] IDLE save keyboard shortcut problem

2014-06-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I pushed Roger's patch so that the Windows section of config-keys.def is in a 
consistent state. However, this does not fix the problem for 
config-extensions.def or user versions of config-keys.def. A) The basic method 
of the key dialog does not allow entry of proper pairs. B) it is easy to forget 
to enter both versions when using the advanced method or editing a file 
directly.

So rather than develop a similar patch for the Unix block, which is always 
missing the uppercase version of key-bindings, our GSOC student will work on 
code to add the 'other' version when alpha key-bindings are read. If and when 
that works, the Unix block will work as is and the Windows block can have 
removed what will then become duplicates.

--
nosy: +sahutd
stage: patch review -> needs patch
versions: +Python 2.7

___
Python tracker 

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



[issue12387] IDLE save keyboard shortcut problem

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 55fed3eae14b by Terry Jan Reedy in branch '2.7':
Issue #12387: Add missing upper(lower)case versions of default Windows key
http://hg.python.org/cpython/rev/55fed3eae14b

New changeset 25fd9aeeff91 by Terry Jan Reedy in branch '3.4':
Issue #12387: Add missing upper(lower)case versions of default Windows key
http://hg.python.org/cpython/rev/25fd9aeeff91

--
nosy: +python-dev

___
Python tracker 

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



[issue21646] Add tests for turtle.ScrolledCanvas

2014-06-11 Thread ingrid

New submission from ingrid:

First pass at some tests

--
keywords: +patch
Added file: http://bugs.python.org/file35586/issue_21646.patch

___
Python tracker 

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



[issue634412] RFC 2387 in email package

2014-06-11 Thread Abhilash Raj

Abhilash Raj added the comment:

David: What about his API then?
   https://gist.github.com/maxking/b3ed4f54674e5f480275

Here cids are generated behind the scenes when the html part is added and those 
 cids are assigned to the attachments on the first come basis?
Like {0} is replaced by the cid of `roasted-asparagus.jpg`, I think you get the 
idea?

I will post a brief summary of this discussion to email-sig list later today.

--

___
Python tracker 

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



[issue21724] resetwarnings doesn't reset warnings registry

2014-06-11 Thread Berker Peksag

Berker Peksag added the comment:

> It makes it difficult to get repeatable warning messages, e.g. at the > 
> command prompt, because the shortcut path will silence messages which > were 
> already emitted, even if the filter have been changed to "always" > 
> in-between.

This could be related to issue 4180.

--
nosy: +berker.peksag

___
Python tracker 

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



[issue21720] "TypeError: Item in ``from list'' not a string" message

2014-06-11 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +brett.cannon, eric.snow

___
Python tracker 

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



[issue21714] Path.with_name can construct invalid paths

2014-06-11 Thread Antony Lee

Antony Lee added the comment:

I have the patch almost ready, but ran into another issue: should 
"path.with_name('foo/')" be allowed?  It may make sense to treat it like 
"path.with_name('foo')", just like 'Path("foo/") == Path("foo")'.

The implementation is also simpler with it, as it can reuse the "parse_parts" 
approach used by "with_suffix".  But this also raises a separate issue, which 
is that with the current implementation, we have 
"Path('foo').with_suffix('.bar') == Path('foo').with_suffix('.bar/')", and that 
is less reasonable.  Should I open a separate issue for that?

--

___
Python tracker 

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



[issue21176] Implement matrix multiplication operator (PEP 465)

2014-06-11 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue21109] tarfile: Traversal attack vulnerability

2014-06-11 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue19974] tarfile doesn't overwrite symlink by directory

2014-06-11 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16428] turtle with compound shape doesn't get clicks

2014-06-11 Thread ingrid

ingrid added the comment:

I updated the patch to use the gui check in Lib/test/support, and I renamed the 
test file to be test_turtle_guionly.

--
Added file: http://bugs.python.org/file35585/issue_16428.patch

___
Python tracker 

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



[issue21722] teach distutils "upload" to exit with code != 0 when error occurs

2014-06-11 Thread Martin Dengler

Martin Dengler added the comment:

If you'd like me to change anything about the test case please let me know.

--

___
Python tracker 

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



[issue21722] teach distutils "upload" to exit with code != 0 when error occurs

2014-06-11 Thread Martin Dengler

Martin Dengler added the comment:

Here is the patch against 2.7, including a new test case.

--
Added file: 
http://bugs.python.org/file35584/cpython2-patch-Lib-distutils-command-upload.py.patch

___
Python tracker 

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



[issue21722] teach distutils "upload" to exit with code != 0 when error occurs

2014-06-11 Thread Martin Dengler

Martin Dengler added the comment:

Here is the patch against tip, including a new test case.

--
Added file: 
http://bugs.python.org/file35583/cpython-patch-Lib-distutils-command-upload.py.patch

___
Python tracker 

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



[issue21722] teach distutils "upload" to exit with code != 0 when error occurs

2014-06-11 Thread Martin Dengler

Martin Dengler added the comment:

I will submit patches with tests as soon as the before & after tests finish.

--

___
Python tracker 

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



[issue21722] teach distutils "upload" to exit with code != 0 when error occurs

2014-06-11 Thread Martin Dengler

Martin Dengler added the comment:

Here is the patch against hg 2.7.

--
Added file: 
http://bugs.python.org/file35582/cpython2-patch-Lib-distutils-command-upload.py.patch

___
Python tracker 

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



[issue21722] teach distutils "upload" to exit with code != 0 when error occurs

2014-06-11 Thread Martin Dengler

Changes by Martin Dengler :


Removed file: 
http://bugs.python.org/file35573/cpython2-patch-Lib-distutils-command-upload.py.patch

___
Python tracker 

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



[issue21722] teach distutils "upload" to exit with code != 0 when error occurs

2014-06-11 Thread Martin Dengler

Changes by Martin Dengler :


Removed file: 
http://bugs.python.org/file35572/cpython-patch-Lib-distutils-command-upload.py.patch

___
Python tracker 

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



[issue21722] teach distutils "upload" to exit with code != 0 when error occurs

2014-06-11 Thread Martin Dengler

Martin Dengler added the comment:

Here is the patch against hg tip.

--
Added file: 
http://bugs.python.org/file35581/cpython-patch-Lib-distutils-command-upload.py.patch

___
Python tracker 

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




[issue21728] Confusing error message when initialising type inheriting object.__init__

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

See issue 7963 for a clue to why you get this message.  That is, it is 
object.__new__ that is getting called, not object.__init__, and __new__ methods 
result in different error messages than __init__ methods.  I don't know if 
there is a practical way to make it better.  For example you also have this:

>>> a = A('abc', 'xyz')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: decoding str is not supported
>>> a = A('abc', 2, 3, 54)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: str() takes at most 3 arguments (4 given)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue21688] Improved error msg for make.bat htmlhelp

2014-06-11 Thread Olive Kilburn

Olive Kilburn added the comment:

Thanks!

--

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

Hmm.  There's a conflict marker in that patch.

I *think* that if you do an 'hg pull --rebase' and then give your repository 
URL to the tracker, the 'create patch' button will do the right thing.  (I 
tried it with the URL you sent me and it generated a diff that contained 
unrelated changes, which is why I suggest the hg pull --rebase).

--

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-06-11 Thread Milan Oberkirch

Changes by Milan Oberkirch :


Added file: http://bugs.python.org/file35580/issue21725-fixed-hg.patch

___
Python tracker 

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



[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2014-06-11 Thread Andrew Barnert

Andrew Barnert added the comment:

Sorry, Stefan, not Stephan. Anyway, I've signed the agreement.

--

___
Python tracker 

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



[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2014-06-11 Thread Andrew Barnert

Andrew Barnert added the comment:

Hi, Stephan. Sorry, for some reason Yahoo was sending updates from the tracker 
to spam again, so I missed this. I'd be glad to sign a contributor agreement if 
it's still relevant, but it looks like there's a later patch that does what 
mine did and more?

--

___
Python tracker 

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



[issue21722] teach distutils "upload" to exit with code != 0 when error occurs

2014-06-11 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks you for the patch. It may be good to add a unit test for this.
Also, for development, it is probably better to use a Mercurial clone instead 
of trying to generate diffs by hand. See the devguide for more information: 
https://docs.python.org/devguide/

--
nosy: +pitrou

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-06-11 Thread Milan Oberkirch

Changes by Milan Oberkirch :


Added file: http://bugs.python.org/file35579/issue21725-fixed.patch

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-06-11 Thread Milan Oberkirch

Changes by Milan Oberkirch :


Removed file: http://bugs.python.org/file35578/issue21725-fixed.patch

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-06-11 Thread Milan Oberkirch

Changes by Milan Oberkirch :


Added file: http://bugs.python.org/file35578/issue21725-fixed.patch

___
Python tracker 

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



[issue21728] Confusing error message when initialising type inheriting object.__init__

2014-06-11 Thread Gerrit Holl

New submission from Gerrit Holl:

When I initialise a class that doesn't define its own __init__, but I still 
pass arguments, the error message is confusing:

>>> class A: pass
... 
>>> A(42)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: object() takes no parameters

Although it is correct that object() takes no parameters, it would be more 
correct to state that A() does not take any parameters.

--
components: Interpreter Core
messages: 220313
nosy: Gerrit.Holl
priority: normal
severity: normal
status: open
title: Confusing error message when initialising type inheriting object.__init__
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-06-11 Thread Milan Oberkirch

Milan Oberkirch added the comment:

I merged it into https://bitbucket.org/zvyn/cpython and made a diff from that. 
(I used bash for this so hopefully its compatible to the review system here.)

--
Added file: http://bugs.python.org/file35577/issue21725.patch

___
Python tracker 

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



[issue20577] IDLE: Remove FormatParagraph's width setting from config dialog

2014-06-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

'yes!' meant please do so.

--

___
Python tracker 

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



[issue20580] IDLE should support platform-specific default config defaults

2014-06-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am not completely sure what you are asking. Config-keys.def has 4 Idle 
Classic sections, one each for Windows, Unix, Mac (still needed?), and OSX. On 
my Windows install, the one for Windows is preselected. I have presumed the the 
appropriate selections are made for other systems. If so, your opening sentence 
'provide different default settings depending on which platform it is running,' 
would be true already. If not, that would be a bug.

ConfigHandler.IdleConf.GetCoreKeys has hard-coded backups that probably work on 
Windows and Unix but not Max/OSX. I don't know if the 'Alt' to 'Option' 
replacement is applied to these are not.

If 'Alt' to 'Option' is insufficient for key bindings in config-extensions.def, 
I don't know what the answer is. Non-mac extension writers are unlikely to know 
what else to do.

Can any of the editing of Mac/Makefile be moved into runtime?

In "all versions by default share the same user configuration files", does 
versions mean 2.7, 3.4, 3.5 on one machine? If so, the statement describes a 
great feature that I would not change. If 'versions' means Windows Idle on one 
machine and OSX Idle on another machine, then the statement make no sense to me 
as we do not deliver user configuration files. If you mean multiple OS versions 
on the same machine, and it is possible to login as the same user with 
different Oses (I have no idea if this is so), then I could see a problem.

--
stage:  -> test needed
type:  -> enhancement
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue634412] RFC 2387 in email package

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

It is a clever idea, and might be worth considering, but it doesn't feel 
natural to have to specify the attachments before the html.  What I'd really 
like is an API that hides the messy details of the RFC from the library user, 
and I haven't thought of anything I'm satisfied with yet.  Specifically, it 
would be great if the 'keys' could be specially formatted strings ("@mypicid1@" 
or something like that) and the helper would automatically replace them with 
cids in both the html and the attachments.

It would probably be worth taking this discussion to the email-sig mailing list.

--

___
Python tracker 

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



[issue21713] a mistype comment in PC/pyconfig.h

2014-06-11 Thread Zachary Ware

Changes by Zachary Ware :


--
assignee:  -> zach.ware
type: compile error -> enhancement
versions: +Python 3.4

___
Python tracker 

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

OK, I think this is fixed.

--
status: open -> closed

___
Python tracker 

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



[issue21713] a mistype comment in PC/pyconfig.h

2014-06-11 Thread Zachary Ware

Zachary Ware added the comment:

Fixed, thanks for the report!

--

___
Python tracker 

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



[issue21713] a mistype comment in PC/pyconfig.h

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 61a00b7eac5d by Zachary Ware in branch '3.4':
Issue #21713: Fix typo in a comment.  Found by Joseph Shen.
http://hg.python.org/cpython/rev/61a00b7eac5d

New changeset b94384c4f9d0 by Zachary Ware in branch 'default':
Closes #21713: Merge with 3.4
http://hg.python.org/cpython/rev/b94384c4f9d0

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9b0d58b0c712 by R David Murray in branch 'default':
#14758: Fix the fix (fix getaddrinfo in mock_socket)
http://hg.python.org/cpython/rev/9b0d58b0c712

--

___
Python tracker 

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



[issue21722] teach distutils "upload" to exit with code != 0 when error occurs

2014-06-11 Thread Ned Deily

Changes by Ned Deily :


--
components: +Distutils
nosy: +dstufft, eric.araujo

___
Python tracker 

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



[issue21520] Erroneous zipfile test failure if the string 'bad' appears in pwd

2014-06-11 Thread Ned Deily

Ned Deily added the comment:

Yep

--

___
Python tracker 

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



[issue21716] 3.4.1 download page link for OpenPGP signatures has no sigs

2014-06-11 Thread Ned Deily

New submission from Ned Deily:

Can you be more specific as to which page?  I see valid links to GPG sigs on 
this page:

https://www.python.org/downloads/release/python-341/

Note that issues with the python.org website should be reported to its tracker:

https://github.com/python/pythondotorg/issues

--
nosy: +ned.deily

___
Python tracker 

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d8e0fca7cbe3 by R David Murray in branch 'default':
#14758: Need to specify the desired socket type in the getaddrinfo call.
http://hg.python.org/cpython/rev/d8e0fca7cbe3

--

___
Python tracker 

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



[issue21712] fractions.gcd failure

2014-06-11 Thread Tim Peters

Tim Peters added the comment:

@pacosta, if Mark's answer is too abstract, here's a complete session showing 
that the result you got for gcd(2.7, 107.3) is in fact exactly correct:

>>> import fractions
>>> f1 = fractions.Fraction(2.7)
>>> f2 = fractions.Fraction(107.3)
>>> f1
Fraction(3039929748475085, 1125899906842624) # the true value of "2.7"
>>> f2
Fraction(7550566250263347, 70368744177664)   # the true value of "107.3"
>>> fractions.gcd(f1, f2)  # computed exactly with rational arithmetic
Fraction(1, 1125899906842624)
>>> float(_)
8.881784197001252e-16

But this will be surprising to most people, and probably useless to all people. 
 For that reason, passing non-integers to gcd() is simply a Bad Idea ;-)

--

___
Python tracker 

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



[issue21727] Ambiguous sentence explaining `cycle` in itertools documentation

2014-06-11 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +rhettinger
versions:  -Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue21712] fractions.gcd failure

2014-06-11 Thread Pablo Acosta

Pablo Acosta added the comment:

Understood and agreed. My bad too for not reading the documentation more 
carefully. Thank you for the detailed explanation.

Pablo

> On Jun 11, 2014, at 2:52 PM, Tim Peters  wrote:
> 
> 
> Tim Peters added the comment:
> 
> @pacosta, if Mark's answer is too abstract, here's a complete session showing 
> that the result you got for gcd(2.7, 107.3) is in fact exactly correct:
> 
 import fractions
 f1 = fractions.Fraction(2.7)
 f2 = fractions.Fraction(107.3)
 f1
> Fraction(3039929748475085, 1125899906842624) # the true value of "2.7"
 f2
> Fraction(7550566250263347, 70368744177664)   # the true value of "107.3"
 fractions.gcd(f1, f2)  # computed exactly with rational arithmetic
> Fraction(1, 1125899906842624)
 float(_)
> 8.881784197001252e-16
> 
> But this will be surprising to most people, and probably useless to all 
> people.  For that reason, passing non-integers to gcd() is simply a Bad Idea 
> ;-)
> 
> --
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

Hmm.  Looks like the IPv6 support is making the FreeBSD and and OSX buildbots 
unhappy :(.

--
status: closed -> open

___
Python tracker 

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



[issue21727] Ambiguous sentence explaining `cycle` in itertools documentation

2014-06-11 Thread Matt Deacalion Stevens

New submission from Matt Deacalion Stevens:

https://docs.python.org/3.5/library/itertools.html#itertools.cycle

The first sentence sounds a bit ambiguous:
"Make an iterator returning elements from the iterable and saving a copy of 
each."

Suggestion:
"Make an iterator that returns elements from the iterable and saves a copy of 
each."

--
assignee: docs@python
components: Documentation
messages: 220298
nosy: Matt.Deacalion.Stevens, docs@python
priority: normal
severity: normal
status: open
title: Ambiguous sentence explaining `cycle` in itertools documentation
versions: 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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19840] shutil.move(): Add ability to use custom copy function to allow to ignore metadata

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

Thanks, Claudiu.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue19840] shutil.move(): Add ability to use custom copy function to allow to ignore metadata

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0d61a2a50f9f by R David Murray in branch 'default':
#19840: Add copy_function to shutil.move.
http://hg.python.org/cpython/rev/0d61a2a50f9f

--
nosy: +python-dev

___
Python tracker 

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



[issue21726] Unnecessary line in documentation

2014-06-11 Thread Reid Price

New submission from Reid Price:

https://docs.python.org/2/distutils/examples.html#pure-python-distribution-by-package

Chrome on Linux

The last (parenthetical) sentence is not needed.

  "(Again, the empty string in package_dir stands for the current directory.)"

because there is no package_dir option in the example.

< Preceding Text >
  ...

If you have sub-packages, they must be explicitly listed in packages, but any 
entries in package_dir automatically extend to sub-packages. (In other words, 
the Distutils does not scan your source tree, trying to figure out which 
directories correspond to Python packages by looking for __init__.py files.) 
Thus, if the default layout grows a sub-package:

/
setup.py
foobar/
 __init__.py
 foo.py
 bar.py
 subfoo/
   __init__.py
   blah.py
then the corresponding setup script would be

from distutils.core import setup
setup(name='foobar',
  version='1.0',
  packages=['foobar', 'foobar.subfoo'],
  )

(Again, the empty string in package_dir stands for the current directory.)

--
assignee: docs@python
components: Documentation
messages: 220295
nosy: Reid.Price, docs@python
priority: normal
severity: normal
status: open
title: Unnecessary line in documentation
type: enhancement

___
Python tracker 

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



[issue21711] Remove site-python support

2014-06-11 Thread Zachary Ware

Zachary Ware added the comment:

Seems fine on Windows (especially since it doesn't look like site-python ever 
meant anything on Windows in the first place)!

--

___
Python tracker 

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



[issue21536] extension built with a shared python cannot be loaded with a static python

2014-06-11 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Martin, what do you think about the aforementioned use case?

--

___
Python tracker 

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



[issue14102] argparse: add ability to create a man page

2014-06-11 Thread Thomas Guettler

Changes by Thomas Guettler :


--
nosy:  -guettli

___
Python tracker 

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1efbc86a200a by R David Murray in branch 'default':
#14758: add IPv6 support to smtpd.
http://hg.python.org/cpython/rev/1efbc86a200a

--
nosy: +python-dev

___
Python tracker 

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



[issue21696] Idle: test configuration files

2014-06-11 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: Idle: test syntax of configuration files -> Idle: test configuration 
files

___
Python tracker 

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

Thanks, Milan.  I had to fix a couple things: you had left the "refactored" 
methods on the SMTPDServerTest, and somehow your new TestFamilyDetection class 
got indented under SMTPDServerTest in the new version of the patch.  (I also 
had to update it to compensate for the decode_data patch, which copy-and-pasted 
the DummyServer calling bugs you fixed in the other tests...)

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue21711] Remove site-python support

2014-06-11 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks Ned, I'm hoping someone can give it a run under Windows too :)

--
nosy: +steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-11 Thread Yury Selivanov

Yury Selivanov added the comment:

FWIW, this can also be resolved by fixing Queue.full to do "self.qsize() >= 
self._maxsize" instead of "self.qsize() == self._maxsize".

I generally don't like implicit casts as they break duck typing.

--

___
Python tracker 

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



[issue14102] argparse: add ability to create a man page

2014-06-11 Thread Oz Tiram

Oz Tiram added the comment:

Hi, 

I have been wanting this feature for quite a long time. IMHO, binaries and 
scripts should always include a man page. The Debian developers require that. 
However, man pages have a 'bizarre' format. 
Long talk, short time. I did implement something. I tested it on Python 2.7 
since my project currently only supports Python 2.7. 
I think it should not be complicated to port to Python 3.X. 

I doubt if the correct place for formatting a man page should be in argparse.py 
itself. My solution is an extension of Andial's brecht solution that uses 
ofcourse argparse.

You can see it in action in https://github.com/pwman3/pwman3

I am also attaching the code here. 

I hope you will find this file useful. I would appreciate your comments too. 

Regards, 
Oz

--
nosy: +Oz.Tiram
versions: +Python 2.7 -Python 3.3
Added file: http://bugs.python.org/file35576/build_manpage.py

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-06-11 Thread R. David Murray

Changes by R. David Murray :


Removed file: http://bugs.python.org/file35575/80ea1cdf2b23.diff

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-06-11 Thread R. David Murray

Changes by R. David Murray :


--
hgrepos:  -256

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

Milan: your patch looks good for the most part.  Now that I committed the 
decode_data patch you should modify it so that SMTPUTF8 implies 
decode_data=False (otherwise we *don't* have an 8-bit-clean channel).  Please 
either attach the modified patch here or link the repository such that the 
patch can be generated (for rietveld review).

I'll need to play with it for a bit to make sure there's nothing more needed.

--

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-06-11 Thread R. David Murray

Changes by R. David Murray :


--
keywords: +patch
Added file: http://bugs.python.org/file35575/80ea1cdf2b23.diff

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-06-11 Thread R. David Murray

Changes by R. David Murray :


--
hgrepos: +256

___
Python tracker 

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



[issue20577] IDLE: Remove FormatParagraph's width setting from config dialog

2014-06-11 Thread Tal Einat

Tal Einat added the comment:

I'll be damned. 72 it is, then.

What about using the 'default' parameter for GetOption() instead of "or 72"?

--

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-06-11 Thread R. David Murray

New submission from R. David Murray:

I thought there was already an issue for this, but I can't find it.  This is 
part of this summer's GSOC work, and involves adding support for the SMTPUTF8 
extension to smtpd.

--
components: email
messages: 220285
nosy: barry, jesstess, pitrou, r.david.murray, zvyn
priority: normal
severity: normal
stage: patch review
status: open
title: RFC 6531 (SMTPUTF8) support in smtpd
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue19662] smtpd.py should not decode utf-8

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a6c846ec5fd3 by R David Murray in branch 'default':
#19662: Eliminate warnings in other test modules that use smtpd.
http://hg.python.org/cpython/rev/a6c846ec5fd3

--

___
Python tracker 

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



[issue21205] Add __qualname__ attribute to Python generators and change default __name__

2014-06-11 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +pitrou

___
Python tracker 

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



[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-11 Thread STINNER Victor

STINNER Victor added the comment:

It looks strange to use a float as maxsize. I suggest to raise a TypeError in 
the constructor if the type is not int, or maybe to cast maxsize parameter to 
an int.

--

___
Python tracker 

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



[issue21724] resetwarnings doesn't reset warnings registry

2014-06-11 Thread Antoine Pitrou

New submission from Antoine Pitrou:

There seems to be no (official) way to reset the warnings registry; in 
particular, resetwarnings() doesn't reset it. It makes it difficult to get 
repeatable warning messages, e.g. at the command prompt, because the shortcut 
path will silence messages which were already emitted, even if the filter have 
been changed to "always" in-between.

--
messages: 220282
nosy: brett.cannon, eric.snow, ncoghlan, pitrou
priority: normal
severity: normal
status: open
title: resetwarnings doesn't reset warnings registry
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue20577] IDLE: Remove FormatParagraph's width setting from config dialog

2014-06-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

"For flowing long blocks of text with fewer structural restrictions (docstrings 
or comments), the line length should be limited to 72 characters."

--

___
Python tracker 

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



[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-11 Thread Vajrasky Kok

New submission from Vajrasky Kok:

import asyncio

loop = asyncio.get_event_loop()
q = asyncio.Queue(maxsize=1.2, loop=loop)
q.put_nowait(1)
q.put_nowait(1)
q.put_nowait(1)
q.put_nowait(1)
q.put_nowait(1)
 and so on

It seems counter intuitive for my innocent eyes. As comparison with the 
traditional queue:

import queue
q = queue.Queue(maxsize=1.2)
q.put(1)
q.put(1)
q.put(1) -> blocking

Here is the patch to make the behaviour consistent with its sibling.

--
components: asyncio
files: asyncio_queue_accept_handles_maxsize.patch
keywords: patch
messages: 220280
nosy: gvanrossum, haypo, vajrasky, yselivanov
priority: normal
severity: normal
status: open
title: Float maxsize is treated as infinity in asyncio.Queue
type: behavior
versions: Python 3.5
Added file: 
http://bugs.python.org/file35574/asyncio_queue_accept_handles_maxsize.patch

___
Python tracker 

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



[issue19662] smtpd.py should not decode utf-8

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

Thanks, Maciej. 

I tweaked the patch a bit, you might want to take a look just for your own 
information.  Mostly I fixed the warning stuff, which I didn't explain very 
well.  The idea is that if the default is used (no value is specified), we want 
there to be a warning.  But if a value *is* specified, there should be no 
warning (the user knows what they want).  To accomplish that we make the actual 
default value None, and check for that.  I also had to modify the tests so that 
warnings aren't issued, as well as test that they actually get issued when the 
default is used.

I also added versionchanged directives and a whatsnew entry, and expanded the 
decode_data docs a bit.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue21722] teach distutils "upload" to exit with code != 0 when error occurs

2014-06-11 Thread Martin Dengler

New submission from Martin Dengler:

This patch teaches distutils/command/upload.py to return a non-zero exit code 
when uploading fails.  Currently a zero error code is returned (specifically, 
no Exception is raised by upload.run(...)) regardless of the HTTP response from 
the server or any socket error during that conversation.

Should be applied against tip.

Thanks.

--
components: Library (Lib)
files: cpython-patch-Lib-distutils-command-upload.py.patch
keywords: patch
messages: 220276
nosy: mdengler
priority: normal
severity: normal
status: open
title: teach distutils "upload" to exit with code != 0 when error occurs
versions: Python 2.7, Python 3.5
Added file: 
http://bugs.python.org/file35572/cpython-patch-Lib-distutils-command-upload.py.patch

___
Python tracker 

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



[issue19662] smtpd.py should not decode utf-8

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4e22213ca275 by R David Murray in branch 'default':
#19662: add decode_data to smtpd so you can get at DATA in bytes form.
http://hg.python.org/cpython/rev/4e22213ca275

--
nosy: +python-dev

___
Python tracker 

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



[issue21722] teach distutils "upload" to exit with code != 0 when error occurs

2014-06-11 Thread Martin Dengler

Martin Dengler added the comment:

The attached file is a patch for backporting this fix to 2.7.7.

--
Added file: 
http://bugs.python.org/file35573/cpython2-patch-Lib-distutils-command-upload.py.patch

___
Python tracker 

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



[issue21205] Add __qualname__ attribute to Python generators and change default __name__

2014-06-11 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Add a name to Python generators -> Add __qualname__ attribute to Python 
generators and change default __name__

___
Python tracker 

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



[issue21719] Returning Windows file attribute information via os.stat()

2014-06-11 Thread STINNER Victor

STINNER Victor added the comment:

> Instead of the somewhat cryptic name "winattrs", I suggest to call it 
> st_file_attributes (...)

On Windows, os.stat() calls GetFileInformationByHandle() which fills a 
BY_HANDLE_FILE_INFORMATION structure, and this structure has a dwFileAttributes 
attribute. The os.stat() calls also GetFileType().
http://msdn.microsoft.com/en-us/library/windows/desktop/aa364952%28v=vs.85%29.aspx

So I agree that os.stat().st_file_attributes is less surprising for Windows 
developers and it is more homogenous with FILE_ATTRIBUTE_xxx constants.

--
nosy: +haypo

___
Python tracker 

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



[issue21719] Returning Windows file attribute information via os.stat()

2014-06-11 Thread Ben Hoyt

Ben Hoyt added the comment:

Fair call -- "st_file_attributes" sounds good to me, and matches the prefix of 
the FILE_ATTRIBUTES_* constants better too.

--

___
Python tracker 

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



[issue21205] Add a name to Python generators

2014-06-11 Thread STINNER Victor

STINNER Victor added the comment:

gen_qualname.patch: add a new "__qualname__" attribute to generators and change 
how the name is set: use the name of the function, instead of using the name of 
the code.

Incompatible changes of this patch:

- repr(generator) now shows the qualified name instead of the name
- generator name comes from the function name which may be different

If the function has a name different than the code (if the function name was 
changed, for example by @functools.wraps), the generator now gets the name from 
the function, no more from the code object. IMO it's the expected behaviour, 
and it's more useful.

I'm writing on email to python-dev to discuss these changes.

--
keywords: +patch
title: Unable to make decorated generator object to inherit generator 
function's __name__ -> Add a name to Python generators
Added file: http://bugs.python.org/file35571/gen_qualname.patch

___
Python tracker 

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



[issue21719] Returning Windows file attribute information via os.stat()

2014-06-11 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Instead of the somewhat cryptic name "winattrs", I suggest to call it 
st_file_attributes, as it is called in the Windows API (actually, 
GetFileAttributesEx calls it dwFileAttributes, but st_file_attributes could be 
considered a Pythonic spelling of that).

--
nosy: +loewis

___
Python tracker 

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



[issue21696] Idle: test syntax of configuration files

2014-06-11 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

Attaching a patch to test the default configuration files. config-keys.def will 
be added once the issues related to it[1] are resolved.
In this patch, test that the configHandler module can successfully extract the 
values. For places where numeric values are expected, ensure that the values 
are correct. For strings, it only ensures that the values are reasonably 
correct.





[1] https://mail.python.org/pipermail/idle-dev/2014-June/003431.html

--
keywords: +patch
Added file: http://bugs.python.org/file35570/test-configuration.diff

___
Python tracker 

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



[issue21721] socket.sendfile() should use TransmitFile on Windows

2014-06-11 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola':

This is a follow up of issue 17552 which adds a new socket.sendfile() method 
taking advantage of high-performance os.sendfile() on UNIX.
The same thing could be done for Windows by using TransmitFile:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms740565(v=vs.85).aspx

--
messages: 220270
nosy: akira, asvetlov, christian.heimes, giampaolo.rodola, gvanrossum, 
josh.rosenberg, josiah.carlson, neologix, pitrou, python-dev, rosslagerwall, 
yselivanov
priority: normal
severity: normal
stage: needs patch
status: open
title: socket.sendfile() should use TransmitFile on Windows
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue21714] Path.with_name can construct invalid paths

2014-06-11 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I think raising ValueError is the way to go. Would you like to try writing a 
patch for it?

--
nosy: +pitrou
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue21718] sqlite3 cursor.description seems to rely on incomplete statement parsing for detection

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

It is true that the sqlite interface does not support WITH currently.  It is an 
interesting question whether or not we could change this as a bug fix or 
not...I suppose it depends on whether or not it changes any behavior other than 
making .description work.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue21720] "TypeError: Item in ``from list'' not a string" message

2014-06-11 Thread David Szotten

New submission from David Szotten:

```
>>> __import__('fabric.', fromlist=[u'api'])
Traceback (most recent call last):
  File "", line 1, in 
```

accidentally ended up with something like this via some module that was using 
`unicode_literals`. stumped me for a second until i realised that my variable 
was a string, but not `str`. would be nice with a custom error message if this 
is a unicode string, explicitly mentioning that these must not be unicode or 
similar

--
messages: 220267
nosy: davidszotten
priority: normal
severity: normal
status: open
title: "TypeError: Item in ``from list'' not a string"  message
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue21719] Returning Windows file attribute information via os.stat()

2014-06-11 Thread Ben Hoyt

New submission from Ben Hoyt:

I asked recently on python-dev [1] about adding a "st_winattrs" attribute to 
stat result objects on Windows, to return the full set of Windows file 
attribute bits, such as "hidden" or "compressed" status. Copying from that 
thread for a bit more context here:

Python's os.stat() simply discards most of the file attribute
information fetched via the Win32 system calls. On Windows, os.stat()
calls CreateFile to open the file and get the dwFileAttributes value,
but it throws it all away except the FILE_ATTRIBUTE_DIRECTORY and
FILE_ATTRIBUTE_READONLY bits. See CPython source at [2].

Given that os.stat() returns extended, platform-specific file
attributes on Linux and OS X platforms (for example,
st_blocks, st_rsize, etc), it seems that Windows is something of a
second-class citizen here.

There are several questions on StackOverflow about how to get this
information on Windows, and one has to resort to ctypes. For example,
[3].

To solve this problem, I think we should add a "st_winattrs" attribute to the 
object returned by os.stat() on
Windows. And we should add the relevant Win32 FILE_ATTRIBUTE_* constants to the 
"stat" module.

Then, similarly to existing code like hasattr(st, 'st_blocks') on
Linux, you could write a cross-platform function to determine if a
file was hidden, something like so:

def is_hidden(path):
if startswith(os.path.basename(path), '.'):
return True
st = os.stat(path)
return getattr(st, 'st_winattrs', 0) & FILE_ATTRIBUTE_HIDDEN != 0

There was general support for this idea on python-dev (see [4] [5] [6]), so I'd 
love to see this in Python 3.5.

Basically we need to add a "st_winattrs" integer attribute to the win32_stat 
struct in posixmodule.c and add the FILE_ATTRIBUTE_* constants to _stat.c, as 
well as adding Windows-specific tests and documentation.

I've never compiled CPython on Windows, but I aim to provide a patch for this 
at some stage soonish. Feedback and other patches welcome in the meantime. :-)

[1] https://mail.python.org/pipermail/python-dev/2014-June/134990.html
[2] https://github.com/python/cpython/blob/master/Modules/posixmodule.c#L1462
[3] http://stackoverflow.com/a/6365265
[4] https://mail.python.org/pipermail/python-dev/2014-June/134993.html
[5] https://mail.python.org/pipermail/python-dev/2014-June/135006.html
[6] https://mail.python.org/pipermail/python-dev/2014-June/135007.html

--
components: Library (Lib)
messages: 220266
nosy: benhoyt, ethan.furman, zach.ware
priority: normal
severity: normal
status: open
title: Returning Windows file attribute information via os.stat()
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue21693] Broken link to Pylons in the HOWTO TurboGears documentation

2014-06-11 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Fixed these. Thanks for the report.

--
nosy: +orsenthil
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue21693] Broken link to Pylons in the HOWTO TurboGears documentation

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9438a8aa3622 by Senthil Kumaran in branch '2.7':
#21693 - Fix the broken link for pylons project.
http://hg.python.org/cpython/rev/9438a8aa3622

New changeset 08fa17130fb3 by Senthil Kumaran in branch '3.4':
#21693 - Fix the broken link for pylons project.
http://hg.python.org/cpython/rev/08fa17130fb3

--
nosy: +python-dev

___
Python tracker 

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



[issue21718] sqlite3 cursor.description seems to rely on incomplete statement parsing for detection

2014-06-11 Thread mike bayer

New submission from mike bayer:

Per DBAPI and pysqlite docs, .description must be available for any SELECT 
statement regardless of whether or not rows are returned.  However, this fails 
for SELECT statements that aren't simple "SELECT"s, such as those that use CTEs 
and therefore start out with "WITH:":

import sqlite3
conn = sqlite3.connect(":memory:")

cursor = conn.cursor()
cursor.execute("""
create table foo (id integer primary key, data varchar(20))
""")

cursor.execute("""
insert into foo (id, data) values (10, 'ten')
""")

cursor.execute("""
with bar as (select * from foo)
select * from bar where id = 10
""")

assert cursor.description is not None


cursor.execute("""
with bar as (select * from foo)
select * from bar where id = 11
""")

assert cursor.description is not None


the second statement returns no rows and cursor.description is None.   
Libraries like SQLAlchemy which rely on this to determine that the statement 
supports fetchone() and similar are blocked.

--
components: Library (Lib)
messages: 220263
nosy: zzzeek
priority: normal
severity: normal
status: open
title: sqlite3 cursor.description seems to rely on incomplete statement parsing 
for detection
type: behavior

___
Python tracker 

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



[issue13559] Use sendfile where possible in httplib

2014-06-11 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Patch in attachment uses the newly added socket.sendfile() method (issue 17552).

--
keywords: +patch
type: enhancement -> performance
Added file: http://bugs.python.org/file35569/httplib-sendfile.patch

___
Python tracker 

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



[issue13564] ftplib and sendfile()

2014-06-11 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Updated patch which uses the newly added socket.sendfile() method (issue 17552).

--
assignee:  -> giampaolo.rodola
type: enhancement -> performance
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue13564] ftplib and sendfile()

2014-06-11 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


Added file: http://bugs.python.org/file35568/ftplib-sendfile5.patch

___
Python tracker 

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



[issue21712] fractions.gcd failure

2014-06-11 Thread Mark Dickinson

Mark Dickinson added the comment:

Agreed with Tim.

Oddly enough[1], remembering that with binary floating-point numbers, what you 
see is not what you get[2], it turns out that 8.881784197001252e-16 (= 
Fraction(1, 1125899906842624)) is in fact *exactly* the right answer, in that 
it's a generator for the additive subgroup of the rationals generated by 2.7 (= 
Fraction(3039929748475085, 1125899906842624)) and 107.3 
(=Fraction(7550566250263347, 70368744177664)).

[1] Actually not so odd, given that % is a perfectly exact operation when 
applied to two positive finite floats.
[2] https://docs.python.org/2/tutorial/floatingpoint.html

--

___
Python tracker 

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



[issue3068] IDLE - Add an extension configuration dialog

2014-06-11 Thread Tal Einat

Tal Einat added the comment:

Ned, many thanks for the review and detailed feedback!

Here are responses to your comments

1. Thanks for the code suggestion regarding the menudefs! That's a good catch. 
I have an OSX box for such testing.

2. I'll check this out. Could you perhaps explain or point me to resources 
regarding how to run IDLE with various Tk implementations on OSX?

3. Unfortunately, IDLE's config mechanism doesn't have special support for 
options with only several valid values, as would have been ideal for 
ParenMatch's "style" parameter. As it is, these are just considered strings, 
and no explicit error occurs if an invalid value is specified. Without 
upgrading the config mechanism itself, the config dialog has no way of 
supplying the valid values and/or validating user input of such values. This 
could be useful, but should be considered a separate issue IMO. I would be 
happy to add relevant support to the dialog once the underlying support is 
implemented.

4. Regarding having thing updated only on new windows or after restart, AFAIK 
that is currently the case with many options in the existing config dialog. 
Ideally the behavior would be consistent for all config options, and even more 
ideally all config changes would take effect immediately. However, that would 
require major changes to IDLE. Again, I think this is outside the scope of this 
issue.

5. I completely agree that the button for boolean options looks horrible. 
Suggestions for a better Tk widget to use are welcome!

Finally, regarding

--

___
Python tracker 

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



[issue21520] Erroneous zipfile test failure if the string 'bad' appears in pwd

2014-06-11 Thread Larry Hastings

Larry Hastings added the comment:

With this patch applied the test passes.  (Patch is against 3.4 branch.)  Look 
good?

--
keywords: +patch
Added file: http://bugs.python.org/file35567/larry.bad.zipfile.1.diff

___
Python tracker 

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



[issue21629] clinic.py --converters fails

2014-06-11 Thread Larry Hastings

Changes by Larry Hastings :


--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue21629] clinic.py --converters fails

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8b4b8f5d7321 by Larry Hastings in branch 'default':
Issue #21629: Merge from 3.4.
http://hg.python.org/cpython/rev/8b4b8f5d7321

--

___
Python tracker 

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



  1   2   >