[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Ethan Furman

Ethan Furman added the comment:

Okay, scratch the "not file descriptors" part of my comment, but the rest still 
stands.

--

___
Python tracker 

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



[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Ethan Furman

Ethan Furman added the comment:

Nowhere else in the stdlib is 'readfd' defined, and 'writefd' is only used once 
in a test.

I think tacking on the 'fd' is both too low level as well as misleading since 
these are not file descriptors.

If there is no agreement on read/write (understandable since those are usually 
methods), then perhaps input/output?

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-06-30 Thread STINNER Victor

STINNER Victor added the comment:

I reviewed multibind.patch.

--

___
Python tracker 

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



[issue23883] __all__ lists are incomplete

2015-06-30 Thread Martin Panter

Martin Panter added the comment:

The technical bit of Issue23883_support_check__all__.v3.patch looks pretty 
good. Mainly some grammar suggestions for the documentation.

Issue23883_test_gettext.v2.patch looks fine; just depends on check__all__() 
being added.

Couple of comments about the APIs for ftplib and threading. The changes for the 
other modules all look good though.

Regarding name_of_module, no strong opinion, but maybe keep it as it is for 
simplicity. You only used it once so far I think anyway.

--
stage: needs patch -> patch review

___
Python tracker 

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Yury Selivanov

Changes by Yury Selivanov :


--
status: open -> closed

___
Python tracker 

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



[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Yury Selivanov

Yury Selivanov added the comment:

Here's a patch, please review.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file39839/ospipe.patch

___
Python tracker 

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




[issue24487] Change asyncio.async() → ensure_future()

2015-06-30 Thread Yury Selivanov

Changes by Yury Selivanov :


--
status: open -> closed

___
Python tracker 

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



[issue24542] ssl - SSL_OP_NO_TICKET not reimplemented

2015-06-30 Thread Samuel Hoffman

New submission from Samuel Hoffman:

Realizing the _ssl module does not import very many constants, I think it might 
be worth while to reimplement and document SSL_OP_NO_TICKET (0x4000) as 
it's another one of the "enable this for improved security at a cost" options 
like SSL_OP_SINGLE_DH_USE and SSL_OP_SINGLE_ECDH_USE. 

This appears to effect Python 2.7+.

--
components: Extension Modules, Library (Lib)
messages: 246022
nosy: alex, christian.heimes, dstufft, giampaolo.rodola, janssen, miniCruzer, 
pitrou
priority: normal
severity: normal
status: open
title: ssl - SSL_OP_NO_TICKET not reimplemented
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue24487] Change asyncio.async() → ensure_future()

2015-06-30 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks, Martin!

--
resolution: out of date -> fixed

___
Python tracker 

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



[issue24487] Change asyncio.async() → ensure_future()

2015-06-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1b3be273e327 by Yury Selivanov in branch '3.5':
Issue #24487: Rename async() -> ensure_future() in asyncio docs.
https://hg.python.org/cpython/rev/1b3be273e327

New changeset 3dc2a113e8a7 by Yury Selivanov in branch 'default':
Merge 3.5 (Issue #24487)
https://hg.python.org/cpython/rev/3dc2a113e8a7

--
nosy: +python-dev

___
Python tracker 

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



[issue24541] test_eightteen() in test_inspect out of sync with documentation

2015-06-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bd45435fd081 by Yury Selivanov in branch '3.5':
Issue #24541: Drop test_inspect.test_eightteen unittest; update docs
https://hg.python.org/cpython/rev/bd45435fd081

--

___
Python tracker 

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



[issue24541] test_eightteen() in test_inspect out of sync with documentation

2015-06-30 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks for pushing this Martin. I didn't notice that you suggested to update 
inspect.rst as well. And it does make sense to just remove the number of is* 
functions from the docs (and after that we don't need the unittest).

--

___
Python tracker 

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



[issue24487] Change asyncio.async() → ensure_future()

2015-06-30 Thread Martin Panter

Martin Panter added the comment:

Reopening. The patch still applies to the current code (e.g. revision 
df310e5ac015, 30 June). It changes eight references of “async()” that still 
exist in this revision.

--
status: closed -> open

___
Python tracker 

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



[issue24541] test_eightteen() in test_inspect out of sync with documentation

2015-06-30 Thread Martin Panter

Martin Panter added the comment:

Okay but what about the documentation? It still claims sixteen.

# This test is here for remember you to update Doc/library/inspect.rst

--

___
Python tracker 

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



[issue24541] test_eightteen() in test_inspect out of sync with documentation

2015-06-30 Thread Yury Selivanov

Yury Selivanov added the comment:

This has already been fix (see issue24400).  I've also updated the comment (16 
-> 18).  Let's keep the test as is.

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

___
Python tracker 

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



[issue24541] test_eightteen() in test_inspect out of sync with documentation

2015-06-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a5c6eaa7d733 by Yury Selivanov in branch '3.5':
Issue #24541: Update comment in test_inspect.test_eightteen
https://hg.python.org/cpython/rev/a5c6eaa7d733

--
nosy: +python-dev

___
Python tracker 

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Martin Panter

Martin Panter added the comment:

Opened Issue 24541 related to this latest change. The test and documentation 
are still inconsistent, even if the test passes.

--

___
Python tracker 

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



[issue24541] test_eightteen() in test_inspect out of sync with documentation

2015-06-30 Thread Martin Panter

New submission from Martin Panter:

Revision 0b7c313851ca highlights an inconsistency in the test case at the top 
of the TestPredicates class. After removing isawaitable() in Issue 24400, there 
are now actually eighteen is* functions. The comment in the test case still 
says there are sixteen (from before the two iscoroutine* functions were added), 
and so does the documentation it references: ‘The sixteen functions whose names 
begin with “is” ’ 
. The quick 
fix is to change all the numbers to eighteen.

But maybe a better fix is to drop it all and rewrite the documentation to just 
say “The functions whose names begin with “is” are mainly provided . . .”.

--
assignee: docs@python
components: Documentation, Tests
messages: 246012
nosy: docs@python, vadmium
priority: normal
severity: normal
status: open
title: test_eightteen() in test_inspect out of sync with documentation
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



[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Yury Selivanov

Yury Selivanov added the comment:

+1 for readfd/writefd.  I think 'fd' suffix is necessary to make it explicit 
that those aren't file objects.

--
nosy: +yselivanov

___
Python tracker 

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Yury Selivanov

Yury Selivanov added the comment:

> Look like you forgot to adjust test_inspect for the removal. eg:
My bad.  Thanks, David!

--

___
Python tracker 

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0b7c313851ca by Yury Selivanov in branch '3.5':
Issue #24400: Fix failing unittest
https://hg.python.org/cpython/rev/0b7c313851ca

New changeset 8c85291e86bf by Yury Selivanov in branch 'default':
Merge 3.5 (Issue #24400)
https://hg.python.org/cpython/rev/8c85291e86bf

--

___
Python tracker 

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread R. David Murray

R. David Murray added the comment:

Look like you forgot to adjust test_inspect for the removal. eg:

http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/54

--
nosy: +r.david.murray
status: closed -> open

___
Python tracker 

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



[issue24132] Direct sub-classing of pathlib.Path

2015-06-30 Thread Kevin Norris

Kevin Norris added the comment:

If I were designing pathlib from scratch, I would not have a separate Path 
class.  I would instead do something like this:

In pathlib.py:

if os.name == 'nt':
Path = WindowsPath
else:
Path = PosixPath

Alternatively, Path() could be a factory function that picks one of those 
classes at runtime.

Of course, that still leaves the issue of where to put the method 
implementations which currently live in Path.  We could change the name of Path 
to _Path and use the code above to continue providing a Path alias, but that 
might be too confusing.  Another possibility is to pull those methods out into 
top-level functions and then alias them into methods in WindowsPath and 
PosixPath (perhaps using a decorator-like-thing to pass the flavor, instead of 
attaching it to the class).

The main thing, though, is that Path should not depend on its subclasses.  That 
really strikes me as poor design, since it produces issues like this one.

--
nosy: +Kevin.Norris

___
Python tracker 

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



[issue24535] SELinux reporting writes, executes, and dac_overwrites

2015-06-30 Thread Nick Levinson

Nick Levinson added the comment:

Thank you. I didn't know enough to understand the relevance of blueman.

--

___
Python tracker 

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



Re: [issue24534] disable executing code in .pth files

2015-06-30 Thread M.-A. Lemburg
On 01.07.2015 00:16, Min RK wrote:
> 
>> Just because a feature can be misused doesn't make it a bad feature.
> 
> That's fair. I'm just not aware of any uses of this feature that aren't 
> misuses, hence the patch.

I don't remember the details of why this feature was added,
but can imagine that it was supposed to enable installation
of new importers via .pth files.

Without this feature it would not be possible to add entries to
sys.path via .pth files which can only be handled by non-standard
importers.

>> Perhaps you could submit a fix for this to the setuptools maintainers 
>> instead.
> 
> Yes, that's definite the right thing to do, and in fact the first thing I 
> did. It looks like that patch is likely to be merged; it is certainly much 
> less disruptive. That's where I started, then I decided to bring it up to 
> Python itself after reading up on the exploited feature, as it seemed to me 
> like a feature with no use other than misuse.

Thanks, that's certainly a good way forward :-)

-- 
Marc-Andre Lemburg
eGenix.com

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e20c197f19d6 by Yury Selivanov in branch '3.5':
Issue #24400: Remove inspect.isawaitable().
https://hg.python.org/cpython/rev/e20c197f19d6

New changeset 800bf6a0e0d5 by Yury Selivanov in branch 'default':
Merge 3.5 (Issue #24400)
https://hg.python.org/cpython/rev/800bf6a0e0d5

--

___
Python tracker 

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



[issue24534] disable executing code in .pth files

2015-06-30 Thread Min RK

Min RK added the comment:

> Just because a feature can be misused doesn't make it a bad feature.

That's fair. I'm just not aware of any uses of this feature that aren't 
misuses, hence the patch.

> Perhaps you could submit a fix for this to the setuptools maintainers instead.

Yes, that's definite the right thing to do, and in fact the first thing I did. 
It looks like that patch is likely to be merged; it is certainly much less 
disruptive. That's where I started, then I decided to bring it up to Python 
itself after reading up on the exploited feature, as it seemed to me like a 
feature with no use other than misuse.

Thanks for your time.

--

___
Python tracker 

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Ben Darnell

Ben Darnell added the comment:

Yes, I can switch use the ABC instead, and I agree that it doesn't make sense 
to have the inspect method if it's going to be equivalent to the ABC.

I'm happy with the outcome here but AFAIK the original issue still stands: the 
Awaitable ABC is unusual in that `isinstance(x, Awaitable)` may produce 
different results than `issubclass(x.__class__, Awaitable)`. I'd like to see 
more explicit documentation of the facts that A) functools.singledispatch is 
not always equivalent to isinstance() and B) Awaitable is one case (the only 
one in the stdlib?) where this distinction occurs.

--

___
Python tracker 

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Yury Selivanov

Yury Selivanov added the comment:

> > isawaitable(), however, should continue using abc.Awaitable, since it only 
> > checks for __await__ presence on the type (or should we just drop it?)

> I'd really remove it. It's not referring to an actual type, so it doesn't fit 
> the purpose of the inspect module. The fact that the only place where 
> "collections.abc" is used in this module is in isawaitable() should be a 
> clear indication that it's misplaced.

+1.

I added 'isawaitable()' before we decided to add ABCs, and now it is redundant 
(and we don't have isiterable, ishashable etc)

Ben, I saw that you're using isawaitable() in tornado, but it looks like you 
can easily switch the code to use Awaitable ABC, right?

--

___
Python tracker 

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



[issue24534] disable executing code in .pth files

2015-06-30 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 30.06.2015 22:49, Min RK wrote:
> 
>> Could you please post an example of where the feature is problematic ?
> 
> setuptools/easy_install is the major one, which effectively does 
> `sys.path[:0] = pth_contents`, breaking import priority. This has been known 
> to result in adding `/usr/lib/pythonX.Y/dist-packages` to the front of 
> sys.path, having higher priority that the stdlib or `--user` -installed 
> packages (I helped a user deal with a completely broken installation that was 
> a result of exactly this last week). The result can often be that `pip list` 
> doesn't accurately describe the versions of packages that are imported. It 
> also causes `pip install -e` to result in completely different import 
> priority from `pip install`, which doesn't use easy-install.pth. Removing the 
> code execution from `easy-install.pth` solves all of these problems.

Ok, so you regard the way that setuptools uses the feature as
problematic. I'm sure some people will agree (including myself),
but this is not a good reason to remove the feature altogether.

Just because a feature can be misused doesn't make it a bad
feature. Otherwise, we'd have quite a few things we'd have to
remove from Python :-)

I'd suggest to try to fix the setuptools uses of the feature
instead - in a way that doesn't break all setuptools installations,
of course. Perhaps you could submit a fix for this to the
setuptools maintainers instead.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

--

___
Python tracker 

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



[issue24534] disable executing code in .pth files

2015-06-30 Thread Min RK

Min RK added the comment:

> Could you please post an example of where the feature is problematic ?

setuptools/easy_install is the major one, which effectively does `sys.path[:0] 
= pth_contents`, breaking import priority. This has been known to result in 
adding `/usr/lib/pythonX.Y/dist-packages` to the front of sys.path, having 
higher priority that the stdlib or `--user` -installed packages (I helped a 
user deal with a completely broken installation that was a result of exactly 
this last week). The result can often be that `pip list` doesn't accurately 
describe the versions of packages that are imported. It also causes `pip 
install -e` to result in completely different import priority from `pip 
install`, which doesn't use easy-install.pth. Removing the code execution from 
`easy-install.pth` solves all of these problems.

--

___
Python tracker 

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



[issue24534] disable executing code in .pth files

2015-06-30 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 30.06.2015 20:52, Min RK wrote:
> 
> Thanks for the feedback, I thought it might be a long shot. I will go back to 
> removing the *use* of the feature everywhere I can find it, since it is so 
> problematic and rarely, if ever, desirable.

Could you please post an example of where the feature is
problematic ?

>> it's an essential feature that has been documented for a very long time
>> https://docs.python.org/3.5/library/site.html
> 
> The entirety of the documentation of this feature appears to be this sentence 
> on that page:
>
>> Lines starting with import (followed by space or tab) are executed.

Yep, but it's enough to be in active use.

--

___
Python tracker 

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



[issue24540] Documentation about skipkeys parameter for json.dumps is incorrect

2015-06-30 Thread Matthew Havard

New submission from Matthew Havard:

The documentation from json.dumps says this about skipkeys:

If ``skipkeys`` is false then ``dict`` keys that are not basic types
(``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped
instead of raising a ``TypeError``.

However, that contradicts the docstrings for JSONEncoder in the encoder.py 
file, and json.dump in the same file, __init__.py:

json.dump:
If ``skipkeys`` is true then ``dict`` keys that are not basic types
(``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped
instead of raising a ``TypeError``.

JSONEncoder:
If skipkeys is false, then it is a TypeError to attempt
encoding of keys that are not str, int, long, float or None.  If
skipkeys is True, such items are simply skipped.

So the fix is just that the word "false" to "true".

--
messages: 245997
nosy: Matthew Havard
priority: normal
severity: normal
status: open
title: Documentation about skipkeys parameter for json.dumps is incorrect
versions: Python 2.7

___
Python tracker 

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



[issue24534] disable executing code in .pth files

2015-06-30 Thread Min RK

Min RK added the comment:

Thanks for the feedback, I thought it might be a long shot. I will go back to 
removing the *use* of the feature everywhere I can find it, since it is so 
problematic and rarely, if ever, desirable.

> it's an essential feature that has been documented for a very long time
> https://docs.python.org/3.5/library/site.html

The entirety of the documentation of this feature appears to be this sentence 
on that page:

> Lines starting with import (followed by space or tab) are executed.

No explanation or examples are given, nor any reasoning about the feature or 
why one might use it.

> This change will basically break all Python applications

This surprises me. Can you elaborate? I have not seen an application rely on 
executing code in .pth files.

> If you believe that we can smoothly move to a world without .pth files, 
> you should propose an overall plan, step by step.

I have no desire to remove .pth files. .pth files are a fine way to add 
locations to sys.path. It's .pth files *executing arbitrary code* that's the 
problem, very surprising, and a source of many errors (especially how it is 
used in setuptools).

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue24528] Misleading exeption for await in comprehensions.

2015-06-30 Thread Yury Selivanov

Changes by Yury Selivanov :


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



[issue24528] Misleading exeption for await in comprehensions.

2015-06-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 30b676e8b21f by Yury Selivanov in branch '3.5':
Issue #24528: Improve error message for awaits in comprehensions
https://hg.python.org/cpython/rev/30b676e8b21f

New changeset 9598bc916186 by Yury Selivanov in branch 'default':
Merge 3.5 (Issue #24528)
https://hg.python.org/cpython/rev/9598bc916186

--
nosy: +python-dev

___
Python tracker 

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-06-30 Thread Matthias Bussonnier

Matthias Bussonnier added the comment:

Note that I've signed the CLA, and it has been taken into account, as now I 
have a small star agains my name (if it was the limiting factor, we never know).

--

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-06-30 Thread Cyd Haselton

Cyd Haselton added the comment:

On June 30, 2015 9:20:45 AM CDT, Ryan Gonzalez  wrote:
>
>Ryan Gonzalez added the comment:
>
>On June 30, 2015 8:14:34 AM CDT, Cyd Haselton 
>wrote:
>>
>>Cyd Haselton added the comment:
>>
>>Your question about -fPIE brings up a question: How should the
>>differences between Android 5 and previous versions be handled in
>>regards to this issue?
>>
>>Other than mandatory -fPIE, there are changes to Android[s libc that
>>may make  patches for python on Android 4.x incompatible with Android
>>5.
>>
>
>WHAT??? :( I can't find a list anywhere; how do you know?
>

I tried building GCC for Android 5 on device and ran into a bunch of errors 
like 'undefined symbol __swbuf.'  Googling the errors led to this page: 
https://developer.android.com/ndk/downloads/revision_history.html.

Relevant Part here:

" Removed the following symbols from all architectures: 
get_malloc_leak_info,free_malloc_leak_info, __srget, __swbuf, 
__srefill,__swsetup, __sdidinit, __sflags, __sfp, __sinit, __smakebuf,__sflush, 
__sread, __swrite, __sseek, __sclose, _fwalk,__sglue, __get_thread, __wait4, 
__futex_wake, __open,__get_tls, __getdents64, and dlmalloc."

>>Thoughts?
>
>Not really...

Would setting up two repos be advisable...one for 5 and one for 4.x and earlier?
>
>>
>>On June 29, 2015 9:29:35 AM CDT, Cyd Haselton 
>>wrote:
>>>
>>>Cyd Haselton added the comment:
>>>
>>>No...haven't upgraded to Android 5.0 yet.  
>>>
>>>On June 29, 2015 9:00:01 AM CDT, Ryan Gonzalez
>>
>>>wrote:

Ryan Gonzalez added the comment:

You compiled with -fPIE and GCC, right? I know the Android Clang
>>seems
broken.

On June 29, 2015 7:09:25 AM CDT, Cyd Haselton
>>
wrote:
>
>Cyd Haselton added the comment:
>
>FYI, Figured out that running ./configure with --with-pydebug does
>>>NOT
>define Py_DEBUG in pyconfig.h.
>
>Defining it in pyconfig.h got me past the "undefined reference to
>`_PyUnicode_CheckConsistency'" error, but i'm now getting this:
>
>if test $? -ne 0 ; then \
>echo "generate-posix-vars failed" ; \
>rm -f ./pybuilddir.txt ; \
>exit 1 ; \
>fi
>Debug memory block at address p=0x90b7b0: API ''
>2416312320 bytes originally requested
>The 3 pad bytes at p-3 are not all FORBIDDENBYTE (0xfb):
>at p-3: 0x00 *** OUCH
>at p-2: 0x00 *** OUCH
>at p-1: 0x00 *** OUCH
> Because memory is corrupted at the start, the count of bytes
requested
>   may be bogus, and checking the trailing pad bytes may
>>>segfault.
>The 4 pad bytes at tail=0x9096b7b0 are Segmentation fault
>generate-posix-vars failed
>make: *** [pybuilddir.txt] Error 1
>
>Will re-check patch application and try again
>
>--
>
>___
>Python tracker 
>
>___

--

___
Python tracker 

___
>>>
>>>--
>>>
>>>___
>>>Python tracker 
>>>
>>>___
>>
>>--
>>
>>___
>>Python tracker 
>>
>>___
>
>--
>
>___
>Python tracker 
>
>___

--

___
Python tracker 

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



[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Jonathan Slenders

Jonathan Slenders added the comment:

Niki Spahiev made a valid argument saying that the following code is common:

if not hasattr(src, 'read'): src = open(src)

This will break if we name it 'read'/'write'  like the methods of a file object.

--

___
Python tracker 

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



[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Ethan Furman

Ethan Furman added the comment:

'read'/'write' is sufficient.

+1 for the proposal.

--
nosy: +ethan.furman

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-06-30 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

On June 30, 2015 8:14:34 AM CDT, Cyd Haselton  wrote:
>
>Cyd Haselton added the comment:
>
>Your question about -fPIE brings up a question: How should the
>differences between Android 5 and previous versions be handled in
>regards to this issue?
>
>Other than mandatory -fPIE, there are changes to Android[s libc that
>may make  patches for python on Android 4.x incompatible with Android
>5.
>

WHAT??? :( I can't find a list anywhere; how do you know?

>Thoughts?

Not really...

>
>On June 29, 2015 9:29:35 AM CDT, Cyd Haselton 
>wrote:
>>
>>Cyd Haselton added the comment:
>>
>>No...haven't upgraded to Android 5.0 yet.  
>>
>>On June 29, 2015 9:00:01 AM CDT, Ryan Gonzalez
>
>>wrote:
>>>
>>>Ryan Gonzalez added the comment:
>>>
>>>You compiled with -fPIE and GCC, right? I know the Android Clang
>seems
>>>broken.
>>>
>>>On June 29, 2015 7:09:25 AM CDT, Cyd Haselton
>
>>>wrote:

Cyd Haselton added the comment:

FYI, Figured out that running ./configure with --with-pydebug does
>>NOT
define Py_DEBUG in pyconfig.h.

Defining it in pyconfig.h got me past the "undefined reference to
`_PyUnicode_CheckConsistency'" error, but i'm now getting this:

if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Debug memory block at address p=0x90b7b0: API ''
2416312320 bytes originally requested
The 3 pad bytes at p-3 are not all FORBIDDENBYTE (0xfb):
at p-3: 0x00 *** OUCH
at p-2: 0x00 *** OUCH
at p-1: 0x00 *** OUCH
 Because memory is corrupted at the start, the count of bytes
>>>requested
   may be bogus, and checking the trailing pad bytes may
>>segfault.
The 4 pad bytes at tail=0x9096b7b0 are Segmentation fault
generate-posix-vars failed
make: *** [pybuilddir.txt] Error 1

Will re-check patch application and try again

--

___
Python tracker 

___
>>>
>>>--
>>>
>>>___
>>>Python tracker 
>>>
>>>___
>>
>>--
>>
>>___
>>Python tracker 
>>
>>___
>
>--
>
>___
>Python tracker 
>
>___

--

___
Python tracker 

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



[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2015-06-30 Thread Gerrit Holl

Gerrit Holl added the comment:

Perhaps the solution would be some kind of flag, at least for copytree and 
possibly others, on what to do when attributes cannot be completely copied — a 
bit like numpys options to raise, warn, or ignore?

--

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-06-30 Thread Cyd Haselton

Cyd Haselton added the comment:

Your question about -fPIE brings up a question: How should the differences 
between Android 5 and previous versions be handled in regards to this issue?

Other than mandatory -fPIE, there are changes to Android[s libc that may make  
patches for python on Android 4.x incompatible with Android 5.

Thoughts?

On June 29, 2015 9:29:35 AM CDT, Cyd Haselton  wrote:
>
>Cyd Haselton added the comment:
>
>No...haven't upgraded to Android 5.0 yet.  
>
>On June 29, 2015 9:00:01 AM CDT, Ryan Gonzalez 
>wrote:
>>
>>Ryan Gonzalez added the comment:
>>
>>You compiled with -fPIE and GCC, right? I know the Android Clang seems
>>broken.
>>
>>On June 29, 2015 7:09:25 AM CDT, Cyd Haselton 
>>wrote:
>>>
>>>Cyd Haselton added the comment:
>>>
>>>FYI, Figured out that running ./configure with --with-pydebug does
>NOT
>>>define Py_DEBUG in pyconfig.h.
>>>
>>>Defining it in pyconfig.h got me past the "undefined reference to
>>>`_PyUnicode_CheckConsistency'" error, but i'm now getting this:
>>>
>>>if test $? -ne 0 ; then \
>>>echo "generate-posix-vars failed" ; \
>>>rm -f ./pybuilddir.txt ; \
>>>exit 1 ; \
>>>fi
>>>Debug memory block at address p=0x90b7b0: API ''
>>>2416312320 bytes originally requested
>>>The 3 pad bytes at p-3 are not all FORBIDDENBYTE (0xfb):
>>>at p-3: 0x00 *** OUCH
>>>at p-2: 0x00 *** OUCH
>>>at p-1: 0x00 *** OUCH
>>> Because memory is corrupted at the start, the count of bytes
>>requested
>>>   may be bogus, and checking the trailing pad bytes may
>segfault.
>>>The 4 pad bytes at tail=0x9096b7b0 are Segmentation fault
>>>generate-posix-vars failed
>>>make: *** [pybuilddir.txt] Error 1
>>>
>>>Will re-check patch application and try again
>>>
>>>--
>>>
>>>___
>>>Python tracker 
>>>
>>>___
>>
>>--
>>
>>___
>>Python tracker 
>>
>>___
>
>--
>
>___
>Python tracker 
>
>___

--

___
Python tracker 

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



[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2015-06-30 Thread R. David Murray

R. David Murray added the comment:

There are a couple of related open issues.  I think there is an stdlib problem 
here, but I"m not sure what the solution is.

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



[issue24539] StreamReaderProtocol.eof_received() should return True to keep the transport open

2015-06-30 Thread Guido van Rossum

New submission from Guido van Rossum:

See https://github.com/python/asyncio/issues/251. I'm on vacation and may or 
may not find the time to actually fix this (it needs a unittest written).

--
components: asyncio
messages: 245986
nosy: gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: StreamReaderProtocol.eof_received() should return True to keep the 
transport open
versions: Python 3.4, 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



[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2015-06-30 Thread Gerrit Holl

New submission from Gerrit Holl:

`shutil.copystat` fails on [panfs](https://en.wikipedia.org/wiki/Panasas#PanFS) 
if the source file lacks u+w, because setting extended attributes results in a 
`PermissionError`.  This leads to higher end functions such as 
`shutil.copytree` to fail.  More seriously, it leads to `pip install .` to 
fail, as I [reported here](https://github.com/pypa/pip/issues/2941):

In [55]: shutil.copystat("/src/on/panfs", "/tmp/fubar")
---
PermissionError   Traceback (most recent call last)
 in ()
> 1 
shutil.copystat("/home/users/gholl/checkouts/pyatmlab/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack",
 "/tmp/fubar")

/home/users/gholl/lib/python3.4/shutil.py in copystat(src, dst, 
follow_symlinks)
211 else:
212 raise
--> 213 _copyxattr(src, dst, follow_symlinks=follow)
214
215 def copy(src, dst, *, follow_symlinks=True):

/home/users/gholl/lib/python3.4/shutil.py in _copyxattr(src, dst, 
follow_symlinks)
151 try:
152 value = os.getxattr(src, name, 
follow_symlinks=follow_symlinks)
--> 153 os.setxattr(dst, name, value, 
follow_symlinks=follow_symlinks)
154 except OSError as e:
155 if e.errno not in (errno.EPERM, errno.ENOTSUP, 
errno.ENODATA):

PermissionError: [Errno 13] Permission denied: '/tmp/fubar'

This occurs for any source file where the user write bit is not set.

Now, I'm not sure if this should be addressed in `pip`, `shutil.copytree`, 
`shutil.copystat`, `setxattr`, `panfs`, or in none of the above.  I'm reporting 
it in different places; please close this issue if this is the wrong place.

--
components: Library (Lib)
messages: 245985
nosy: Gerrit.Holl
priority: normal
severity: normal
status: open
title: os.setxattr PermissionError on panfs propagates up causing `copystat`, 
`copytree`, and `pip install .` to fail unhepfully
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2015-06-30 Thread Gerrit Holl

Changes by Gerrit Holl :


--
type:  -> crash

___
Python tracker 

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



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-06-30 Thread Ed Maste

Changes by Ed Maste :


--
nosy: +emaste

___
Python tracker 

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



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-06-30 Thread koobs

Changes by koobs :


--
keywords: +needs review
nosy: +koobs

___
Python tracker 

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



[issue24537] Py_Initialize unable to load the file system codec

2015-06-30 Thread Dana Christen

New submission from Dana Christen:

I'm using the C API to embed the Python interpreter (see the attached example). 
Everything works fine until I try to run the resulting executable on a machine 
without a Python installation. In that case, the call to Py_Initialize fails 
with the following message:

Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

This was on Windows 7 64 bit, and the program was compiled using MS Visual 
Studio 2010 in x64 Release mode, using the official Python 3.4.3 64 bit release 
(v3.4.3:9b73f1c3e601).

--
components: Extension Modules
files: python_api_hello.c
messages: 245984
nosy: Dana Christen
priority: normal
severity: normal
status: open
title: Py_Initialize unable to load the file system codec
type: crash
versions: Python 3.4
Added file: http://bugs.python.org/file39838/python_api_hello.c

___
Python tracker 

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



[issue24534] disable executing code in .pth files

2015-06-30 Thread Christian Heimes

Changes by Christian Heimes :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue24534] disable executing code in .pth files

2015-06-30 Thread Nick Coghlan

Nick Coghlan added the comment:

As others have noted, we're not going to change this default in the standard 
CPython executable (due to the degree of disruption involved), and the -S and 
-I switches already effectively turn it off (by disabling site module 
processing entirely)

However, it could be reasonable to consider offering a way to disable *just* 
the execution of arbitrary code from .pth files, while otherwise allowing the 
site module to run.

--

___
Python tracker 

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



[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Chris Angelico

Chris Angelico added the comment:

Another good option is read/write without the 'fd' suffix. Either works, I'd 
prefer the shorter one but by a small margin.

--
nosy: +Rosuav

___
Python tracker 

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



[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Jonathan Slenders

New submission from Jonathan Slenders:

As discussed on python-ideas, os.pipe should return a structsequence instead of 
a plain tuple.

To be decided is the naming for the read and write end.
Personally, I'm in favour of using readfd/writefd.

> our_pipe = pipe()
> os.write(our_pipe.writefd, b'data')
> os.read(our_pipe.readfd, 1024)

--
components: IO
messages: 245980
nosy: jonathan.slenders
priority: normal
severity: normal
status: open
title: os.pipe() should return a structsequence (or namedtuple.)
versions: Python 3.6

___
Python tracker 

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