[issue18280] Documentation is too personalized

2013-06-22 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Some documentation files contain a number of I/my/me. Looks like they grew from 
personal modules and personal articles. Perhaps the official documentation 
needs more depersonalized style. Here is full list of such files:

Doc/c-api/exceptions.rst
Doc/c-api/long.rst
Doc/distutils/builtdist.rst
Doc/extending/extending.rst
Doc/extending/windows.rst
Doc/howto/argparse.rst
Doc/howto/curses.rst
Doc/howto/functional.rst
Doc/howto/regex.rst
Doc/howto/sockets.rst
Doc/howto/urllib2.rst
Doc/install/index.rst
Doc/library/audioop.rst
Doc/library/ctypes.rst
Doc/library/doctest.rst
Doc/library/heapq.rst
Doc/library/numbers.rst
Doc/library/ossaudiodev.rst
Doc/library/tk.rst
Doc/library/unittest.mock-examples.rst
Doc/library/unittest.mock.rst
Doc/reference/introduction.rst
Doc/tutorial/classes.rst

The list doesn't include FAQs where it may be appropriate and whatsnew files.

Andrew Kuchling recently has fixed Doc/howto/unicode.rst for this issue (as 
part of issue4153).

--
assignee: docs@python
components: Documentation
messages: 191636
nosy: akuchling, docs@python, eric.araujo, ezio.melotti, georg.brandl, 
serhiy.storchaka
priority: normal
severity: normal
status: open
title: Documentation is too personalized
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue18280] Documentation is too personalized

2013-06-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a filtered results of

   find * -name '*.rst' -exec egrep -n -w -B1 -A1 'I|me|my' '{}' +

--
Added file: http://bugs.python.org/file30665/Imemy.grep

___
Python tracker 

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



[issue4153] Unicode HOWTO up to date?

2013-06-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Most of changes are applicable to Python 2 too. Do you want backport part of 
your patch to 2.7?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue17621] Create a lazy import loader mixin

2013-06-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue18275] Make isinstance() work with super type instances

2013-06-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue11390] doctest: add cmdline parameters

2013-06-22 Thread R. David Murray

R. David Murray added the comment:

I will probably commit this tomorrow if there are no objections.

--

___
Python tracker 

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



[issue11016] Re-implementation of the stat module in C

2013-06-22 Thread Christian Heimes

Changes by Christian Heimes :


Added file: http://bugs.python.org/file30666/statmodule4.patch

___
Python tracker 

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



[issue11016] Re-implementation of the stat module in C

2013-06-22 Thread Christian Heimes

Christian Heimes added the comment:

New patch

People demand a _stat module in C and now they are getting a _stat module in C.

--

___
Python tracker 

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



[issue18281] tarfile defines stat constants

2013-06-22 Thread Christian Heimes

New submission from Christian Heimes:

The tarfile module defines a bunch of stat constants:

http://hg.python.org/cpython/file/4465f273a8a4/Lib/tarfile.py#l142

These constants aren't documented but they look like public API constants. I 
would like to replace them with values from the stat module:

TUREAD = stat.S_IRUSR

--
components: Library (Lib)
messages: 191641
nosy: christian.heimes
priority: low
severity: normal
stage: needs patch
status: open
title: tarfile defines stat constants
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue18206] license url in site.py should always use X.Y.Z form of version number

2013-06-22 Thread R. David Murray

R. David Murray added the comment:

It would be nice to add a test (guarded by the network resource) that checks 
that the generated url in license is not a 404.  Would you be interested in 
tackling that, Berker?

--

___
Python tracker 

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



[issue18282] Ugly behavior of binary and unicode handling on reading unknown encoded files

2013-06-22 Thread Sworddragon

New submission from Sworddragon:

Currently Python 3 has some problems of handling files with an unknown 
encoding. In this example we have a file encoded as ISO-8859-1 with the content 
"ä" which should be tried to be read. Lets see what Python 3 can currently do 
here:

