[issue22107] tempfile module misinterprets access denied error on Windows

2014-08-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
type:  - behavior
versions: +Python 3.5

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



[issue22121] IDLE should start with HOME as the initial working directory

2014-08-02 Thread Mark Summerfield

New submission from Mark Summerfield:

On Windows IDLE's working directory is Python's install directory, e.g., 
C:\Python34. ISTM that this is the wrong directory for 99% of general users and 
for 100% of beginners since this is _not_ the directory where people should 
save their own .py files (unless they are experts, in which case they know 
better and won't anyway).

I think that IDLE should start out in the user's home directory (ideally on all 
platforms).

--
components: IDLE
messages: 224537
nosy: mark
priority: normal
severity: normal
status: open
title: IDLE should start with HOME as the initial working directory
type: enhancement
versions: Python 3.4, Python 3.5

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



[issue22122] turtle module examples should all begin from turtle import *

2014-08-02 Thread Mark Summerfield

New submission from Mark Summerfield:

The turtle module is aimed primarily at young beginners to Python. Making them 
type turtle.this and turtle.that all over the place is tedious and unhelpful.

At the start of the turtle docs there's a nice example that begins
from turtle import *
and the following code is all the better for it.

But none of the other examples do this. I realise that this would make the 
module's docs inconsistent, but given the target audience and given that we 
surely want to lower the barrier to entry, it would be a reasonable concession 
to make?

--
assignee: docs@python
components: Documentation
messages: 224538
nosy: docs@python, mark
priority: normal
severity: normal
status: open
title: turtle module examples should all begin from turtle import *
type: enhancement
versions: Python 3.4, Python 3.5

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



[issue22116] Weak reference support for C function objects

2014-08-02 Thread Anthony Kong

Changes by Anthony Kong anthony.hw.k...@gmail.com:


--
nosy: +Anthony.Kong

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



[issue22123] Make object() behave exactly like types.SimpleNamespace() if given kwargs

2014-08-02 Thread Mark Summerfield

New submission from Mark Summerfield:

Right now object() does not accept any args and returns the lightest possible 
featureless object (i.e., without even a __dict__).

This is great.

However, it is really useful sometimes to be able to create an object to hold 
some editable state (so not a namedtuple). Right now this can be done with 
types.SimpleNamespace().

I think it would be a useful enhancement to have object() work as it does now, 
but to allow it to accept kwargs in which case it would provide identical 
functionality to types.SimpleNamespace().

This arises from an email I wrote to the python mailinglist:
https://groups.google.com/d/msg/comp.lang.python/9pY7hLp8lDg/voYF8nMO6x8J

But I also think it would be useful more generally.

--
components: Interpreter Core
messages: 224539
nosy: mark
priority: normal
severity: normal
status: open
title: Make object() behave exactly like types.SimpleNamespace() if given kwargs
type: enhancement
versions: Python 3.5

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



[issue22120] Fix compiler warnings

2014-08-02 Thread STINNER Victor

STINNER Victor added the comment:

It would be better to only modify clinic for unsigned types, but how do you
check if a type is signed or not?

--

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



[issue22116] Weak reference support for C function objects

2014-08-02 Thread Stefan Behnel

Stefan Behnel added the comment:

FWIW, functions in Cython (which C-level-inherit from PyCFunction) support weak 
references just fine. Adding that as a general feature to PyCFunction sounds 
like the right thing to do.

--
nosy: +scoder

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



[issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars

2014-08-02 Thread Daniel Eriksson

Daniel Eriksson added the comment:

Added Matt Behrens test to Lars Gustäbel 2.7 version.

--
nosy: +dan...@starstable.com
Added file: http://bugs.python.org/file36202/issue21987_py2.7_with_test.patch

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



[issue22120] Fix compiler warnings

2014-08-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Either override render() for unsigned type converters, or add new converter 
attribute (in additional to type, cast, conversion_fn, etc).

--

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



[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-08-02 Thread Daniel Eriksson

Daniel Eriksson added the comment:

Tested and it works fine on CentOS 6.4 in 2.7, 3.4 and 3.5

--
nosy: +dan...@starstable.com, ezio.melotti

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



[issue19996] httplib infinite read on invalid header

2014-08-02 Thread Jason Robinson

Jason Robinson added the comment:

I took the patches and verified that;

* running the new tests without the changed code in Lib/email/feedparser.py 
(head) and Lib/httplib.py, Lib/rfc822.py (2.7) fails both the new tests.
* running the new tests with the changed code passes the tests (on both head 
and 2.7).

Sainsburys Bank site seems to have been fixed thus verification in the first 
comment does not work - but the test I think emulates that well enough.

--
nosy: +ezio.melotti, jaywink
versions: +Python 3.5

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



[issue21697] shutil.copytree() handles symbolic directory incorrectly

2014-08-02 Thread Daniel Eriksson

Daniel Eriksson added the comment:

I have tested both patches on CentOS 6.4 and Eduardo Seabra:s patch works 
correctly with symlinks=True

--
nosy: +dan...@starstable.com

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



[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-08-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I've got it from here.

--

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



[issue17762] platform.linux_distribution() should honor /etc/os-release

2014-08-02 Thread Jason Robinson

Jason Robinson added the comment:

platform.linux_distribution is being deprecated in 3.5 and removed in 3.6 as 
stated in comment http://bugs.python.org/issue1322#msg207427 in issue #1322

I'm guessing this issue should be closed when that patch is merged in?

--
nosy: +jaywink

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



[issue9514] platform.linux_distribution() under Ubuntu returns ('debian', 'squeeze/sid', '')

2014-08-02 Thread Jason Robinson

Jason Robinson added the comment:

platform.linux_distribution is being deprecated in 3.5 and removed in 3.6 as 
stated in comment http://bugs.python.org/issue1322#msg207427 in issue #1322

I'm guessing this issue should be closed when that patch is merged in?

--
nosy: +ezio.melotti, jaywink

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



[issue22120] Fix compiler warnings

2014-08-02 Thread Charles-François Natali

Charles-François Natali added the comment:

This patch should probably be moved to its own issue.

--

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



[issue15114] Deprecate strict mode of HTMLParser

2014-08-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0e2e47c1f205 by Ezio Melotti in branch 'default':
#15114: the strict mode and argument of HTMLParser, HTMLParser.error, and the 
HTMLParserError exception have been removed.
http://hg.python.org/cpython/rev/0e2e47c1f205

--

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



[issue15114] Deprecate strict mode of HTMLParser

2014-08-02 Thread Ezio Melotti

Ezio Melotti added the comment:

3.5 is done.
Closing.

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

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



[issue22112] '_UnixSelectorEventLoop' object has no attribute 'create_task'

2014-08-02 Thread STINNER Victor

STINNER Victor added the comment:

Here is a a patch which replaces loop.create_task(coro) with 
asyncio.async(coro), mention that asyncio.async() can be used to scheduler a 
coroutine, and make it clear that create_task() is only available in Python 
3.4.2 and later.

Does it look better?

If it's possible, I would prefer to have exactly the same documentation in 
Python 3.4 and 3.5.

--
keywords: +patch
Added file: http://bugs.python.org/file36203/doc_create_task.patch

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



[issue20402] List comprehensions should be noted in for loop documentation

2014-08-02 Thread Alexander Grigorievskiy

Alexander Grigorievskiy added the comment:

I have added some clarification following Westley Martínez recommendation. I 
provided references to the list comprehensions and generator expressions. I 
tried to make the description short.

--
keywords: +patch
nosy: +AlexGrig
Added file: http://bugs.python.org/file36204/issue20402.diff

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



[issue22120] Fix compiler warnings

2014-08-02 Thread Charles-François Natali

Changes by Charles-François Natali cf.nat...@gmail.com:


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

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



[issue22120] Fix compiler warnings

2014-08-02 Thread STINNER Victor

STINNER Victor added the comment:

Hum, I forgot the attach the most important patch: fix_warnings.patch.

--
Added file: http://bugs.python.org/file36205/fix_warnings.patch

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



[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-02 Thread Tuikku Anttila

Tuikku Anttila added the comment:

Added to the documentation of zipfile.ZipFile.read() that the method will throw 
a NotImplementedError when the compression scheme of the ZipFile is something 
else than ZIP_STORED, ZIP_DEFLATED, ZIP_BZIP2 or ZIP_LZMA.

--
keywords: +patch
nosy: +Tuikku.Anttila
Added file: http://bugs.python.org/file36206/issue22046.patch

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



[issue14910] argparse: disable abbreviation

2014-08-02 Thread Daniel Eriksson

Daniel Eriksson added the comment:

Update the patch - issue_14910_3.diff
argparse.rst - merging conflicts

--
nosy: +dan...@starstable.com
Added file: http://bugs.python.org/file36207/issue_14910_3.diff

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



[issue22116] Weak reference support for C function objects

2014-08-02 Thread Wei Wu

Wei Wu added the comment:

I have made a patch related to this issue, please take a look at it. Thanks :)

--
nosy: +kilowu

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



[issue22116] Weak reference support for C function objects

2014-08-02 Thread Wei Wu

Changes by Wei Wu we...@cacheme.net:


--
keywords: +patch
Added file: http://bugs.python.org/file36208/22116.patch

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



[issue18859] README.valgrind should mention --with-valgrind

2014-08-02 Thread Sowmya

Sowmya added the comment:

Hi,

I have created a patch for this bug. 
The Misc/README.valgrind now mentions the --with-valgrind configure options.

--
keywords: +patch
nosy: +sowmya-ravidas
type: enhancement - 
Added file: http://bugs.python.org/file36209/patch.diff

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



[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-02 Thread Martin v . Löwis

Martin v. Löwis added the comment:

What problem does this solve?

--
nosy: +loewis

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



[issue22116] Weak reference support for C function objects

2014-08-02 Thread Stefan Behnel

Stefan Behnel added the comment:

Patch looks ok. Not sure about the test dependency from test_weakref.py to 
_testcapi, though. Is that module allowed to be used everywhere? Wouldn't it be 
enough to test that one of the builtin functions is now weak referencible? 
len seems to be used in other places, for example.

--

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



[issue21448] Email Parser use 100% CPU

2014-08-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Parser reads from input file small chunks (8192 churacters) and feed FeedParser 
which pushes data into BufferedSubFile. In BufferedSubFile.push() chunks of 
incomplete data are accumulated in a buffer and repeatedly scanned for 
newlines. Every push() has linear complexity from the size of accumulated 
buffer, and total complexity is quadratic.

Here is a patch which fixes problem with parsing long lines. Feel free to add 
comments if they are needed (there is an abundance of comments in the module).

--
keywords: +patch
Added file: http://bugs.python.org/file36210/email_parser_long_lines.patch

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



[issue21448] Email Parser use 100% CPU

2014-08-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage:  - patch review

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



[issue15907] move doctest test-data files into a subdirectory of Lib/test

2014-08-02 Thread Jason Robinson

Jason Robinson added the comment:

Here is a patch that hopefully does what was intended. All the tests passed 
locally, hopefully the tests we're adapted correctly to the new location of the 
files. My first patch :)

I added a new data file 'doctest_DocFileSuite_test.txt' to Lib/test to keep 
the test that tests that doctest.DocFileSuite loads files from calling module 
path. All the old files I moved to Lib/test/doctest and adapted tests to use 
them from there.

--
keywords: +patch
nosy: +ezio.melotti, jaywink
Added file: http://bugs.python.org/file36211/issue15907.patch

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



[issue7944] Use the 'with' statement in conjunction with 'open' throughout test modules

2014-08-02 Thread Evans Mungai

Evans Mungai added the comment:

Backport for test_tarfile.py

--
nosy: +evans.mungai
versions: +Python 2.7 -Python 3.3, Python 3.4
Added file: http://bugs.python.org/file36212/issue7944_tarfile_2_7.diff

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



[issue22024] Add to shutil the ability to wait until files are definitely deleted

2014-08-02 Thread Vivek Balakrishnan

Vivek Balakrishnan added the comment:

Patch that adds wait parameter to shutil.rmtree.

--
keywords: +patch
nosy: +Vivek.Balakrishnan
Added file: http://bugs.python.org/file36213/shutil_wait.patch

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



[issue22024] Add to shutil the ability to wait until files are definitely deleted

2014-08-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What if other program will create a file with same name in short time after 
deletion? Then rmtree() will hang in infinity loop.

--
nosy: +serhiy.storchaka

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



[issue14910] argparse: disable abbreviation

2014-08-02 Thread Eli Bendersky

Eli Bendersky added the comment:

Daniel, I left some comments in Rietveld. Also it doesn't seem that you 
addressed the previously left comments when you fixed up the patch.

--

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



[issue22024] Add to shutil the ability to wait until files are definitely deleted

2014-08-02 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti, loewis

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



[issue16037] httplib: header parsing is unlimited

2014-08-02 Thread Daniel Eriksson

Daniel Eriksson added the comment:

Updated the patch for 2.7 to raise HTTPException instead of a new Exception.

--
nosy: +clearminds
Added file: http://bugs.python.org/file36214/issue_16037_py27_v3.diff

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



[issue22024] Add to shutil the ability to wait until files are definitely deleted

2014-08-02 Thread Vivek Balakrishnan

Vivek Balakrishnan added the comment:

With respect to msg224566, is a default timeout a good solution?

--

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



[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-02 Thread STINNER Victor

STINNER Victor added the comment:

Tell me if you prefer to review shorter patches. I can try to only add new 
functions, then  use new functions, and finally remove new functions.

Oh, i should read what i wrote before pushing the submit button. The last
part isremove the old functions...

--

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



[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-02 Thread STINNER Victor

STINNER Victor added the comment:

Le samedi 2 août 2014, Martin v. Löwis rep...@bugs.python.org a écrit :


 What problem does this solve?


My patch detects overflows which are not detected yet. Currently i guess
that the behaviour on overflow is undefined. I should test each function.

I also want a nanosecond resolution. It's the same motivation than the PEP
410, except that the patch doesn't touch the Python API, I only care of the
C code which has fewer constraints (we don't need a full API). I expect
that C code is more concerned by the resolution because C code is faster.
You need to recompute timeout on EINTR (see the PEP 475 which is still a
draft). I don't want to loose precision and I want to round correctly.

My main usecase is to compute a timeout from two timestamps of a monotonic
clock.

IMO it's better to use PyTimeSpec structure everywhere to reuse the code
which is now well tested (by unit tests) and make the code more consistent.
For example, the datetime module rounds currently using the down method,
whereas it needs to round floor in fact. I saw this issue when I changed
the code to use PyTimeSpec in all functions.

I agree that my patch is large, especially the new code in pytime.c. I
would like to hide the complexity in functions, the API should be
simple. Do you think that changes in modules like time, socket or select
make the code more complex? I don't know if it's worth it.

--

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



[issue22024] Add to shutil the ability to wait until files are definitely deleted

2014-08-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

On Linux and some other systems there is an API which allow you to subscribe 
on notifications about file system events (in particular on deleting specified 
file). There are modules which provides Python interface to it (e.g. python-
inotify, inotifyx, pyinotify). May be there is similar API on Windows?

--

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



[issue18859] README.valgrind should mention --with-valgrind

2014-08-02 Thread Stefan Krah

Stefan Krah added the comment:

Hi Sowmya. Currently we have the option to use --with-valgrind or
the old method --without-pymalloc. Both methods work.

--
nosy: +skrah

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




[issue21047] html.parser.HTMLParser: convert_charrefs should become True by default

2014-08-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4425024f2e01 by Ezio Melotti in branch 'default':
#21047: set the default value for the *convert_charrefs* argument of HTMLParser 
to True.  Patch by Berker Peksag.
http://hg.python.org/cpython/rev/4425024f2e01

--
nosy: +python-dev

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



[issue15114] Deprecate strict mode of HTMLParser

2014-08-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5b95f3fdcc0b by Ezio Melotti in branch 'default':
#15114, #21047: update whatsnew in Python 3.5.
http://hg.python.org/cpython/rev/5b95f3fdcc0b

--

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



[issue21047] html.parser.HTMLParser: convert_charrefs should become True by default

2014-08-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5b95f3fdcc0b by Ezio Melotti in branch 'default':
#15114, #21047: update whatsnew in Python 3.5.
http://hg.python.org/cpython/rev/5b95f3fdcc0b

--

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



[issue22123] Make object() behave exactly like types.SimpleNamespace() if given kwargs

2014-08-02 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue22121] IDLE should start with HOME as the initial working directory

2014-08-02 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman

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



[issue22122] turtle module examples should all begin from turtle import *

2014-08-02 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman

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



[issue22123] Make object() behave exactly like types.SimpleNamespace() if given kwargs

2014-08-02 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman

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



[issue21047] html.parser.HTMLParser: convert_charrefs should become True by default

2014-08-02 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


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

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



[issue21448] Email Parser use 100% CPU

2014-08-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I'm looking at the patch today.

--
assignee:  - rhettinger
nosy: +rhettinger

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



[issue22123] Make object() behave exactly like types.SimpleNamespace() if given kwargs

2014-08-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This will be fragile because the behavior will be depend from the number of 
keyword argument. Hypothetic example:

 kwargs = {'a': 1}
 obj = object(**kwargs)
 obj.b = 2  # success
 kwargs = {}  # empty
 obj = object(**kwargs)
 obj.b = 2
Traceback (most recent call last):
  File stdin, line 1, in module
AttributeError: 'object' object has no attribute 'b'

For now you need only one or two line of code to declare new class.

 class Object: pass
... 
 obj = Object()
 obj.a = 1
 obj.b = 2

--
nosy: +serhiy.storchaka

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



[issue22121] IDLE should start with HOME as the initial working directory

2014-08-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

When I start IDLE (python -m idle) from my project directory I expect that it 
doesn't change current directory and I can access files in this directory by 
short relative name.

--
nosy: +serhiy.storchaka

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



[issue22112] '_UnixSelectorEventLoop' object has no attribute 'create_task'

2014-08-02 Thread Guido van Rossum

Guido van Rossum added the comment:

Looks good!

On Sat, Aug 2, 2014 at 4:19 AM, STINNER Victor rep...@bugs.python.org
wrote:


 STINNER Victor added the comment:

 Here is a a patch which replaces loop.create_task(coro) with
 asyncio.async(coro), mention that asyncio.async() can be used to scheduler
 a coroutine, and make it clear that create_task() is only available in
 Python 3.4.2 and later.

 Does it look better?

 If it's possible, I would prefer to have exactly the same documentation in
 Python 3.4 and 3.5.

 --
 keywords: +patch
 Added file: http://bugs.python.org/file36203/doc_create_task.patch

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue22112
 ___


--

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



[issue22121] IDLE should start with HOME as the initial working directory

2014-08-02 Thread Ethan Furman

Ethan Furman added the comment:

We should be able to add enough smarts to handle both cases.

--

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



[issue22123] Make object() behave exactly like types.SimpleNamespace() if given kwargs

2014-08-02 Thread Mark Lawrence

Mark Lawrence added the comment:

As a work around for the originator how about

 pyobject = object # keep reference to built-in.
 from types import SimpleNamespace as object
 help(object)
Help on class SimpleNamespace in module types:
...

???

--
nosy: +BreamoreBoy

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



[issue22121] IDLE should start with HOME as the initial working directory

2014-08-02 Thread Ned Deily

Ned Deily added the comment:

FWIW, on OS X when IDLE is launched from the Finder, for example by 
double-clicking on an IDLE icon, IDLE defaults to using the user's Documents 
folder as its working directory.  When IDLE is launched from a command line 
shell, it uses the current working directory.  Perhaps something similar can be 
done for Windows.

--
nosy: +ned.deily

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



[issue15826] Increased test coverage of test_glob.py

2014-08-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

GlobTests.glob() tests that glob() for bytes returns the same (encoded) result 
as glob() for string. Therefore this patch is not needed, it doesn't increase 
test coverage.

--
nosy: +serhiy.storchaka

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



[issue22121] IDLE should start with HOME as the initial working directory

2014-08-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The same is on Linux. Therefore this is Windows only issue.

--
components: +Windows

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



[issue22124] Rotating items of list to left

2014-08-02 Thread Sai Krishna G

New submission from Sai Krishna G:

Hi, I am trying to rotate list of 3 to left
for this I am trying to define this function
def rotate_left3(nums)

#argument nums is list
for example
rotate_left3([1, 2, 3])
I am expecting value [2,3,1] in return. I have written the following code
a = nums
a[0]=nums[1]
a[1]=nums[2]
a[2]=nums[0]
return a #this is returning [2,3,2] instead of [2,3,1]
however if I assign
a = [0,0,0] #or any other value other than directly assigning nums
the code works perfectly

--
components: Windows
files: rotate_left3.py
messages: 224586
nosy: Sai.Krishna.G
priority: normal
severity: normal
status: open
title: Rotating items of list to left
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file36215/rotate_left3.py

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



[issue22121] IDLE should start with HOME as the initial working directory

2014-08-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Mark's opening statement is incomplete. The actual situation is more complex, 
and probably not documented anywhere except in the code -- and the 
system-specific behavior not even there. Let 'working directory' mean the 
initial directory of an Open or Save As dialog opened from a particular window. 
By experiment, each window has its own working directory.

For Editor windows with a named file, the working directory is the directory of 
the file. Note that recently edited file can be opened from File / Recent 
Files, bypassing the Open dialog. (Side issue: the number of recent files kept 
should be expanded.) I sometimes open a file to get to its directory.  Untitled 
Editor widows inherit the working directory from the active window where File / 
New File or control-N was invoked.

Output windows inherit the Shell working directory.  Currently, the Shell 
working directory is the current working directory of the python(w) process it 
is running in.  If python is started from a command line*, it inherits the 
console cwd.  If python is started from a python or idle icon, its current 
directory is that of the python executable -- but apparently only on Windows.  
When Python is installed, the executable is in the install directory that also 
contains /lib.  In a Windows repository build, the executable in /pcbuild, next 
to /lib.  (Another side issue: this is a nuisance and currently disables File / 
Load Module Alt-m.)

* with, for instance, python -m idlelib

This issue should only be about changing the Shell working directory when it 
would otherwise be the executable directory (from an icon start, the last case 
in the previous paragraph).  This can be tested by looking for 'python.exe'.  
We could add a new config option to the Startup Preferences block of the 
General tab of the config dialog. Subissue: perhaps this option, unlike most, 
should have a command line option.

A binary option would be sufficient to switch to the user's home directory. But 
especially for beginners, and especially for children (Mark's presented use 
case on python-list), this is not the right place. Splattering .py files in 
~HOME is not tremendously better than doing the same in the executable 
directory. So I think there should be an entry box where someone could enter, 
for instance, '~/Python'. Starting in a particular directory, rather than 
having to switch to a Python-files directory, would not be Windows-specific.

The current Windows behavior of starting in the version-specific python tree is 
very handy when working on python itself. But I guess using Pathbrowser would 
be a substitute for that.

--
nosy: +terry.reedy
stage:  - needs patch
versions: +Python 2.7

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



[issue22122] turtle module examples should all begin from turtle import *

2014-08-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I think your suggestion is wrong as is and that this issue should be revised or 
closed.  The simple initial example is a complete program. PEP8 discourages 
'import *' but it is acceptable in this context. The snippets you refer to 
follow

24.1.3. Methods of RawTurtle/Turtle and corresponding functions

Most of the examples in this section refer to a Turtle instance called turtle.

Methods are always documented as method calls, and they should be here too. The 
function interface can only be used for 1 turtle, while drawings often require 
more than 1.  See turtledemo for examples such as 'forest', which uses 3 Turtle 
instances.

Nothing says that users have to name an instance 'turtle'.  In practice one 
might use 't1', 't2', etc, or other short names.  Within a subclass of Turtle, 
with added methods, the prefix would be 'self.'. The quote above could be, and 
perhaps should be augmented with a reminder that If one uses the function 
interface for one turtle or the first of many turtles, 'turtle.' should be 
omitted.  As a further concession to beginners, this could even be follows by 
If one uses the object interface, replace 'turtle' with the actual name of a 
particular turtle.

--
nosy: +terry.reedy

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



[issue21308] PEP 466: backport ssl changes

2014-08-02 Thread Donald Stufft

Donald Stufft added the comment:

I think we probably want to revert that particular change. Afaik it wasn't 
added to 3.4 because of the danger of breaking things so we probably shouldn't 
add it to 2.7.

--

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



[issue22124] Rotating items of list to left

2014-08-02 Thread Zachary Ware

Zachary Ware added the comment:

This is not a bug. The assignment a = nums doesn't create a copy of nums, 
it just assigns the name a to the same object that nums refers to.  Since 
lists are mutable, changes made to a are visible through the name nums.  By 
the time you do a[2] = nums[0], nums[0] has been reassigned.

Have a look at this article: http://nedbatchelder.com/text/names.html

Also, you may want to look at collections.deque and its rotate method.

--
nosy: +zach.ware
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue21448] Email Parser use 100% CPU

2014-08-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I think the push() code can be a little cleaner.  Attaching a revised patch 
that simplifies push() a bit.

--
assignee: rhettinger - serhiy.storchaka
Added file: http://bugs.python.org/file36216/fix_email_parse.diff

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



[issue22024] Add to shutil the ability to wait until files are definitely deleted

2014-08-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Windows has FindFirstChangeNotification and FileSystemWatcher:

* http://msdn.microsoft.com/en-us/library/aa364417%28VS.85%29.aspx
* http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx

--
nosy: +rhettinger

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



[issue22125] Cure signedness warnings introduced by #22003

2014-08-02 Thread David Wilson

New submission from David Wilson:

The attached patch (hopefully) silences the signedness warnings generated by 
Visual Studio and reported on python-dev in 
https://mail.python.org/pipermail/python-dev/2014-July/135603.html. 

This was sloppiness on my part, I even noted the problem in the original ticket 
and never fixed it. :)

I don't have a local dev environment setup for MSVC and Python, but at least 
the attached patch cures the signedness errors on Clang. They don't seem to 
occur at all with GCC on my Mac.

The added casts ensure comparisons uniformly compare in the unsigned domain. It 
seems size_t buf_size is pretty redundant in the original struct, it just 
introduces lots of casting when it only appears to be required during 
write_bytes() to avoid signed overflow (undefined behaviour)

--
components: Library (Lib)
files: cow-sign.patch
keywords: patch
messages: 224593
nosy: dw, pitrou, zach.ware
priority: normal
severity: normal
status: open
title: Cure signedness warnings introduced by #22003
type: compile error
versions: Python 3.5
Added file: http://bugs.python.org/file36217/cow-sign.patch

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



[issue20402] List comprehensions should be noted in for loop documentation

2014-08-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

We do have prominent entries in the glossary and tutorial:

https://docs.python.org/2.7/glossary.html#term-list-comprehension
https://docs.python.org/2.7/tutorial/datastructures.html#list-comprehensions

Moving it earlier in the tutorial is likely to do more harm than help.  In 
teaching Python, you need some gap between learning for-loops and learning list 
comprehensions (the former is a prerequisite for the latter).

--
assignee: docs@python - rhettinger
nosy: +rhettinger
versions:  -Python 3.3

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



[issue22123] Make object() behave exactly like types.SimpleNamespace() if given kwargs

2014-08-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Making types.SimpleNamespace more easily available might be a good idea. 
Screwing around with our fundamental base class to do so is not.  Neither is 
rebinding the builtin name 'object'.  Find a different way to accomplish the 
goal.

SimpleNamespace *could* have been added to builtins, but was not.  Instead, it 
was added to types, which is the catchall for types not used enough to be in 
builtins.  Someone might check the issue or list discussion as to why.

At one time object had the bug of silently ignoring arguments. Years ago, Guido 
insisted that this be fixed and wrote patches himself. See #1683368. For one 
thing, raising the exception catches bugs with cooperative multiple inheritance 
and super calls. I believe having object() return a subclass of object that in 
not a superclass of other classes would be worse than the previous bug.

I think this idea should have been left on python-list or moved to python-ideas 
for further development.  I am sure that the proposal as stated should be 
rejected.

--
nosy: +terry.reedy
stage:  - test needed

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



[issue1602] windows console doesn't print or input Unicode

2014-08-02 Thread Mark Lawrence

Mark Lawrence added the comment:

To ensure that we're all talking about the same thing, is everybody using the 
/u unicode output option or /a ansi (which I'm assuming is the default) when 
running cmd?

--
nosy: +BreamoreBoy

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



[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2014-08-02 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
versions: +Python 3.5

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



[issue10071] Should not release GIL while running RegEnumValue

2014-08-02 Thread Mark Lawrence

Mark Lawrence added the comment:

Apart from the request for a comment made in msg192649 it looks as if  this can 
be commited.

--
nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware -brian.curtin
versions: +Python 3.5 -Python 3.3

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



[issue19955] When adding .PY and .PYW to PATHEXT, it replaced string instead of appending

2014-08-02 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +steve.dower, tim.golden, zach.ware
versions: +Python 3.4, Python 3.5 -Python 3.3

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



[issue18611] Mac: Some Python Launcher issues

2014-08-02 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
versions: +Python 3.5

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



[issue18645] Add a configure option for performance guided optimization

2014-08-02 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
type: behavior - enhancement
versions: +Python 3.5 -Python 3.4

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



[issue18423] Document limitations on -m

2014-08-02 Thread Mark Lawrence

Mark Lawrence added the comment:

@Andrew could you put up a patch for this?

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

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



[issue18691] sqlite3.Cursor.execute expects sequence as second argument.

2014-08-02 Thread Mark Lawrence

Mark Lawrence added the comment:

@Andrew your words describe the Cursor execute method but your examples show 
the Connection execute method, can you clarify please.

--
nosy: +BreamoreBoy, ghaering

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



[issue18697] Unify arguments names in Unicode object C API documentation

2014-08-02 Thread Mark Lawrence

Mark Lawrence added the comment:

@Serhiy will you be proposing a patch for this?

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

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



[issue22125] Cure signedness warnings introduced by #22003

2014-08-02 Thread Meador Inge

Meador Inge added the comment:

H, maybe I am missing some context, but why not avoid the casting and do?

diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c
--- a/Modules/_io/bytesio.c
+++ b/Modules/_io/bytesio.c
@@ -47,7 +47,7 @@ typedef struct {
  * exception and returns -1 on failure. Existing state is preserved on failure.
  */
 static int
-unshare(bytesio *self, size_t preferred_size, int truncate)
+unshare(bytesio *self, Py_ssize_t preferred_size, int truncate)
 {
 if (self-initvalue) {
 Py_ssize_t copy_size;

--
nosy: +meador.inge
stage:  - patch review

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



[issue22110] enable extra compilation warnings

2014-08-02 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

GCC =4.5.0 (released on 2010-04-14) silently accepts and ignores 
-Wunreachable-code option. I think that build system of Python should not pass 
unused options to compiler.

--
nosy: +Arfrever

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



[issue22114] You cannot call communicate() safely after receiving an exception (EINTR or EAGAIN)

2014-08-02 Thread Amrith Kumar

Amrith Kumar added the comment:

After some debugging and reading code in python's subprocess.py (v2.7), here's 
what I'm seeing.

(a) the error has nothing to do with eventlet and monkey-patching.
(b) the code in _communicate_with_select() and potentially 
_communicate_with_poll() are the problem.

What's the problem?
---

The code in _communicate_with_select() correctly sets up to handle the read and 
write calls without blocking on any of them. It does this by establishing the 
two (read and write) lists of descriptors and calls select without no timeout 
specified. 

When select returns, and indicates that a socket is in (for example) the read 
list, what that means is that an attempt to read() will not block. However, it 
is possible on some systems (Linux for sure) that 

(a) a socket is non-blocking, and
(b) a call to select indicates that the socket is ready to read, and
(c) a call to read the socket returns an error EAGAIN (aka EWOULDBLOCK).

Callers of read() and write() on non-blocking sockets should be prepared to 
handle this situation. 

The python code in _communicate_with_select() is not.

It assumes that if select() returns that a read fd is ready for read, that a 
call to read it will produce 0 or more bytes. The calls to read() for stdout 
and stderr are not guarded with exception handlers. However, if a socket is 
setup as non-blocking, any call can produce EWOULDBLOCK, EAGAIN, ...

Adding some debugging code it was possible to recreate the problem and show 
that the backtrace was (in this case it happened with python 2.6)

Traceback (most recent call last):
[...]
  File trove/openstack/common/processutils.py, line 186, in execute
result = obj.communicate()
  File /usr/lib64/python2.6/subprocess.py, line 732, in communicate
stdout, stderr = self._communicate(input, endtime)
  File /usr/lib64/python2.6/subprocess.py, line 1318, in _communicate
stdout, stderr = self._communicate_with_select(input, endtime)
  File /usr/lib64/python2.6/subprocess.py, line 1483, in 
_communicate_with_select
data = os.read(self.stdout.fileno(), 1024)
OSError: [Errno 11] Resource temporarily unavailable

The correct fix for this is to make _communicate_with_select() and maybe 
_communicate_with_poll() properly handle the read() and write() calls and be 
better prepared to handle a thrown condition of EAGAIN from os.read or os.write.

--

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



[issue18645] Add a configure option for performance guided optimization

2014-08-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Martin is this reasonable, doable, and worthwhile?

--
assignee:  - loewis
nosy: +loewis

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



[issue1602] windows console doesn't print or input Unicode

2014-08-02 Thread Glenn Linderman

Glenn Linderman added the comment:

Mark, the /U and /A switches to CMD only affect (as the help messages say) the 
output of internal CMD commands. So they would only affect interoperability 
between internal command output piped to a Python program. The biggest issue in 
this bug, however, is the output of Python programs not being properly 
displayed by the console window (often thought of or described as the CMD shell 
window).

While my biggest concerns have been with output, I suppose input can be an 
issue also, and running the output of echo, or other internal commands, into 
Python could be an issue as well. I have pasted a variety of data into Python 
programs beyond ASCII, but I'm not sure I've gone beyond ANSI or beyond Unicode 
BMP. Obviously, once output is working properly, input should also be tested 
and fixed, although I think output is more critical.

With the impetus of your question... I just took some text supplied in another 
context that has a bunch of characters from different repertoires, including 
non-BMP, and tried to paste it into the console window.  Here is the text:


こんにちは世界 - fine on Linux, all boxes on Windows (all boxes in Chrome on Linux too)
مرحبا، العالم! - fine on Linux and Windows
안녕하세요, 세계! - fine on Linux, just boxes and punctuation on Windows
(likewise in Chrome)
Привет, мир! - fine on Linux and Windows
Αυτή είναι μια δοκιμή - fine on both, but Google Translate has a
problem with this! It returned Hello, world! as the Greek for
Hello, world!... so I tried again with This is a test.
퓗퓮퓵퓵퓸, 픀퓸퓻퓵퓭! - not actually a language, but this is astral
In the console window, which I have configured using the Consolas font, the 
glyphs for the non-ASCII characters in the first two and last lines were 
boxes... likely Consolas doesn't support those characters. I had written a 
Python equivalent of echo, including some workarounds originally posted in 
this issue, and got exactly the same output as input, with no errors produced. 
So it is a bit difficult to test characters outside the repertoire of whatever 
font is configured for the console window.  Perhaps someone that has Chinese or 
Korean fonts configured for their console window could report on further 
testing of the above or similar strings.

--

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



[issue11395] print(s) fails on Windows with long strings

2014-08-02 Thread eryksun

eryksun added the comment:

The buffer size only needs to be capped if WINVER  0x602. This issue doesn't 
apply to Windows 8 since it uses the ConDrv device driver instead of LPC. 

Prior to Windows 8, WriteFile redirects to WriteConsoleA when passed a console 
handle. This makes an LPC call to conhost.exe (csrss.exe before Windows 7), 
which copies the buffer to a shared heap. But a Windows 8 console process 
instead has actual File handles provided by the ConDrv device:

stdin \Device\ConDrv\Input
stdout\Device\ConDrv\Output
stderr\Device\ConDrv\Output

For File handles, ReadFile and WriteFile simply call the NT system functions 
NtReadFile and NtWriteFile. The buffer size is only limited by available memory.

--
nosy: +eryksun

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



[issue21448] Email Parser use 100% CPU

2014-08-02 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


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

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



[issue18645] Add a configure option for performance guided optimization

2014-08-02 Thread Stefan Behnel

Stefan Behnel added the comment:

Looks like a duplicate of issue 17781. Ubuntu already does this for their 
builds and gets substantially better performance, so I can't see a reason why 
CPython shouldn't just follow.

--
nosy: +scoder

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