[issue26021] Missing IPv6 support for pypi.python.org

2016-01-06 Thread Torsten Zühlsdorff

Torsten Zühlsdorff added the comment:

Thanks for your response Donald!

Which one is your CDN and how will contact it about the missing IPv6 support?

--

___
Python tracker 

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



[issue20397] distutils --record option does not validate existence of byte-compiled files

2016-01-06 Thread Brendan Molloy

Changes by Brendan Molloy :


--
keywords: +patch
Added file: http://bugs.python.org/file41516/20397-head.patch

___
Python tracker 

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



[issue18918] help('FILES') finds no documentation

2016-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0792a0ad7f22 by Senthil Kumaran in branch '2.7':
Fix issue18918 : Attach the pydoc documentation for 'FILES' topic.
https://hg.python.org/cpython/rev/0792a0ad7f22

--

___
Python tracker 

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



[issue20397] distutils --record option does not validate existence of byte-compiled files

2016-01-06 Thread koobs

Changes by koobs :


--
keywords: +needs review

___
Python tracker 

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



[issue20397] distutils --record option does not validate existence of byte-compiled files

2016-01-06 Thread Brendan Molloy

Changes by Brendan Molloy :


Added file: http://bugs.python.org/file41517/20397-py27.patch

___
Python tracker 

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



[issue20397] distutils --record option does not validate existence of byte-compiled files

2016-01-06 Thread Brendan Molloy

Brendan Molloy added the comment:

I've just uploaded patches for head and 2.7, with relevant unit tests.

--
nosy: +bbqsrc

___
Python tracker 

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



[issue26021] Missing IPv6 support for pypi.python.org

2016-01-06 Thread Donald Stufft

Donald Stufft added the comment:

This isn't a CPython issue and doesn't really belong on the issue tracker.

To answer the question though, PyPI will support IPv6 as soon as our CDN 
provider has support for IPv6 and until they do, it will be IPv4 only.

--
resolution:  -> third party
status: open -> closed

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

`str(object)` is not a protocol for getting a string out of an object. It's a 
protocol for getting a string for print(). __str__ is defined for every object 
and therefore is useless for getting a string out of "string-like" object (as 
__float__ for floats and __bytes__ for bytes). Perhaps we need a new special 
method __string__ that relates to __str__ as __index__ to __int__.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-06 Thread Hamish Campbell

Hamish Campbell added the comment:

> Do you have a use case where `x == y`/`hash(x) == hash(y)` does not mean that 
> `x` and `y` should be interchangeable? True and 1 are 100% interchangeable, 
> minus their str() output, and my example is very unlikely to ever appear in 
> actual code.

No I don't have a use case :)

> The culprit is the BUILD_SET opcode in Python/ceval.c which unnecessarily 
> loops backwards (it looks like it was copied from the BUILD_TUPLE opcode).

Incidentally, pypy seems to behave the same as reported here.

--

___
Python tracker 

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



[issue26021] Missing IPv6 support for pypi.python.org

2016-01-06 Thread Donald Stufft

Donald Stufft added the comment:

Our provider is Fastly, I don't believe contacting them will do any good 
though. They are working on getting IPv6 support but there is no ETA at the 
moment.

--

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here the aim is really to distinguish path-like objects from other objects, not 
to accept arbitrary strings.

A ".path" attribute sounds like the wrong name, though: a Path has a path? And 
the Path's path is not a Path? Ouch :-)

--

___
Python tracker 

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



[issue22558] Missing hint to source code - complete

2016-01-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

If there is a New-in note (which follows Synopsis), then (to be consistent) the 
Source note should follow it.  If not (the normal situation), then Source 
follows Synopsis directly.

A point in favor of linking all Python sources from the docs is that default 
single users installs are much harder to access on Windows than they used to 
be: /Users/Name/[Appdata - hidden by default]/Roaming?/Python/Pythonxy (I 
believe) versus the old /Pythonxy.

--

___
Python tracker 

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



[issue22558] Missing hint to source code - complete

2016-01-06 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue26021] Missing IPv6 support for pypi.python.org

2016-01-06 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +dstufft

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Ram Rachum

Ram Rachum added the comment:

I thought about it some more, and personally I'd prefer each function to do 
`str(path)` internally rather than `if hasattr(p, 'path'): p = p.path`. Even if 
it means we'll have to deal with "where did that file named '' come from?!" errors. I think it's clumsy that the path protocol is to 
access `path.path`. We already have a protocol for getting a string out of an 
object and it's `str(object)`. I think we should use it even if it makes 
debugging harder in the case where someone mistakenly passes a non-path object 
to a function that wants a path. (And without using `isinstance` either.)

--

___
Python tracker 

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



[issue26021] Missing IPv6 support for pypi.python.org

2016-01-06 Thread STINNER Victor

STINNER Victor added the comment:

FYI pypi.python.org is now managed by the Python infra team. See for example 
https://mail.python.org/mailman/listinfo/infrastructure and 
https://status.python.org/

--
nosy: +haypo

___
Python tracker 

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



[issue26021] Missing IPv6 support for pypi.python.org

2016-01-06 Thread Torsten Zühlsdorff

New submission from Torsten Zühlsdorff:

Hello,

i'm done some research about the impact of missing IPv6 support at the FreeBSD 
ports-tree, which is the list of supported software for FreeBSD.