1. We can simply open the file and try to read the content. The encoding will 
be set in my case automatically to UTF-8. But the read() operation will throw 
an exception: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in 
position 0: unexpected end of data

2. Now lets look a little more into the arguments of open(): We will find an 
errors argument which could maybe be useful:
2.1. "strict" is the default behavior which was already tested.
2.2. "ignore" will not throw any exception but delete any character which can't 
be read. This would be problematic in many cases.
2.3. "replace" will replace any character which can't be read which will be 
problematic in many cases too.
2.4. "surrogateescape" can throw exceptions too: UnicodeEncodeError: 'utf-8' 
codec can't encode character '\udce4' in position 0: surrogates not allowed
2.5. "xmlcharrefreplace" and "backslashreplace" are not used for reading.

3. Since trying to decode the file will make many problems we can try to read 
the file as binary content. This will work in all cases but causing another 
problem: Any unicode string that must be concatenated with the content of the 
file must be converted to a binary string too (like b'some_unicode_content' or 
some_unicode_variable.encode()). The same happens for unicode strings that must 
be concatenated somewhere else with the newly converted unicode_to_binary 
variable even if they doesn't touch the file content. This behavior can affect 
the maintainability in a bad way.


As you can see all current solutions of Python 3 have big disadvantages. If I'm 
overlooking something feel free to correct me. Currently I have developed my 
own solution in Python which solved the problem: A function that autodetects 
the encoding of the file. Maybe there could also be a native way to do this on 
open() or maybe there could be another way found to solve this problem.

--
components: IO
messages: 191643
nosy: Sworddragon
priority: normal
severity: normal
status: open
title: Ugly behavior of binary and unicode handling on reading unknown encoded 
files
type: enhancement
versions: Python 3.3

___
Python tracker 

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



[issue18283] shutil.which() should support bytes

2013-06-22 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

shutil.which() should support bytes. Some other functions in shutil module 
support bytes.

>>> shutil.which("echo")
'/bin/echo' 
 
>>> shutil.which(b"echo")   
>>> 
>>>  
Traceback (most recent call last):  
 
  File "", line 1, in
 
  File "/usr/lib64/python3.3/shutil.py", line 1126, in which
name = os.path.join(dir, thefile)
  File "/usr/lib64/python3.3/posixpath.py", line 92, in join
"components.") from None
TypeError: Can't mix strings and bytes in path components.
>>> shutil.which("echo", path="/bin")
'/bin/echo'
>>> shutil.which("echo", path=b"/bin")
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python3.3/shutil.py", line 1098, in which
path = path.split(os.pathsep)
TypeError: Type str doesn't support the buffer API
>>> shutil.which(b"echo", path=b"/bin")
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python3.3/shutil.py", line 1098, in which
path = path.split(os.pathsep)
TypeError: Type str doesn't support the buffer API

--
components: Library (Lib)
messages: 191644
nosy: Arfrever, hynek, tarek
priority: normal
severity: normal
status: open
title: shutil.which() should support bytes
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue11390] doctest: add cmdline parameters

2013-06-22 Thread R. David Murray

R. David Murray added the comment:

Patch updated per Barry's review comments.

--
Added file: http://bugs.python.org/file30667/doctest_cli.patch

___
Python tracker 

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



[issue18113] Memory leak in curses.panel

2013-06-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 99733ff98a50 by Andrew Kuchling in branch '2.7':
#18113: avoid segfault if Py_XDECREF triggers code that calls set_panel_userptr 
again
http://hg.python.org/cpython/rev/99733ff98a50

--

___
Python tracker 

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



[issue18236] int() and float() do not accept strings with trailing separators

2013-06-22 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> You stated facts: what is your proposal?

There is a bug somewhere.  We cannot simultaneously have

>>> '\N{RS}'.isspace()
True

and not accept '\N{RS}' as whitespace when parsing numbers.

I believe int(x) should be equivalent to int(x.strip()).  This is not the case 
now:

>>> '123\N{RS}'.strip()
'123'
>>> int('123\N{RS}')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: invalid literal for int() with base 10: '123\x1e'

