[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 11a920a26f13 by Vinay Sajip in branch '3.4':
Issue #21709: Remove references to __file__ when part of a frozen application.
http://hg.python.org/cpython/rev/11a920a26f13

New changeset 149cc6364180 by Vinay Sajip in branch 'default':
Closes #21709: Merged fix from 3.4.
http://hg.python.org/cpython/rev/149cc6364180

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



[issue12989] Consistently handle path separator in Py_GetPath on Windows

2014-06-11 Thread STINNER Victor

STINNER Victor added the comment:

Hum, it would be nice to have a unit test for this change.

--

___
Python tracker 

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



[issue21703] IDLE: Test UndoDelegator

2014-06-11 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

It was WidgetRedirector which was leaking.
cls.percolator.redir.close() added in tearDownClass fixes the leak.

saimadhav@debian:~/dev/34-cpython$ ./python -m test -R :: -uall test_idle 
[1/1] test_idle
beginning 9 repetitions
123456789
.
1 test OK.

The attached patch also ensures that when UndoDelegator.py is run, unittest is 
called with exit=False, so that htest is run.
The htest display is also corrected, and works the same way as without 
unittest.(with correct buttons etc).

Only problem remaining is when UndoDelegator is run,


can't invoke "event" command:  application has been destroyed
while executing
"event generate $w <>"
(procedure "ttk::ThemeChanged" line 6)
invoked from within
"ttk::ThemeChanged"

--
Added file: 
http://bugs.python.org/file35564/test-undodelegator-refleak-fixed.diff

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

Changes by grossdm :


--
components: Windows
nosy: grossdm
priority: normal
severity: normal
status: open
title: 3.4.1 download page link for OpenPGP signatures has no sigs
type: 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



[issue21703] IDLE: Test UndoDelegator

2014-06-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Great. I will review the next patch (with the change in the comment) tomorrow. 
The ttk theme changed message comes up often. I believe it is specific to debug 
builds. Perhaps you could keep track of when it occurs so we can make a guess 
at the cause. I believe I asked Serhiy once and he did not then know why. I 
believe I grepped at least one of tkinter and _tkinter for ttk and did not fine 
anything. It does not cause buildbot failures, but may be involved with one of 
the warnings. It does suggest at least a minor bug, though, and it would be 
nice to fix.

The environment change warning, at least on windows, is probably from module 
tkinter._fix imported in tkinter.

--

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

What do you mean with the comment regarding pep8?

--

___
Python tracker 

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



[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Hi Vinaj,

thanks for the patch, but it doesn't really help outside of py2exe. The 
sys.frozen flag is not an official Python API and it's unlikely to become one, 
since you can freeze the whole application or just parts of it, which 
sys.frozen would not be able to address.

Instead, the modules in the stdlib should be aware of the fact that __file__ is 
not always available and provide fallback solutions.

Could you please use a fix that works for Python tools in general ?

E.g. instead of doing an equal test inf .findCaller() it may be better to use a 
regular expression or you could patch the __init__ module's co_filename into 
the module as _srcfile (after it's fully initialized).

Thanks.

--

___
Python tracker 

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2014-06-11 Thread Milan Oberkirch

Changes by Milan Oberkirch :


--
nosy: +jesstess
Added file: http://bugs.python.org/file35565/issue11783.patch

___
Python tracker 

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



[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Vinay Sajip

Vinay Sajip added the comment:

> Could you please use a fix that works for Python tools in general?

I suggested an alternative implementation altogether in Issue #16778, but it 
was suggested that we wait for frame annotations. I'm not sure what the 
schedule for that is.

> The sys.frozen flag is not an official Python API and it's unlikely to become 
> one

Would using imp.is_frozen('logging') rather than hasattr(sys, 'frozen') meet 
your requirement here? I'm not saying it's the ideal solution, but perhaps it 
will do until frame annotations arrive and we can avoid using filenames 
altogether?

--

___
Python tracker 

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



[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 11.06.2014 11:25, Vinay Sajip wrote:
> 
> Vinay Sajip added the comment:
> 
>> Could you please use a fix that works for Python tools in general?
> 
> I suggested an alternative implementation altogether in Issue #16778, but it 
> was suggested that we wait for frame annotations. I'm not sure what the 
> schedule for that is.
> 
>> The sys.frozen flag is not an official Python API and it's unlikely to 
>> become one
> 
> Would using imp.is_frozen('logging') rather than hasattr(sys, 'frozen') meet 
> your requirement here? I'm not saying it's the ideal solution, but perhaps it 
> will do until frame annotations arrive and we can avoid using filenames 
> altogether?

I don't think any of this is needed here. _srcfile is only used to
identify the caller's stack frame and needs to be set to the co_filename
of the stack frame used by the logging.__init__ module.

Here's a sketch of what I had hinted at in my last reply:

def _get_module_filename():
return getLogger.func_code.co_filename

You simply use the .co_filename attribute of one of the module's functions
to get useable value for __file__.

--

___
Python tracker 

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



[issue21717] Exclusive mode for ZipFile and TarFile

2014-06-11 Thread Antony Lee

New submission from Antony Lee:

I noticed that while lzma and bz2 already support the "x" (create a new file, 
raise if it already exists) flag, zipfile and tarfile don't know about it yet.  
It would be an useful addition, just as it is useful for regular open.

A quick look at both modules show that this likely only requires a little bit 
more than updating the checks in the corresponding constructors to allow "x" 
mode, as the modes are passed (nearly) transparently to the open() builtin.

--
components: Library (Lib)
messages: 220249
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Exclusive mode for ZipFile and TarFile
versions: 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



[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Vinay Sajip

Vinay Sajip added the comment:

> _srcfile is only used to identify the caller's stack frame

Not quite. It's also used to indicate whether findCaller() should be called at 
all: setting it to None avoids calling findCaller(), which might be desirable 
in some performance-sensitive scenarios.

So if you mean "just call _get_module_filename() instead of accessing 
_srcFile", that won't do. If you mean "set _srcFile to the return value of 
_get_module_filename()", that might work, if I e.g. move the _srcFile 
definition to after addLevelName (say) and do just

_srcFile = addLevelName.__code__.co_filename

How does that sound?

--

___
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

Larry Hastings added the comment:

Confirmed.

--
assignee:  -> larry
stage:  -> needs patch

___
Python tracker 

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



[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 11.06.2014 12:32, Vinay Sajip wrote:
> 
> Vinay Sajip added the comment:
> 
>> _srcfile is only used to identify the caller's stack frame
> 
> Not quite. It's also used to indicate whether findCaller() should be called 
> at all: setting it to None avoids calling findCaller(), which might be 
> desirable in some performance-sensitive scenarios.
> 
> So if you mean "just call _get_module_filename() instead of accessing 
> _srcFile", that won't do. If you mean "set _srcFile to the return value of 
> _get_module_filename()", that might work, if I e.g. move the _srcFile 
> definition to after addLevelName (say) and do just
> 
> _srcFile = addLevelName.__code__.co_filename
> 
> How does that sound?

That's what I meant, yes. Please also add some comment explaining
why this is done in this way.

FWIW: Given that __file__ is not always set, it may be worthwhile
introducing some generic helper to the stdlib which uses the
.co_filename attribute to get the compile time filename as fallback
in case __file__ is not set.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

--

___
Python tracker 

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2014-06-11 Thread Milan Oberkirch

Milan Oberkirch added the comment:

Here comes an updated patch based on 'email_address_idna.patch' without 
breaking smtplib (as the previous patches did).

--
Added file: http://bugs.python.org/file35566/issue11783-rdm-fixed.patch

___
Python tracker 

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



[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Vinay Sajip

Vinay Sajip added the comment:

> Please also add some comment explaining why this is done in this way.

Natürlich :-)

> it may be worthwhile introducing some generic helper to the stdlib

Wouldn't you have to pass in a function (or code object) from a specific 
module, though? It seems more logical to have __file__ set, even for frozen 
modules (after all, if it's there in a code object's co_filename, is there some 
reason it shouldn't be exposed as a module attribute? (Even though it isn't at 
the moment.)

--

___
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 6b2db7fc17f7 by Larry Hastings in branch '3.4':
Issue #21629: Fix Argument Clinic's "--converters" feature.
http://hg.python.org/cpython/rev/6b2db7fc17f7

--
nosy: +python-dev

___
Python tracker 

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



[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 11.06.2014 13:22, Vinay Sajip wrote:
> 
> Vinay Sajip added the comment:
> 
>> Please also add some comment explaining why this is done in this way.
> 
> Natürlich :-)

Prima :-)

>> it may be worthwhile introducing some generic helper to the stdlib
> 
> Wouldn't you have to pass in a function (or code object) from a specific 
> module, though? It seems more logical to have __file__ set, even for frozen 
> modules (after all, if it's there in a code object's co_filename, is there 
> some reason it shouldn't be exposed as a module attribute? (Even though it 
> isn't at the moment.)

Well, I guess passing in a reference to the module would suffice. The
function could then look around for functions, methods, etc. to find
a usable code object.

I agree that having a __file__ attribute in frozen modules would
be helpful, since it's obviously not widely known that this
attribute does not always exist (just grep the stdlib as example,
in particular the test suite).

The module object's PyModule_GetFilenameObject() even reports a missing
__file__ attribute as a SystemError.

Perhaps something to discuss on python-dev.

--

___
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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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



[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



[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



[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



[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

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



[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



[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



[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



[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



[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



[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



[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



[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

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

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

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 :


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

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



[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



[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



[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



[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



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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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



[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



[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



[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



[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



[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



[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



[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



[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

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



[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



[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



[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



[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



[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

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



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



[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



[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



[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



[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



[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



[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



[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



[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




[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



  1   2   >