Python and many libs written in python are supported for FreeBSD, but if you 
have an IPv6 only server, they are not usable at all. Currently python has the 
biggest impact on the ports-tree: 
(https://wiki.freebsd.org/IPv6PortsTODO#TOP_25_hosts_with_missing_IPv6_support)

This is because the server pypi.python.org lacks support for IPv6. There is 
also no  record in DNS:

$ drill pypi.python.org 
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 9429
;; flags: qr rd ra ; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; pypi.python.org. IN  

;; ANSWER SECTION:
pypi.python.org.6983IN  CNAME   prod.python.map.fastly.net.
prod.python.map.fastly.net. 5   IN  CNAME   
prod.python.map.fastlylb.net.

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 33 msec
;; SERVER: 192.168.0.23
;; WHEN: Wed Jan  6 10:34:12 2016
;; MSG SIZE  rcvd: 112

Please add IPv6 support to your server(s). If you need any help/feedback/tests 
i will gladly help you!

Thank you very much,
Torsten

--
messages: 257592
nosy: thorny
priority: normal
severity: normal
status: open
title: Missing IPv6 support for pypi.python.org
type: enhancement

___
Python tracker 

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



[issue18918] help('FILES') finds no documentation

2016-01-06 Thread Senthil Kumaran

Senthil Kumaran added the comment:

The bltin-file-objects was not referenced in pyspecific.py from which this data 
was generated. Added it and fixed it. 

Verified that it is available in 2.7 now.

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

___
Python tracker 

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



[issue26024] Non-ascii Windows locale names

2016-01-06 Thread Vidar Fauske

New submission from Vidar Fauske:

The Norwegian locale on Windows has the honor of having the only locale name 
with a non-ASCII character ('Norwegian Bokmål_Norway', see e.g. 
https://wiki.postgresql.org/wiki/Changes_To_Norwegian_Locale). It does not seem 
like python 3 is able to handle this properly, as the following code 
demonstrates:

>python
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_TIME, 'swedish')
'Swedish_Sweden.1252'
>>> loc_sw = locale.getlocale(locale.LC_TIME)
>>> locale.setlocale(locale.LC_TIME, 'norwegian')
'Norwegian Bokmål_Norway.1252'
>>> loc_no = locale.getlocale(locale.LC_TIME)
>>> locale.setlocale(locale.LC_TIME, loc_sw)
'Swedish_Sweden.1252'
>>> locale.setlocale(locale.LC_TIME, loc_no)
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\prog\WinPython-64bit-3.4.3.7\python-3.4.3.amd64\lib\locale.py", line 
593, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting


As can be seen, this can be worked around when setting the locale manually, but 
if the locale has already been set to Norwegian, the value returned from 
getlocale is invalid when passed to setlocale.

Following the example of postgres in the link above, I suggest changing the 
behavior of locale.getlocale to alias 'Norwegian Bokmål_Norway.1252' as 
'Norwegian_Norway.1252', which is completely ASCII, and therefore fine.

--
components: Unicode, Windows
messages: 257608
nosy: ezio.melotti, haypo, paul.moore, steve.dower, tim.golden, vidartf, 
zach.ware
priority: normal
severity: normal
status: open
title: Non-ascii Windows locale names
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue26022] string.replace(' ', ' ') has to be called 2 times before it works

2016-01-06 Thread Ethan Furman

Ethan Furman added the comment:

The .replace() method is not recursive (it only makes one pass through the 
string), so for example:

>>> example = '   '  # three spaces
>>> example = example.replace('  ', ' ')  # replace two spaces with one space
>>> example  # should be two spaces
'  '  
>>> example = example.replace('  ', ' ')  # replace two spaces with one space
>>> example  # should be one space
' '

--
nosy: +ethan.furman
resolution: rejected -> not a bug

___
Python tracker 

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



[issue26022] string.replace(' ', ' ') has to be called 2 times before it works

2016-01-06 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Please use stackoverflow or python-tutor list to get help on this.
https://mail.python.org/pipermail/tutor/

This is unlikely a problem as you are using replace the send time on new string 
object.

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

___
Python tracker 

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



[issue26022] string.replace(' ', ' ') has to be called 2 times before it works

2016-01-06 Thread SilentGhost

SilentGhost added the comment:

Could you provide us with a sample file that demonstrates this behaviour?

--
nosy: +SilentGhost

___
Python tracker 

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



[issue26023] Missing signatures operator module

2016-01-06 Thread Freddy Rietdijk

New submission from Freddy Rietdijk:

The operator module has no signatures for (most) of the functions defined in it.


Use case:
The multipledispatch module uses inspect.getfullargspec and therefore the 
functions in operator cannot be used in combination with the @dispatch decorator

--
components: Library (Lib)
messages: 257606
nosy: Freddy Rietdijk
priority: normal
severity: normal
status: open
title: Missing signatures operator module
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue26022] string.replace(' ', ' ') has to be called 2 times before it works

2016-01-06 Thread Roland Eichman

New submission from Roland Eichman:

Windows 10 
python 3.5
small function in a small module 
contained a string len(str1) == 5000 {approx}
str1 = str1.replace('  ',' ')
did not work
added, via copy & paste, a second identical line
str1 = str1.replace('  ',' ')
str1 = str1.replace('  ',' ')
AND IT WORKED

--
components: Interpreter Core
messages: 257603
nosy: roland_eichman
priority: normal
severity: normal
status: open
title: string.replace('  ',' ') has to be called 2 times before it works
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-06 Thread Raymond Hettinger

Changes by Raymond Hettinger :


Added file: http://bugs.python.org/file41518/build_set2.diff

___
Python tracker 

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



[issue25711] Rewrite zipimport from scratch

2016-01-06 Thread Rose Ames

Rose Ames added the comment:

Sorry for the late response.  I didn't have much time over the holidays.  I 
think I better let someone else take this one.

--

___
Python tracker 

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



[issue26024] Non-ascii Windows locale names

2016-01-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This can be related to issue25812. Python supposes that locale settings in all 
categories use the same encoding (set by LC_CTYPE). Try first to set LC_CTYPE 
to ASCII-named locale with the 1252 codepage.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26024] Non-ascii Windows locale names