The reason I did not clearly state my proposal is because I am not sure whether 
bytes.isspace or str.isspace is correct, but I don't see any justification for 
having them defined differently in the ASCII range.

--

___
Python tracker 

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



[issue18281] tarfile defines stat constants

2013-06-22 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue18236] int() and float() do not accept strings with trailing separators

2013-06-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I see your point now. Since RS is not whitespace by any definition I knew of 
previously, why is RS.isspace True?

Apparent answer: Doc says '''Return true if there are only whitespace 
characters in the string and there is at least one character, false otherwise. 
Whitespace characters are those characters defined in the Unicode character 
database as “Other” or “Separator” and those with bidirectional property being 
one of “WS”, “B”, or “S”.''' I suspect this is a more expansive definition than 
WSpace chars, which seems to be the one used by int(), but you could check the 
int code.

Bytes docs says: "Whenever a bytes or bytearray method needs to interpret the 
bytes as characters (e.g. the is...() methods, split(), strip()), the ASCII 
character set is assumed (text strings use Unicode semantics)."

This says to me that str.isxxx and bytes.isxxx should match on ascii chars and 
not otherwise. That would happen is the bytes methods check for all ascii and 
decoded to unicode and used str method. Since they do not match, bytes must do 
something different.

I think there is one definite bug: the discrepancy between str.isspace and 
bytes.isspace. There is possibly another bug: the discrepancy between 
'whitespace' for str.isspace and int/float. After pinning down the details, I 
think you should ask how to resolve these on py-dev, and which versions to 
patch.

--
type: enhancement -> behavior
versions: +Python 3.3

___
Python tracker 

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



[issue18283] shutil.which() should support bytes

2013-06-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
type:  -> enhancement
versions:  -Python 3.3

___
Python tracker 

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



[issue18236] int() and float() do not accept strings with trailing separators

2013-06-22 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

It looks like str.isspace() is incorrect.  The proper definition of unicode 
whitespace seems to include 26 characters:

# 

0009..000D; White_Space # Cc   [5] ..
0020  ; White_Space # Zs   SPACE
0085  ; White_Space # Cc   
00A0  ; White_Space # Zs   NO-BREAK SPACE
1680  ; White_Space # Zs   OGHAM SPACE MARK
180E  ; White_Space # Zs   MONGOLIAN VOWEL SEPARATOR
2000..200A; White_Space # Zs  [11] EN QUAD..HAIR SPACE
2028  ; White_Space # Zl   LINE SEPARATOR
2029  ; White_Space # Zp   PARAGRAPH SEPARATOR
202F  ; White_Space # Zs   NARROW NO-BREAK SPACE
205F  ; White_Space # Zs   MEDIUM MATHEMATICAL SPACE
3000  ; White_Space # Zs   IDEOGRAPHIC SPACE

# Total code points: 26

http://www.unicode.org/Public/UNIDATA/PropList.txt

Python's str.isspace() uses the following definition: "Whitespace characters 
are those characters defined in the Unicode character database as “Other” or 
“Separator” and those with bidirectional property being one of “WS”, “B”, or 
“S”."

Information separators are swept in because they have bidirectional property 
"B":

>>> unicodedata.bidirectional('\N{RS}')
'B'

See also #10587.

--

___
Python tracker 

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



[issue18236] int() and float() do not accept strings with trailing separators

2013-06-22 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I did a little more investigation and it looks like information separators have 
been included in whitespace since unicode type was first implemented in Python:

guido 11967 Fri Mar 10 22:52:46 2000 +: /* Returns 1 for Unicode characters 
having the type 'WS', 'B' or 'S',
guido 11967 Fri Mar 10 22:52:46 2000 +:0 otherwise. */
guido 11967 Fri Mar 10 22:52:46 2000 +:
guido 11967 Fri Mar 10 22:52:46 2000 +: int 
_PyUnicode_IsWhitespace(register const Py_UNICODE ch)
guido 11967 Fri Mar 10 22:52:46 2000 +: {
guido 11967 Fri Mar 10 22:52:46 2000 +: switch (ch) {
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x0009: /* HORIZONTAL 
TABULATION */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x000A: /* LINE FEED */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x000B: /* VERTICAL 
TABULATION */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x000C: /* FORM FEED */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x000D: /* CARRIAGE RETURN 
*/
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x001C: /* FILE SEPARATOR 
*/
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x001D: /* GROUP SEPARATOR 
*/
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x001E: /* RECORD 
SEPARATOR */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x001F: /* UNIT SEPARATOR 
*/
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x0020: /* SPACE */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x1680: /* OGHAM SPACE 
MARK */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x2000: /* EN QUAD */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x2001: /* EM QUAD */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x2002: /* EN SPACE */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x2003: /* EM SPACE */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x2004: /* THREE-PER-EM 
SPACE */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x2005: /* FOUR-PER-EM 
SPACE */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x2006: /* SIX-PER-EM 
SPACE */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x2007: /* FIGURE SPACE */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x2008: /* PUNCTUATION 
SPACE */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x2009: /* THIN SPACE */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x200A: /* HAIR SPACE */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x2028: /* LINE SEPARATOR 
*/
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x202F: /* NARROW NO-BREAK 
SPACE */
guido 11967 Fri Mar 10 22:52:46 2000 +: case 0x3000: /* IDEOGRAPHIC 
SPACE */
guido 11967 Fri Mar 10 22:52:46 2000 +: return 1;
guido 11967 Fri Mar 10 22:52:46 2000 +: default:
guido 11967 Fri Mar 10 22:52:46 2000 +: return 0;
guido 11967 Fri Mar 10 22:52:46 2000 +: }
guido 11967 Fri Mar 10 22:52:46 2000 +: }
guido 11967 Fri Mar 10 22:52:46 2000 +:

(hg blame -u -d -n -r 11967 Objects/unicodectype.c)

--

___
Python tracker 

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



[issue17621] Create a lazy import loader mixin

2013-06-22 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Apologies for being dense, but how would you actually use such a loader?

Would you need to install something in sys.meta_path/sys.path_hooks?  Would it 
make all imports lazy or only imports of specified modules?

--
nosy: +sbt

___
Python tracker 

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



[issue18236] int() and float() do not accept strings with trailing separators

2013-06-22 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Martin v. Löwis wrote at #13391 (msg147634):
> I do think that _PyUnicode_IsWhitespace should use the White_Space
> property (from PropList.txt). I'm not quite sure how they computed
> that property (or whether it's manually curated). Since that's a
> behavioral change, it can only go into 3.3.

I am adding Martin and Ezio to the "nosy."

--
nosy: +ezio.melotti, loewis

___
Python tracker 

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



[issue18282] Ugly behavior of binary and unicode handling on reading unknown encoded files

2013-06-22 Thread R. David Murray

R. David Murray added the comment:

In python we have a saying that we follow most of the time: if you don't know, 
refuse the temptation to guess.  So currently this is all working as designed: 
you have to know the encoding of the file you are trying to read as unicode.

Adding a 'guess' function that could be called explicitly is a possibility, but 
if we were to go that route we'd probably really want something general to 
guess the encoding of strings, such as (I think) ICU has.  This larger topic is 
a topic more suited to python-ideas, probably followed, if response is 
positive, by a PEP.

So I'm closing this issue as rejected, but feel free to bring it up on 
python-ideas.  (Search for existing threads about it first, please.)

--
nosy: +r.david.murray
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> closed
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue18284] Doc make html: KeyError: 'howto/advocacy'

2013-06-22 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Win 7, make html, 2.7 and 3.3.

writing output... [ 20%] howto/advocacy

Exception occurred:
  File "F:\Python\dev\py33\Doc\tools\sphinx\environment.py", line 1063, in 
get_toc_for
toc = self.tocs[docname].deepcopy()
KeyError: 'howto/advocacy'