2016-01-06 Thread Eryk Sun

Eryk Sun added the comment:

PyLocale_setlocale in Modules/_localemodule.c is incorrectly passing the locale 
as a UTF-8 string ("z") instead of using the codepage of the current locale. 

As you can see below "å" is passed as the UTF-8 string "\xc3\xa5":

>>> locale._setlocale(locale.LC_TIME, 'Norwegian Bokmål_Norway.1252')
Breakpoint 0 hit
MSVCR100!setlocale:
`56d23d14 48895c2408  mov qword ptr [rsp+8],rbx
  ss:`004af800=
  02ad2a68
0:000> db @rdx l0n29
`02808910  4e 6f 72 77 65 67 69 61-
   6e 20 42 6f 6b 6d c3 a5  Norwegian Bokm..
`02808920  6c 5f 4e 6f 72 77 61 79-
   2e 31 32 35 32   l_Norway.1252

The CRT's setlocale works fine when passed the locale string encoded with 
codepage 1252:

>>> msvcr100 = ctypes.CDLL('msvcr100')
>>> msvcr100.setlocale.restype = ctypes.c_char_p
>>> loc_no = 'Norwegian Bokmål_Norway.1252'.encode('1252')
>>> msvcr100.setlocale(locale.LC_TIME, loc_no)
b'Norwegian Bokm\xe5l_Norway.1252'

--
nosy: +eryksun

___
Python tracker 

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



[issue26024] Non-ascii Windows locale names

2016-01-06 Thread STINNER Victor

STINNER Victor added the comment:

> PyLocale_setlocale in Modules/_localemodule.c is incorrectly passing the 
> locale as a UTF-8 string ("z") instead of using the codepage of the current 
> locale. 

Do you mean that the function must encode the locale name to the *ANSI 
codepage*?

--

___
Python tracker 

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



[issue25924] investigate if getaddrinfo(3) on OSX is thread-safe

2016-01-06 Thread A. Jesse Jiryu Davis

A. Jesse Jiryu Davis added the comment:

In Apple's Libinfo version 222.4.12 (corresponding to the last OS X 10.4 
release), the man page says getaddrinfo isn't thread-safe:

http://www.opensource.apple.com/source/Libinfo/Libinfo-222.4.12/lookup.subproj/getaddrinfo.3

And here's its source:

http://www.opensource.apple.com/source/Libinfo/Libinfo-222.4.12/lookup.subproj/getaddrinfo.c

Glancing at the source naïvely, I might see the data race: getaddrinfo calls 
gai_lookupd, which reads and writes the global static variable "gai_proc". I 
can't see what will go wrong as a result of the race, but it sure LOOKS bad.

In the next release, version 278 (OS X 10.5.0), the thread-safety warning is 
gone from the man page:

http://www.opensource.apple.com/source/Libinfo/Libinfo-278/lookup.subproj/getaddrinfo.3

And getaddrinfo is largely rewritten:

http://www.opensource.apple.com/source/Libinfo/Libinfo-278/lookup.subproj/getaddrinfo.c

It calls a new function, "ds_getaddrinfo". But ds_getaddrinfo still accesses 
the global static variable "gai_proc"; I wonder why this is considered 
thread-safe now?

--
nosy: +emptysquare

___
Python tracker 

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



[issue26025] Document pathlib.Path.__truediv__()

2016-01-06 Thread Brett Cannon

New submission from Brett Cannon:

I noticed that the documentation for pathlib only mentions the overloading of 
__truediv__ in examples and not anywhere in the actual docs for the Path object 
itself.

--
assignee: docs@python
components: Documentation
messages: 257617
nosy: brett.cannon, docs@python, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Document pathlib.Path.__truediv__()

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Guido van Rossum

Guido van Rossum added the comment:

Only if we changed DirEntry to support that too. But it's a kind of
high-falootin' word that also has some other connotations (e.g.
geographical location, and the HTTP Location header). I've never heard it
use in relation to filenames -- those are invariably called some variant of
file, file name, path, full path. Really, the argument Antoine brings up
doesn't hold much weight.

--

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Brett Cannon

Brett Cannon added the comment:

Personally I thought the name `path` fit; just trying to see if some other 
option might work that Antoine would also like.

--

___
Python tracker 

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



[issue25672] set SSL_MODE_RELEASE_BUFFERS

2016-01-06 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Thanks, Brett. I'm too busy with other things at the moment.

--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2016-01-06 Thread Gregorio

Gregorio added the comment:

thanks

On 01/06/2016 06:42 PM, Guido van Rossum wrote:
> Guido van Rossum added the comment:
>
> I'm just going to commit this.
>
> --
> assignee:  -> gvanrossum
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue26012] pathlib.Path().rglob() is fooled by symlink loops

2016-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 18f5b125a863 by Guido van Rossum in branch '3.4':
Issue #26012: Don't traverse into symlinks for ** pattern in 
pathlib.Path.[r]glob().
https://hg.python.org/cpython/rev/18f5b125a863

New changeset 9826dbad1252 by Guido van Rossum in branch '3.5':
Issue #26012: Don't traverse into symlinks for ** pattern in 
pathlib.Path.[r]glob(). (Merge 3.4->3.5)
https://hg.python.org/cpython/rev/9826dbad1252

New changeset 36864abbfe02 by Guido van Rossum in branch 'default':
Issue #26012: Don't traverse into symlinks for ** pattern in 
pathlib.Path.[r]glob(). (Merge 3.5->3.6)
https://hg.python.org/cpython/rev/36864abbfe02

--
nosy: +python-dev

___
Python tracker 

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



[issue26012] pathlib.Path().rglob() is fooled by symlink loops