and process stops. Since update did not change the sphinx install that worked 
when I last tried this (April), I presume error is in our sources rather than 
Sphinx.

--
assignee: docs@python
components: Documentation
files: sphinx-err-xoinkq.log
messages: 191654
nosy: docs@python, eric.araujo, ezio.melotti, georg.brandl, terry.reedy
priority: normal
severity: normal
status: open
title: Doc make html: KeyError: 'howto/advocacy'
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30668/sphinx-err-xoinkq.log

___
Python tracker 

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



[issue18113] Memory leak in curses.panel

2013-06-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 61fafef4c8a2 by Andrew Kuchling in branch '3.3':
#18113: avoid segfault if Py_XDECREF triggers code that calls set_panel_userptr 
again
http://hg.python.org/cpython/rev/61fafef4c8a2

--

___
Python tracker 

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



[issue18284] Doc make html: KeyError: 'howto/advocacy'

2013-06-22 Thread R. David Murray

R. David Murray added the comment:

I just did a clean doc build on 2.7 (on linux) on 2.7 head without error.  
Maybe you need to do a 'make clean' and rebuild?  Our Makefile ought to have a 
target that just throws away the build dir, instead of throwing away the 
checked out software as well, but it doesn't.  So instead of make clean you 
might want to try just deleting the build dir and rebuilding first.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue18284] Doc make html: KeyError: 'howto/advocacy'

2013-06-22 Thread R. David Murray

R. David Murray added the comment:

Oh, right, the advocacy howto was deleted recently.  So it is almost certainly 
your stale pickles in the build dir that are the issue.

--
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue18285] In itertools.product() add argument repeat to the docstring

2013-06-22 Thread py.user

Changes by py.user :


--
keywords: +patch
Added file: http://bugs.python.org/file30669/issue18285.diff

___
Python tracker 

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



[issue18285] In itertools.product() add argument repeat to the docstring

2013-06-22 Thread py.user

New submission from py.user:

>>> import itertools
>>> print(itertools.product.__doc__)
product(*iterables) --> product object

Cartesian product of input iterables.  Equivalent to nested for-loops.
...

--
assignee: docs@python
components: Documentation
messages: 191658
nosy: docs@python, py.user
priority: normal
severity: normal
status: open
title: In itertools.product() add argument repeat to the docstring
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue18285] In itertools.product() add argument repeat to the docstring

2013-06-22 Thread py.user

Changes by py.user :


--
type:  -> enhancement

___
Python tracker 

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



[issue11016] Re-implementation of the stat module in C

2013-06-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 420f70a22b9d by Christian Heimes in branch 'default':
Issue #11016: Add C implementation of the stat module as _stat
http://hg.python.org/cpython/rev/420f70a22b9d

--

___
Python tracker 

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



[issue17621] Create a lazy import loader mixin

2013-06-22 Thread Brett Cannon

Brett Cannon added the comment:

So the approaches I have been using make a loader lazy, so what you have to 
change in terms of sys.meta_path, sys.path_hooks, etc. would very from loader 
to loader.

I have realized one tricky thing with all of this is that importlib itself 
inspects modules post-import to verify that __loader__ and __package__ have 
been set. That typically triggers an immediate load and so might need to be 
special-cased.

--

___
Python tracker 

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



[issue18286] Python 3.3 - Slowing down computer

2013-06-22 Thread Jon Irenicus

New submission from Jon Irenicus:

Python's really slowing my computer down.
After running my script, the computer grinds to a halt and it's performance 
drops.
Even after a reboot, the problem still persists.

--
components: Windows
messages: 191661
nosy: jon_irenicus
priority: normal
severity: normal
status: open
title: Python 3.3 - Slowing down computer
type: performance
versions: Python 3.3

___
Python tracker 

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



[issue18286] Python 3.3 - Slowing down computer

2013-06-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

You're not giving enough information to help us make sense of your problem. If 
you don't know how to describe the problem precisely, you should try the 
mailing-list: http://mail.python.org/mailman/listinfo/python-list

--
nosy: +pitrou
status: open -> pending