2016-01-06 Thread Guido van Rossum

Changes by Guido van Rossum :


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

___
Python tracker 

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



[issue26026] True%2 is True

2016-01-06 Thread Hristo Venev

Changes by Hristo Venev :


--
title: True%2==True -> True%2 is True

___
Python tracker 

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



[issue26026] True%2==True

2016-01-06 Thread Hristo Venev

New submission from Hristo Venev:

Should be 1. This comes from the (a%b=a if a

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, I'll add 'path' to unblock changes to the stdlib (but I won't close
this issue).

--

___
Python tracker 

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



[issue26026] True%2 is True

2016-01-06 Thread SilentGhost

SilentGhost added the comment:

Arithmetic operations should not be used with booleans, they happen to work due 
to boolean bean a subclass of int.

--
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7e9605697dfc by Guido van Rossum in branch '3.4':
Issue #22570: Add 'path' attribute to pathlib.Path objects.
https://hg.python.org/cpython/rev/7e9605697dfc

New changeset 9c49c417a68a by Guido van Rossum in branch '3.5':
Issue #22570: Add 'path' attribute to pathlib.Path objects. (Merge 3.4->3.5)
https://hg.python.org/cpython/rev/9c49c417a68a

New changeset d5f96a5da219 by Guido van Rossum in branch 'default':
Issue #22570: Add 'path' attribute to pathlib.Path objects. (Merge 3.5->3.6)
https://hg.python.org/cpython/rev/d5f96a5da219

--
nosy: +python-dev

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Georg Brandl

Georg Brandl added the comment:

No docs? ;)

--

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2e3c31ab586a by Guido van Rossum in branch '3.4':
Docs for issue #22570.
https://hg.python.org/cpython/rev/2e3c31ab586a

New changeset 408f8b255b56 by Guido van Rossum in branch '3.5':
Docs for issue #22570. (Merge 3.4->3.5)
https://hg.python.org/cpython/rev/408f8b255b56

New changeset 759b2cecc289 by Guido van Rossum in branch '3.4':
Add versionadded (3.4.5) to docs for issue #22570.
https://hg.python.org/cpython/rev/759b2cecc289

New changeset 1a6b485e717f by Guido van Rossum in branch '3.5':
Add versionadded (3.4.5) to docs for issue #22570. (Merge 3.4->3.5)
https://hg.python.org/cpython/rev/1a6b485e717f

New changeset eab349b5c6d7 by Guido van Rossum in branch '3.5':
Cross-reference os.DirEntry and pathlib.Path for issue #22570.
https://hg.python.org/cpython/rev/eab349b5c6d7

New changeset 97ab0ccac893 by Guido van Rossum in branch 'default':
Docs for issue #22570. (Merge 3.5->3.6)
https://hg.python.org/cpython/rev/97ab0ccac893

--

___
Python tracker 

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



[issue26012] pathlib.Path().rglob() is fooled by symlink loops

2016-01-06 Thread Guido van Rossum

Guido van Rossum added the comment:

I'm going to fix this by skipping all symlinks in _RecursiveWildcardSelector.

--
assignee:  -> gvanrossum

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

In any case I don't think "location" is any better ;-) If "path" fits other 
people then good.

--

___
Python tracker 

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



[issue26024] Non-ascii Windows locale names

2016-01-06 Thread Eryk Sun

Eryk Sun added the comment:

Yes, it's ANSI. I should have said "system locale" instead of "current locale". 
To find the requested locale, the CRT function __get_qualified_locale calls 
EnumSystemLocalesA. The passed callback calls GetLocaleInfoA for each 
enumerated locale to get the country (SENGLISHCOUNTRYNAME) and language 
(SENGLISHLANGUAGENAME).

--

___
Python tracker 

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



[issue25672] set SSL_MODE_RELEASE_BUFFERS

2016-01-06 Thread Brett Cannon

Brett Cannon added the comment:

I assume this can be checked in, MAL? If you need someone to do it for you, 
feel free to assign it to me and I can do it when I have a chance.

--
nosy: +brett.cannon
stage:  -> commit review

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Brett Cannon

Brett Cannon added the comment:

Would `location` work as an attribute name?

--

___
Python tracker 

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