___
Python tracker 

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



[issue11016] Re-implementation of the stat module in C

2013-06-22 Thread STINNER Victor

STINNER Victor added the comment:

buf[9] is not initialized in stat_filemode(). Use a shorter buffer (9
bytes) or set it to NUL.
Le 22 juin 2013 21:05, "Roundup Robot"  a écrit :

>
> Roundup Robot added the comment:
>
> New changeset 420f70a22b9d by Christian Heimes in branch 'default':
> Issue #11016: Add C implementation of the stat module as _stat
> http://hg.python.org/cpython/rev/420f70a22b9d
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue18286] Python 3.3 - Slowing down computer

2013-06-22 Thread Jon Irenicus

Jon Irenicus added the comment:

The problem is when i run my python script, it somehow slows the whole computer 
down.
I checked my cpu usage, ram usage and disk usage, but nothing comes up.
The script isn't big, it's only about 10kb big.

--
status: pending -> open

___
Python tracker 

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



[issue11016] Re-implementation of the stat module in C

2013-06-22 Thread Christian Heimes

Christian Heimes added the comment:

All 10 chars are set:

buf[0] = filetype(mode);
fileperm(mode, &buf[1]);

buf[0] is set by filetype().
fileperm() sets 9 chars in buf[1] to buf[9].

--

___
Python tracker 

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



[issue18286] Python 3.3 - Slowing down computer

2013-06-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

We can't make anything useful of such a bug report. At a minimum, please post 
your entire script and explain how you are running it. Also explain what your 
system configuration is (operating system, etc.).

That said, it's highly unlikely that Python is responsible for slowing your 
computer down *after* it has finished running.

--

___
Python tracker 

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



[issue17621] Create a lazy import loader mixin

2013-06-22 Thread Brett Cannon

Changes by Brett Cannon :


Added file: http://bugs.python.org/file30670/test_lazy_loader.py

___
Python tracker 

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



[issue17621] Create a lazy import loader mixin

2013-06-22 Thread Brett Cannon

Changes by Brett Cannon :


Added file: http://bugs.python.org/file30671/lazy_mixin.py

___
Python tracker 

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



[issue17621] Create a lazy import loader mixin

2013-06-22 Thread Brett Cannon

Brett Cannon added the comment:

I have attached the test suite and two versions: one using a mixin and one 
using a proxy. Neither solve the issue of import touching the module in any way 
to check __loader__ and __package__. The mixin version is also failing one test 
which could quite possibly be a pain to fix and so it might cause me to prefer 
the proxy solution.

--
Added file: http://bugs.python.org/file30672/lazy_proxy.py

___
Python tracker 

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



[issue18282] Ugly behavior of binary and unicode handling on reading unknown encoded files

2013-06-22 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

You can try to use charade (https://pypi.python.org/pypi/charade) or potential 
another encoding detector.

--
nosy: +Arfrever

___
Python tracker 

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



[issue18152] Idle: add 2.7 backport script

2013-06-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am not sure what you mean by 'rollback'. My experience and understanding is 
that once I start a merge, I must finish it somehow before doing anything else. 
Do you mean revert a particular problematic file (like NEWS), and hand edit?

Another backport item. test.support <-> test.test_support.

--
components: +IDLE

___
Python tracker 

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



[issue18103] Create a GUI test framework for Idle

2013-06-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Must mention that 'support' was 'test_support' in 2.7.

--

___
Python tracker 

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



[issue18284] Doc make html: KeyError: 'howto/advocacy'

2013-06-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Nuking build worked. So did, with less re-work, deleting the advocacy doctree 
and html files ;-). Too bad this is not somehow automated.

--
status: pending -> closed

___
Python tracker 

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



[issue18286] Python 3.3 - Slowing down computer

2013-06-22 Thread David Edelsohn

David Edelsohn added the comment:

Is the script changing any configuration settings in your system that reduces 
available system resources without occupying CPU, RAM or disk?

--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue18286] Python 3.3 - Slowing down computer