[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2016-01-06 Thread Guido van Rossum

Guido van Rossum added the comment:

I'm just going to commit this.

--
assignee:  -> gvanrossum

___
Python tracker 

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



[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2016-01-06 Thread Guido van Rossum

Changes by Guido van Rossum :


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

___
Python tracker 

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



[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2016-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bac18cb7b011 by Guido van Rossum in branch '3.4':
Issue #24120: Ignore PermissionError in pathlib.Path.[r]glob(). Ulrich Petri.
https://hg.python.org/cpython/rev/bac18cb7b011

New changeset 224a026b4ca1 by Guido van Rossum in branch '3.5':
Issue #24120: Ignore PermissionError in pathlib.Path.[r]glob(). Ulrich Petri. 
(Merge 3.4->3.5)
https://hg.python.org/cpython/rev/224a026b4ca1

New changeset f6ae90450a4d by Guido van Rossum in branch 'default':
Issue #24120: Ignore PermissionError in pathlib.Path.[r]glob(). Ulrich Petri. 
(Merge 3.5->3.6)
https://hg.python.org/cpython/rev/f6ae90450a4d

--
nosy: +python-dev

___
Python tracker 

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



[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-06 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-06 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
stage:  -> patch review

___
Python tracker 

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



[issue22499] [SSL: BAD_WRITE_RETRY] bad write retry in _ssl.c:1636

2016-01-06 Thread Nikolaus Rath

Nikolaus Rath added the comment:

Would you be willing to review a patch to incorporate the handling into the SSL 
module?

--

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Guido van Rossum

Guido van Rossum added the comment:

I think it's actually very reasonable for a Path to have a path attribute
that's a string. The DirEntry has two string attributes: name (the last
component) and path (the full path). The Path object already has the
former. Adding the latter makes sense to me. After all you've gotta give it
*some* name, and 'path' is used (unsurprisingly) in this meaning already in
many places.

The shortest idiom in libraries wanting to support this would be

path = gettattr(arg, 'path', arg)

This extracts the path attribute from a DirEntry or Path object, and
assumes the argument is a string otherwise. I think this is relatively
reasonable to encode in C as well.

--

___
Python tracker 

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



[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-01-06 Thread koobs

koobs added the comment:

As many branches as we can muster, ideally all, at least 3.4, 3.5 default and 
2.7 please. Back porting is a massive pain, and downstream OS's want to retain 
integrity of tests to ensure quality of Python in their respective ecosystems

--

___
Python tracker 

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



[issue26030] Use PEP8 in documentation examples

2016-01-06 Thread Martin Panter

Martin Panter added the comment:

In general I agree with fixing style problems in the documentation, especially 
if you supply patches :)

--
nosy: +martin.panter
stage:  -> needs patch

___
Python tracker 

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



[issue26031] Add stat caching option to pathlib

2016-01-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Let me first mention the stat caching question was asked during the PEP 
discussion and ultimately it was decided it's not a good idea to meld it in the 
Path design :-)

Early versions of pathlib were more complex as they were able to keep some file 
descriptors around, for example for openat() support. You can probably find 
them by digging in the original repo.

--

___
Python tracker 

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



[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2016-01-06 Thread Laurence Rowe

Laurence Rowe added the comment:

This change is causing a problem for boto under 3.5.1 (works on 3.5.0):

TypeError: get() got an unexpected keyword argument 'raw'
> /usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/configparser.py(406)_interpolate_some()
-> rawval = parser.get(section, option, raw=True, fallback=rest)

boto bug report: https://github.com/boto/boto/issues/3433

This is because boto is subclassing ConfigParser and its get method does not 
include the raw argument. A quick search shows that this also affects Kazam am 
circus.

Circus fixed it by adding **kwargs to the method. 
https://github.com/circus-tent/circus/commit/d0d2ac4fd843bb9f050a8c678956fe3682371001

--
nosy: +lrowe

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Guido van Rossum

Guido van Rossum added the comment:

Let's say that the path attribute should be str or bytes -- this matches
the behavior of DirEntry. (But for pathlib.Path it is always a str.) It
cannot be None or FD. But note that the getattr(x, 'path', x) idiom returns
x unchanged if x is None or an FD (or a stream, for that matter).

--

___
Python tracker 

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



[issue26030] Use PEP8 in documentation examples

2016-01-06 Thread Julien

New submission from Julien:

Hi,

Shouldn't Python use PEP8 in its examples in the documentation ? I found a lot 
of missing spaces around binary operators, and things like "setup (name = 
'PackageName'," (found in the Distributing section, but that's just a single 
example) which hurt my eyes and will probably teach bad practices to newcomers 
reading it.

If everybody agree documentation examples should be PEP8 compliant, I'll can 
gladly provide some patches.

I also found http://bugs.python.org/issue23921 which is probably not merged as 
it's still open, and the patch don't fix my example, so there is probably some 
problems left.

--
assignee: docs@python
components: Documentation
messages: 257649
nosy: docs@python, sizeof
priority: normal
severity: normal
status: open
title: Use PEP8 in documentation examples
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue26032] Use scandir() to speed up pathlib globbing

2016-01-06 Thread STINNER Victor

STINNER Victor added the comment:

> As I recall, if the platform's DirEntry doesn't provide the cacheable 
> attributes when first called, those attributes will be looked up (and cached) 
> on first access.

scandir() is not magic. It simply provides info given by the OS: see readdir() 
on UNIX and FindFirstFile()/FindNextFile() on Windows.

DirEntry calls os.stat() if needed, but it caches the result.

DirEntry doc tries to explain when syscalls or required or not, depending on 
the requested information and the platform:
https://docs.python.org/dev/library/os.html#os.DirEntry

--

___
Python tracker 

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



[issue26032] Use scandir() to speed up pathlib globbing

2016-01-06 Thread Guido van Rossum

Guido van Rossum added the comment:

The DirEntry docs say for most methods "In most cases, no system call is
required" which is pretty non-committal. :-( The only firm promise is for
inode(), which is pretty useless.

--

___
Python tracker 

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



[issue26033] distutils default compiler API is incomplete

2016-01-06 Thread Stefan Seefeld

New submission from Stefan Seefeld:

I'm trying to use the distutil compiler to preprocess some header (to be used 
with the cffi package).
The code is

compiler = distutils.ccompiler.new_compiler()
compiler.add_include_dir(join(sys.prefix, 'include'))
compiler.preprocess(source)

This raises this exception (on Linux):

  File ".../distutils/unixccompiler.py", line 88, in preprocess
pp_args = self.preprocessor + pp_opts
TypeError: unsupported operand type(s) for +: 'NoneType' and 'list'

caused by 'set.preprocessor' to be set to None (with the preceding comment:

# The defaults here
# are pretty generic; they will probably have to be set by an outsider
# (eg. using information discovered by the sysconfig about building
# Python extensions).

Seems that code never got fully implemented.
Further, the MSVC version of the compiler (msvccompiler.py) doesn't even 
implement a "preprocess()" method, so this falls back to the 
CCompiler.preprocess() default, which does nothing !

--
components: Distutils
messages: 257663
nosy: dstufft, eric.araujo, stefan
priority: normal
severity: normal
status: open
title: distutils default compiler API is incomplete
type: behavior
versions: Python 2.7, Python 3.5

___
Python tracker 

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



[issue26032] Use scandir() to speed up pathlib globbing

2016-01-06 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +benhoyt

___
Python tracker 

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



[issue26028] .sort() Causing Strings to Be Listed on the same line

2016-01-06 Thread SilentGhost

SilentGhost added the comment:

Please use stackoverflow or python-tutor list to get help on this.
https://mail.python.org/pipermail/tutor/

What it looks like is the problem with your text editor not being able to 
support EOL characters from a different OS.

--
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue25596] regular files handled as directories in the glob module