2013-06-22 Thread Jon Irenicus

Jon Irenicus added the comment:

#David Edelsohn
It's not changing anything.


with open('url_list.txt') as f:
content = f.readlines()
content = ''.join(content)
content = list(content)
if content[0] == 'h' and content[1] == 't' and content[2] =='t':
print("Make sure that you remove http:/ !")
time.sleep(1)
sys.exit("")
elif content[0] != 'w' and content[1] != 'w' and content[2] != 'w':
print("Make sure that you have the www. at the start!")
print(content[0],content[1])
time.sleep(1)
sys.exit("")
os.system("CLS")
else:
print("Configuration looks fine!")
time.sleep(1)
with open('url_list.txt') as f:
content_url = f.readlines()
content_join = ''.join(content_url)
print("You will load video url",content_join,".")
time.sleep(1)
os.system("CLS")
print("Processing...")
time.sleep(1)


global x
x = 0
time.sleep(1)
if x > 35:
print("Warning! Your computer could go unstable!")
time.sleep(1)
os.system("CLS")
print("Are you sure you want to select that many? - yes - no")
while "1" == "1":
_answer_ = input("|yes| |no| - ")
if _answer == "yes":
break
elif answer == "no":
sys.exit("Quitting application")
else:
print("Invalid input!")
time.sleep(1)
os.system("CLS")

elif x in range(1,35):
print("Seems fine")
elif x < 0:
print("Warning!")
print("Out of range value!")
os.system("CLS")
time.sleep(5)
sys.exit("")
os.system("CLS")
time.sleep(5)
print("Starting now!")
while x > 0:
x = x - 1
os.system("start "+content_join)

time.sleep(10)
os.system("taskkill /f /im chrome.exe")
os.system("start test.py")
sys.exit("restarting")

--

___
Python tracker 

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



[issue18284] Doc make html: KeyError: 'howto/advocacy'

2013-06-22 Thread R. David Murray

R. David Murray added the comment:

Automating it could be a sphinx enhancement request.  Or maybe a bug report.

--

___
Python tracker 

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



[issue17621] Create a lazy import loader mixin

2013-06-22 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Shouldn't the import lock be held to make it threadsafe?

--

___
Python tracker 

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



[issue18283] shutil.which() should support bytes

2013-06-22 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue18227] Use Python memory allocators in external libraries like zlib or OpenSSL

2013-06-22 Thread STINNER Victor

STINNER Victor added the comment:

Here is an initial attempt: set a custom allocator for bz2, lzma and zlib 
modules. The allocator is only replaced for an instance of a compressor or 
decompress, the change does not affect the library globally.

PyMem_RawMalloc() is used instead of PyMem_Malloc() because the GIL is always 
released.

--
keywords: +patch
Added file: http://bugs.python.org/file30673/set_custom_alloc.patch

___
Python tracker 

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



[issue18151] Idlelib: update to "with open ... except OSError" (in 2.7, leave IOError)

2013-06-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3c0e8e910125 by Terry Jan Reedy in branch '2.7':
#18151, part 2: Silence debug build resource warning for each file opened by
http://hg.python.org/cpython/rev/3c0e8e910125

New changeset c541073173bb by Terry Jan Reedy in branch '3.3':
#18151, part 2: Silence debug build resource warning for each file opened by
http://hg.python.org/cpython/rev/c541073173bb

New changeset 1d67c0893719 by Terry Jan Reedy in branch 'default':
#18151 Merge from 3.3
http://hg.python.org/cpython/rev/1d67c0893719

--

___
Python tracker 

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



[issue18281] tarfile defines stat constants

2013-06-22 Thread STINNER Victor

STINNER Victor added the comment:

Interesting commit:

changeset:   76949:492e6c6a01bb
user:Giampaolo Rodola' 
date:Tue May 15 15:30:25 2012 +0200
files:   Doc/library/stat.rst Doc/whatsnew/3.3.rst Lib/stat.py 
Lib/tarfile.py Lib/test/test_stat.py Misc/NEWS
description:
#14807: move undocumented tarfile.filemode() to stat.filemode(). Add 
tarfile.filemode alias with deprecation warning.