2016-01-06 Thread Guido van Rossum

Guido van Rossum added the comment:

(IOW once this patch has been applied maybe you can do the same for globbing in 
pathlib as requested in issue #26032.)

--
nosy: +gvanrossum

___
Python tracker 

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



[issue26031] Add stat caching option to pathlib

2016-01-06 Thread Guido van Rossum

New submission from Guido van Rossum:

There are concerns that pathlib is inefficient because it doesn't cache stat() 
operations. Thus, for example this code calls stat() for each result twice 
(once internal to the glob, a second time to answer the is_symlink() question):

  p = pathlib.Path('/usr')
  links = [x for x in p.rglob('*') if x.is_symlink()]

I have a tentative patch (without tests). On my Mac it only gives modest 
speedups (between 5 and 20 percent) but things may be different on other 
platforms or for applications that make a lot of inquiries about the same path.

The API I am proposing is that by default nothing changes; to benefit from 
caching you must instantiate a StatCache() object and pass it to Path() 
constructor calls, e.g. Path('/usr', stat_cache=cache_object). All Path objects 
derived from this path object will share the cache. To force an uncached Path 
object you can use Path(p).

The patch is incomplete; there are no tests for the new functionality (though 
existing tests pass) and __eq__ should be adjusted so that Path objects using 
different caches always compare unequal.

Question for Antoine: Did you perhaps anticipate a design like this? Each Path 
instance has an _accessor slot, but there is only one accessor instance defined 
that is used everywhere (the global _normal_accessor). So you could have 
avoided a bunch of complexity in the code around setting the proper _accessor 
unless you were planning to use multiple accessors.

--
files: statcache.diff
keywords: patch
messages: 257651
nosy: gvanrossum, pitrou
priority: normal
severity: normal
stage: test needed
status: open
title: Add stat caching option to pathlib
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41521/statcache.diff

___
Python tracker 

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



[issue26032] Use scandir() to speed up pathlib globbing

2016-01-06 Thread Guido van Rossum

New submission from Guido van Rossum:

The globbing functionality in pathlib (Path.glob() and Path.rglob()) might 
benefit from using the new optimized os.scandir() interface. It currently just 
uses os.listdir(). The Path.iterdir() method might also benefit (though less 
so).

There's also a sideways connection with http://bugs.python.org/issue26031 
(adding an optional stat cache) -- the cache could possibly keep the DirEntry 
objects and use their (hopefully cached) attributes. This is more speculative 
though (and what if the platform's DirEntry doesn't cache?)

--
messages: 257653
nosy: gvanrossum
priority: normal
severity: normal
status: open
title: Use scandir() to speed up pathlib globbing
type: performance
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue26032] Use scandir() to speed up pathlib globbing

2016-01-06 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26032] Use scandir() to speed up pathlib globbing

2016-01-06 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy: +pitrou

___
Python tracker 

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



[issue25596] regular files handled as directories in the glob module

2016-01-06 Thread STINNER Victor

STINNER Victor added the comment:

Related issue: #26032 "Use scandir() to speed up pathlib globbing".

--

___
Python tracker 

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



[issue26032] Use scandir() to speed up pathlib globbing

2016-01-06 Thread STINNER Victor

STINNER Victor added the comment:

Related issue: issue #25596 "regular files handled as directories in the glob 
module".

--
nosy: +haypo

___
Python tracker 

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



[issue26032] Use scandir() to speed up pathlib globbing

2016-01-06 Thread Ethan Furman

Ethan Furman added the comment:

As I recall, if the platform's DirEntry doesn't provide the cacheable 
attributes when first called, those attributes will be looked up (and cached) 
on first access.

--
nosy: +ethan.furman

___
Python tracker 

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



[issue26031] Add stat caching option to pathlib

2016-01-06 Thread Guido van Rossum

Guido van Rossum added the comment:

That's fair, though I don't know what kind of caching design was considered
(until Ram's suggestion on python-ideas I had thought the cache would
simply use a slot on the Path instance to hold the stat() result).

If we want pathlib to become pervasive we may have to accept that its
implementation may become more complex in order to support more use cases.
(I'm so far holding off a walk() method, but who knows for how long...)

--

___
Python tracker 

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



[issue26032] Use scandir() to speed up pathlib globbing

2016-01-06 Thread Guido van Rossum

Guido van Rossum added the comment:

Ben, I think it's worth calling out what the rules are around symlinks. I'm
guessing the info that is initially present is a subset of lstat(), so if
that indicates it's a symlink, is_dir() and is_file() will need a stat()
call, *unless* follow_symlinks is False.

Another question: for symlinks, there are two different possible stat
results: one for stat() and one for lstat(). Are these both cached
separately? Or is only one of them? (Experimentally, they are either both
cached or the cache remembers the follow_symlinks flag and re-fetches the
other result.)

Related, "this method always requires a system call", that remark seems to
disregard the cache.

I'd be happy to review a doc update patch if you make one.

--

___
Python tracker 

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



[issue26035] traceback.print_tb() takes `tb`, not `traceback` as a keyword argument

2016-01-06 Thread Nicholas Chammas

New submission from Nicholas Chammas:

Here is traceback.print_tb()'s signature [0]:

```
def print_tb(tb, limit=None, file=None):
```

However, its documentation reads [1]:

```
.. function:: print_tb(traceback, limit=None, file=None)
```

Did the keyword argument change recently, or was this particular doc always 
wrong?

[0] 
https://github.com/python/cpython/blob/1fe0fd9feb6a4472a9a1b186502eb9c0b2366326/Lib/traceback.py#L43
[1] 
https://raw.githubusercontent.com/python/cpython/1fe0fd9feb6a4472a9a1b186502eb9c0b2366326/Doc/library/traceback.rst

--
assignee: docs@python
components: Documentation
messages: 257670
nosy: Nicholas Chammas, docs@python
priority: normal
severity: normal
status: open
title: traceback.print_tb() takes `tb`, not `traceback` as a keyword argument
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue26034] venv documentation out of date

2016-01-06 Thread Dan Sadowski

New submission from Dan Sadowski:

The listing for the --clear option in the documentation is outdated. This is 
from the actual current 3.5 usage text:

  --clear   Delete the contents of the environment directory if it
already exists, before environment creation.

--
assignee: docs@python
components: Documentation
messages: 257669
nosy: docs@python, dsadowski
priority: normal
severity: normal
status: open
title: venv documentation out of date
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue23921] Standardize documentation whitespace, formatting

2016-01-06 Thread Martin Panter

Martin Panter added the comment:

I do prefer extra space before a comment, otherwise it looks too much like some 
kind of “x # y” binary operator. So I think those changes are worthwhile.

I left some review comments, mainly minor suggestions. Most of the other 
changes look worthwhile. Others I don’t mind either way, but I can understand 
others may prefer them, such as lining up hanging indents for fixed-width fonts.

David: did you end up looking this? Are there any particular bits you think are 
not worth it?

--
nosy: +martin.panter

___
Python tracker 

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



[issue23921] Standardize documentation whitespace, formatting

2016-01-06 Thread R. David Murray

Changes by R. David Murray :


--
nosy:  -r.david.murray

___
Python tracker 

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



[issue23921] Standardize documentation whitespace, formatting

2016-01-06 Thread R. David Murray

Changes by R. David Murray :


--
nosy:  -r.david.murray

___
Python tracker 

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



[issue23921] Standardize documentation whitespace, formatting

2016-01-06 Thread R. David Murray

R. David Murray added the comment:

Sorry, I'm not going to have time to look at it.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-06 Thread R. David Murray

Changes by R. David Murray :


--
nosy:  -r.david.murray

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread R. David Murray

Changes by R. David Murray :


--
nosy:  -r.david.murray

___
Python tracker 

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



[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-01-06 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee:  -> martin.panter

___
Python tracker 

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



[issue16544] Add external link to ast docs

2016-01-06 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Thanks for patch and the work on Green Tree Snakes, Thomas.

It is a great resource. I agree that a lot could be included directly in stdlib 
docs, but till then, as suggested/recommended by Andrew and Ezio, a see also 
link is a good addition.

--
assignee: ezio.melotti -> orsenthil
nosy: +orsenthil
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue26032] Use scandir() to speed up pathlib globbing

2016-01-06 Thread Ben Hoyt

Ben Hoyt added the comment:

Guido, it's true that in almost all cases you get the speedup (no system call), 
and it's very much worth using. But the idea with the docs being non-committal 
is because being specific would make the docs fairly complex. I believe it's as 
follows for is_file/is_dir/is_symlink:

* no system call required on Windows or Unix if the entry is not a symlink
* unless you're on Unix with some different file system (maybe a network FS?) 
where d_type is DT_UNKNOWN
* some other edge case which I've probably forgotten :-)

Do you think the docs should try to make this more specific?

--

___
Python tracker 

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



[issue22995] Restrict default pickleability

2016-01-06 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jan 06, 2016, at 10:13 PM, Serhiy Storchaka wrote:

>What return __reduce_ex__(4) for the NameAssignment instance in 3.5.0?

I'm not sure yet (it takes some time to set up the right environment to test
this), but I do know which TypeError is getting triggered.  In typeobject.c,
it's this stanza in _PyObject_GetState():

assert(slotnames == Py_None || PyList_Check(slotnames));
if (required) {
Py_ssize_t basicsize = PyBaseObject_Type.tp_basicsize;
if (obj->ob_type->tp_dictoffset)
basicsize += sizeof(PyObject *);
if (obj->ob_type->tp_weaklistoffset)
basicsize += sizeof(PyObject *);
if (slotnames != Py_None)
basicsize += sizeof(PyObject *) * Py_SIZE(slotnames);
if (obj->ob_type->tp_basicsize > basicsize) {
Py_DECREF(slotnames);
Py_DECREF(state);
PyErr_Format(PyExc_TypeError,
 "can't pickle %.200s objects",
 Py_TYPE(obj)->tp_name);
return NULL;
}
}

I don't yet know why the basicsize isn't matching up.

--

___
Python tracker 

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



[issue25596] regular files handled as directories in the glob module

2016-01-06 Thread R. David Murray

Changes by R. David Murray :


--
nosy:  -r.david.murray

___
Python tracker 

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