> I would like to replace them with values from the stat module

I would prefer to simply drop all these constants. None is used by the tarfile 
module. *If* an application uses tarfile to get stat constants, this 
application must be fixed to use the stat module which contain thse constants 
since the creation of the stat module, something like 23 years ago...

changeset:   20:118545312f3b
branch:  legacy-trunk
user:Guido van Rossum 
date:Sun Oct 21 16:17:08 1990 +
files:   Lib/stat.py
description:
Initial revision

--
nosy: +haypo

___
Python tracker 

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



[issue18220] Expand itertools.islice docstring signature to 2 lines

2013-06-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7ecca1a98220 by Andrew Kuchling in branch '3.3':
Closes #18220: expand itertools.islice docstring to 2 lines
http://hg.python.org/cpython/rev/7ecca1a98220

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue18285] In itertools.product() add argument repeat to the docstring

2013-06-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1fad7a709aae by Andrew Kuchling in branch '3.3':
Close #18285: add 'repeat' parameter to docstring for product
http://hg.python.org/cpython/rev/1fad7a709aae

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue11016] Re-implementation of the stat module in C

2013-06-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e5427b0b2bf7 by Victor Stinner in branch 'default':
Issue #11016: Try to fix compilaton of the new _stat.c module on Windows
http://hg.python.org/cpython/rev/e5427b0b2bf7

--

___
Python tracker 

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



[issue11016] Re-implementation of the stat module in C

2013-06-22 Thread STINNER Victor

STINNER Victor added the comment:

> fileperm() sets 9 chars in buf[1] to buf[9].

Ah ok, fine, I missed the "&buf[1]" hack.

--

___
Python tracker 

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



[issue11016] Re-implementation of the stat module in C

2013-06-22 Thread STINNER Victor

STINNER Victor added the comment:

> New changeset e5427b0b2bf7 by Victor Stinner in branch 'default':
> Issue #11016: Try to fix compilaton of the new _stat.c module on Windows
> http://hg.python.org/cpython/rev/e5427b0b2bf7

@Christian: Can you please review this commit?

By the way, mode_t is also defined in import.c:

#ifdef MS_WINDOWS
/* for stat.st_mode */
typedef unsigned short mode_t;
/* for _mkdir */
#include 
#endif

And stat_filemode() should detect integer overflow. mode_t is a 32-bit unsigned 
integer on Linux, and now a 16-bit integer on Windows, whereas stat_filemode() 
uses an unsigned long (which 32 bit on Windows, and 32 or 64 bits on Linux).

--

___
Python tracker 

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



[issue18283] shutil.which() should support bytes

2013-06-22 Thread STINNER Victor

STINNER Victor added the comment:

Here is an implementation.

--
keywords: +patch
Added file: http://bugs.python.org/file30674/which_bytes.patch

___
Python tracker 

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



[issue18280] Documentation is too personalized

2013-06-22 Thread A.M. Kuchling

A.M. Kuchling added the comment:

I've looked through the matches.  "I/O" and the -I command-line switch are 
false positives.  Many references in the FAQ ("How do I do X?"), but those 
don't need to be fixed.  

I think personalized references are most problematic when they're expressing 
uncertainty ("I don't know if we implement all of the spec") or opinions.  
Sentences like "When I run this command under Linux, I see..." could be 
rewritten as "When *you* run this command...", but they don't seem worth fixing 
to me.

Files with personalized text are:

c-api/exceptions.rst
c-api/long.rst
distutils/builtdist.rst
extending/extending.rst
install/index.rst
library/audioop.rst
library/ctypes.rst
library/doctest.rst
library/heapq.rst
library/imaplib.rst
library/numbers.rst
library/ossaudiodev.rst
library/unittest.mock-examples.rst
library/unittest.mock.rst
reference/introduction.rst
tutorial/classes.rst

--

___
Python tracker 

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