[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2016-01-06 Thread R. David Murray

Changes by R. David Murray :


--
nosy:  -r.david.murray

___
Python tracker 

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



[issue16544] Add external link to ast docs

2016-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 94b0e5e9b6e8 by Senthil Kumaran in branch '3.4':
Issue16544 - Add a link to an external documentation resource in ast module 
docs.
https://hg.python.org/cpython/rev/94b0e5e9b6e8

New changeset ebf164b07be1 by Senthil Kumaran in branch '3.5':
merge from 3.4
https://hg.python.org/cpython/rev/ebf164b07be1

New changeset 62e88e5a61c0 by Senthil Kumaran in branch 'default':
merge from 3.5
https://hg.python.org/cpython/rev/62e88e5a61c0

--
nosy: +python-dev

___
Python tracker 

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



[issue26030] Use PEP8 in documentation examples

2016-01-06 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> I found a lot of missing spaces around binary operators

Please don't make trivial changes like this.

--
nosy: +rhettinger

___
Python tracker 

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



[issue22995] Restrict default pickleability

2016-01-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What return __reduce_ex__(4) for the NameAssignment instance in 3.5.0?

--

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-01-06 Thread Guido van Rossum

Guido van Rossum added the comment:

So, I added docs, mentioning the getattr(arg, 'path', arg) idiom, and (for 3.5 
and 3.6) also cross-referencing with DirEntry.

I'm not sure whether to now close this issue or whether to leave it open to 
remind people of adding patches using the new idiom to various stdlib modules. 
Opinions?

Also, since pathlib is provisional, I felt okay with adding this to 3.4.5 and 
3.5.2.

--
versions: +Python 3.4, Python 3.6

___
Python tracker 

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



[issue26023] Missing signatures operator module

2016-01-06 Thread Martin Panter

Martin Panter added the comment:

Perhaps the patch in Issue 20186 (Argument Clinic conversion including the 
module) will help. I noticed there was some concern about reduced performance; 
I’m not sure if that is still a problem or not.

--
nosy: +martin.panter

___
Python tracker 

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



[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-06 Thread Guido van Rossum

Guido van Rossum added the comment:

Uploading a flattened version of patch3.diff.

--
Added file: http://bugs.python.org/file41519/patch3-regenerated.diff

___
Python tracker 

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



[issue26028] .sort() Causing Strings to Be Listed on the same line

2016-01-06 Thread Hassan Mahroof

New submission from Hassan Mahroof:

I am a student @ Burnley College and we were learning how to use the .write(), 
.close(), .readlines() and .sort().

I have a list of names within a text file which I am trying sort, These are 
random names generated using my Random Mind. However, when the sorted text file 
is created, what seems to be under certain circumstances with my list only (or 
words similar, This bug did not occur within my whole class till I stumbled 
upon it) it seems to instead of writing each term to seperate lines, it seems 
to connect two of the words (in this case names) on the same line. I have tried 
to find a pattern in this madness however being the rookie student I am I can 
only seem to break things aha. I have attached the 2 files which I am using and 
Hopefully someone can correct this cause I am confused.

This is a list of the names:
Robertas
Hassan
Bob
Connor
Camera
Billy
Maz
Richard
Mo

--
components: IDLE
files: SortFile2.py
messages: 257644
nosy: Hassan Mahroof
priority: normal
severity: normal
status: open
title: .sort() Causing Strings to Be Listed on the same line
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file41520/SortFile2.py

___
Python tracker 

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



[issue26029] Broken sentence in extending documentation

2016-01-06 Thread Julien

New submission from Julien:

Hello,

While translating the documentation to French, I found a bug here : 

https://docs.python.org/3/extending/building.html#building-c-and-c-extensions-with-distutils

The sentence: "Normally, a package will contain of addition modules:"
Should probably be: "Normally, a package will contain additional modules:"

Bests.

--
assignee: docs@python
components: Documentation
messages: 257645
nosy: docs@python, sizeof
priority: normal
severity: normal
status: open
title: Broken sentence in extending documentation
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue22995] Restrict default pickleability

2016-01-06 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

I'm reopening this issue because we're starting to see a bunch of regressions 
in Debian and Ubuntu we think is caused by the changes here.  We've definitely 
started seeing them with 3.5.1, where packages that use Cython built just fine 
in 3.5.0 but now fail with TypeError in 3.5.1.  I haven't been able to 
completely debug the problem yet, but here's what I know.

Here's a build log for s3ql that shows the failure: 
http://paste.debian.net/361351/

Here's a bug report showing a build failure for kivy, leading to the same 
problem: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810139

Nothing immediately jumps out at me as problematic with the NameAssignment 
class, which afaict is defined in Cython/Compiler/FlowControl.py as thus:

class NameAssignment(object):
def __init__(self, lhs, rhs, entry):
if lhs.cf_state is None:
lhs.cf_state = set()
self.lhs = lhs
self.rhs = rhs
self.entry = entry
self.pos = lhs.pos
self.refs = set()
self.is_arg = False
self.is_deletion = False
self.inferred_type = None

def __repr__(self):
return '%s(entry=%r)' % (self.__class__.__name__, self.entry)

def infer_type(self):
self.inferred_type = self.rhs.infer_type(self.entry.scope)
return self.inferred_type

def type_dependencies(self):
return self.rhs.type_dependencies(self.entry.scope)

@property
def type(self):
if not self.entry.type.is_unspecified:
return self.entry.type
return self.inferred_type


I suppose it's possible that something outside the class is poking an 
unpicklable attribute into the instance, but wouldn't that show up as a 
pickling error of a different class?  

The TypeError is being raised in deepcopy() in copy.py, where it is getting x's 
__reduce_ex__ and then calling reductor(4) (see ~line 174).  If you catch the 
TypeError on that line and set a breakpoint, then call `copy(x)` you see the 
TypeError.

I tried calling copy.deepcopy() on all the attributes of the NameAssignment 
instance I could find, and they all copied just fine.

I'm going to try to set up a gdb to figure out exactly which of the new 
picklability tests is failing, but I definitely think we have a regression 
here.  I suppose it's also possible that it's a legitimate bug in Cython, but 
then how did it ever work before?

--
status: closed -> open

___
Python tracker 

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



  1   2   >