[issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

2016-06-05 Thread SilentGhost

Changes by SilentGhost :


--
components: +Extension Modules -Interpreter Core
nosy: +larry

___
Python tracker 

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



Re: Don't put your software in the public domain

2016-06-05 Thread Nobody
On Sat, 04 Jun 2016 12:28:33 +1000, Steven D'Aprano wrote:

>> OTOH, a Free software licence is unilateral; the author grants the user
>> certain rights, with the user providing nothing in return.
> 
> That's not the case with the GPL.
> 
> The GPL requires the user (not the end-user, who merely avails themselves
> of their common law right to run the software, but the developer user, who
> copies, distributes and modifies the code) to do certain things in return
> for the right to copy, distribute and modify the code:

The GPL places limitations on the granted licence. That isn't the same
thing as requiring the distributor to do something "in return".

This is why the (relatively few) cases where GPL infringements have
resulted in litigation, the legal basis of the litigation is copyright
infringement, not breach of contract.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Operator precedence problem

2016-06-05 Thread Lawrence D’Oliveiro
On Monday, June 6, 2016 at 4:06:20 AM UTC+12, Uri Even-Chen wrote:
> Never write expressions, such as  2 ** 3 ** 2 or even 2 * 4
> + 5, without parentheses.

That leads to the code equivalent of 
.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-06-05 Thread Susumu Koshiba

Susumu Koshiba added the comment:

Ah yes, you are right. I didn't think about the cases where it will send HEAD 
for codes like 204(No Content). I've created a patch for 3.6 to see if this 
looks reasonable, if review passes, I'll create patches for the rest of the 
releases.

Thanks a lot for pointing this out.

--
Added file: 
http://bugs.python.org/file43255/issue25738_http_reset_content_06.patch

___
Python tracker 

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



Re: Everything good about Python except GUI IDE?

2016-06-05 Thread Michael Torrie
On 06/05/2016 10:01 PM, Michael Torrie wrote:
> I've thought about this before and even tried my hand at creating a nice
> library for doing this sort of thing with Python.  Generators seem like
> a natural analog for the shell pipes. However there is one big problem
> with them and that is they can only deal with one stream at a time.
> Whereas in shell programming there are 2 streams that you can use and
> connect simultaneously.  For example I can simultaneously pipe standard
> out from a program to another command whilst piping standard error to
> another.  I never figured out a way to emulate this idea of piping
> multiple streams.

When I say that Python generators can only deal with one stream at a
time I mean within the context of generator syntax:

for x in gen(gen(gen(...)))

Obviously I could write a function that returns two generators.  It's
just that you can't nest them cleanly.  Not that bash's syntax is
particularly clean when you are messing with standard error as well as
standard out.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I'm wrong or Will we fix the ducks limp?

2016-06-05 Thread Random832
On Sun, Jun 5, 2016, at 23:52, Steven D'Aprano wrote:
> Certainly not. x = y = 999 is required to bind the same object to x and
> y.

My statement was that if two variables can be bound to the same object,
then variables *cannot* contain objects. The object has to exist
somewhere, and this requirement means that the variables cannot be where
the objects live.

> If your variable x were a reference, then we would expect type(x) to
> return
> something like "Reference", but it doesn't, it returns int.

No we would not. You are once again inferring meaning that people's
statements don't actually carry.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Everything good about Python except GUI IDE?

2016-06-05 Thread Michael Torrie
On 03/02/2016 03:36 PM, Marko Rauhamaa wrote:
> Requirements for what I have in mind:
> 
>  1. It would have to be and feel like real Python.
> 
>  2. External commands should be available as callable Python functions.
> 
>  3. Functions/commands should return streams. (Generators, maybe?)
> 
>  4. Pipelines should have an intuitive syntax (but still be valid
> Python).
> 
> Requirements 3 and 4 apply to regular Python code as well.

I've thought about this before and even tried my hand at creating a nice
library for doing this sort of thing with Python.  Generators seem like
a natural analog for the shell pipes. However there is one big problem
with them and that is they can only deal with one stream at a time.
Whereas in shell programming there are 2 streams that you can use and
connect simultaneously.  For example I can simultaneously pipe standard
out from a program to another command whilst piping standard error to
another.  I never figured out a way to emulate this idea of piping
multiple streams.

In the end I decided that Python's superior text processing facilities
eliminated 90% of the reason to use pipes.  And for the other 10%,
generators worked extremely well and efficiently.

http://www.dabeaz.com/generators/Generators.pdf

When I was doing a lot of shell scripting in Python I wrote my own
wrapper routine to launch programs and obtain stdout and stderr, which I
could process with generator filters and that worked fairly elegantly
for many things.  Kind of a half-way approach but it worked well.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I'm wrong or Will we fix the ducks limp?

2016-06-05 Thread Steven D'Aprano
On Mon, 6 Jun 2016 03:42 am, Random832 wrote:

> On Sun, Jun 5, 2016, at 02:37, Steven D'Aprano wrote:
>> No they don't. You are confusing the implementation with the programming
>> model.
>> 
>> Following the assignment:
>> 
>> x = 99
>> 
>> if you print(x), do you see something like "reference 0x12345"? No.
>> 
>> Do you have to dereference that reference to get the value of x? No.
>>
>> At the Python level, the value of x is 99, not some invisible,
>> untouchable reference to 99.
> 
> Sure, but that is the value of the object referenced by x, it is not a
> property of x itself.

You need to be clear about what you are referring to.

x itself is the object 99. When we say "x + 1", we expect to get 100. x is
not some reference to 99, it is 99, just like Barrack Obama is not a
reference to the President of the United States, he is the POTUS.

The *name* "x" is an entity which is bound to (i.e. a reference to) the
object 99, in some specific namespace, at some specific time. The name
itself is an English word consisting of a single letter, "x". Its
implementation in Python is likely to be a str, "x", used as a key in some
namespace (often a dict). The name itself doesn't have any numeric value,
just as the English words "Barrack Obama" themselves are not a person.

There are contexts where we need to refer to names themselves in Python, but
they are comparatively rare. You will usually recognise them from context,
occasionally implicitly, but usually explicitly by talking about "the name
x" or "x" in quotes rather than x. In code, it will usually involve eval or
exec, or sometimes a namespace lookup:

method = vars(self)[methodname.upper()]


Likewise, it is rare to refer to the words rather than the person Barrack
Obama, but when you do, it is usually easy to recognise because you will
generally refer to "Barrack Obama" in quotes.

We might say:

"x" is a single-letter name and x is an int one less than 100

but you normally wouldn't say:

x is a single-letter name and x is an int one less than 100

unless your aim is to cause confusion.

This is no different from the issue in plain English that words have
meaning, and when we use a word, we normally expect them to be interpreted
according to that meaning, and rarely as an abstract word. When we do, we
normally put it in quotation marks, or explicitly state that we are
referring to it as a word:

A cat is a four-legged carnivorous mammal that purrs. "Cat" is a
three-letter word; the word cat is of unknown origin.



> x = y = 999; z = int('999')
> x is y # True
> x is z # False
> 
> How would you describe the difference between x and y, and z? 

The names x and y are bound to the same object. The name z is bound to a
distinct object with equal value.


> This is not a mere implementation detail 

Of course it is. An implementation might be clever enough to recognise that
int('999') is the same as 999 and reuse the same int object. An
implementation might cache *all* ints, regardless of size, or do no caching
at all. The part of that example which is not implementation defined is
that given x = y = 999, the language requires that x and y be the same
object.


> [though, the fact that for int in 
> particular I had to go higher than 99 to get this result is - I wouldn't
> have had this problem with strings,

Really?

py> a = b = "cat"; c = str("cat")
py> a is b is c
True

But again, this is an implementation detail. The caching of strings depends
on the version and implementation, and the string itself.


> and I *couldn't* have had this 
> problem with lists]. The fact that two objects can have the same value
> while being different objects, and that two variables can point to the
> same object, are part of the programming model.

Right. But that's actually not relevant to the question.


[...]
> The fact that == is an operator distinct from 'is' inherently means that
> variables contain references, not objects.

No, you are mixing levels of explanation and conflating implementation and
interface. Would you insist that because we can say that the words Barack
Obama contain eleven letters that the the United States has two words as a
president? That Michelle Obama is married to two words rather than a man?

Of course not. At least, if you are going to make that argument, then you
are so confused that I'm not even going to discuss this with you.

Imagine a horrendously memory profligate implementation that implemented
variables using the fixed memory location model "variables are boxes". When
I write:

x = y = 999; z = 999

the interpreter creates three boxes "x", "y", "z". All three boxes need to
be big enough for an int object, which in this case is about 12 bytes.
Actually a bit bigger, as you will see: let's say 16 bytes, because the
implementation needs (say) four bytes for an object identity tag. All three
boxes get *mostly* the same content, namely the 12 byte object 999, but the
x and y boxes get the identity tag (lets say) 633988994, and 

Re: Operator precedence problem

2016-06-05 Thread ICT Ezy
On Sunday, June 5, 2016 at 10:49:49 PM UTC+5:30, Random832 wrote:
> On Sun, Jun 5, 2016, at 02:53, ICT Ezy wrote:
> > >>> 2 ** 3 ** 2 
> > Answer is 512
> > Why not 64?
> > Order is right-left or left-right?
> 
> You're mixing up order of evaluation with operator associativity. The **
> operator is right-to-left associative, this means x ** y ** z == x ** (y
> ** z). Evaluation is left to right, where it matters [i.e. if one or
> more of the elements here were an expression with side effects]: first x
> is evaluated, then tmp=y**z, then x**tmp. These are two entirely
> different concepts.

Thank you very much for your explanation
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Operator precedence problem

2016-06-05 Thread ICT Ezy
On Monday, June 6, 2016 at 5:18:21 AM UTC+5:30, Michael Torrie wrote:
> On 06/05/2016 10:05 AM, Uri Even-Chen wrote:
> > My suggestion: Never write expressions, such as  2 ** 3 ** 2 or even 2 * 4
> > + 5, without parentheses. Always add parentheses - 2 ** (3 ** 2) (or (2 **
> > 3) **2) or (2 * 4) + 5 (or 2 * (4 + 5)).
> 
> I can understand using parenthesis when operator precedence isn't
> working the way you want or expect, but I certainly would not recommend
> using it for basic arithmetic with multiplication, division, addition
> and subtraction. The rules of precedence for multiplication and division
> are well known and well-understood. If a language failed to implement
> them that would be a bug.  I think for the simple things extraneous
> parenthesis makes expressions more difficult for a human to parse
> because he will tend to second guess himself owing to extra parens.

Thank you very much for your explanation
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Operator precedence problem

2016-06-05 Thread ICT Ezy
On Sunday, June 5, 2016 at 9:36:20 PM UTC+5:30, Uri Even-Chen wrote:
> My suggestion: Never write expressions, such as  2 ** 3 ** 2 or even 2 * 4
> + 5, without parentheses. Always add parentheses - 2 ** (3 ** 2) (or (2 **
> 3) **2) or (2 * 4) + 5 (or 2 * (4 + 5)).
> 
> 
> *Uri Even-Chen*
> [image: photo] Phone: +972-54-3995700
> Email: u...@speedy.net
> Website: http://www.speedysoftware.com/uri/en/
>   
>     
> 
> On Sun, Jun 5, 2016 at 6:05 PM, ICT Ezy  wrote:
> 
> > On Sunday, June 5, 2016 at 1:06:21 PM UTC+5:30, Peter Otten wrote:
> > > ICT Ezy wrote:
> > >
> > >  2 ** 3 ** 2
> > > > Answer is 512
> > > > Why not 64?
> > > > Order is right-left or left-right?
> > >
> > > ** is a special case:
> > >
> > > """
> > > The power operator ** binds less tightly than an arithmetic or bitwise
> > unary
> > > operator on its right, that is, 2**-1 is 0.5.
> > > """
> > > https://docs.python.org/3.5/reference/expressions.html#id21
> > >
> > > Here's a little demo:
> > >
> > > $ cat arithdemo.py
> > > class A:
> > > def __init__(self, value):
> > > self.value = str(value)
> > > def __add__(self, other):
> > > return self._op(other, "+")
> > > def __pow__(self, other):
> > > return self._op(other, "**")
> > > def __repr__(self):
> > > return self.value
> > > def _op(self, other, op):
> > > return A("({} {} {})".format(self.value, op, other.value))
> > > $ python3 -i arithdemo.py
> > > >>> A(1) + A(2) + A(3)
> > > ((1 + 2) + 3)
> > > >>> A(1) ** A(2) ** A(3)
> > > (1 ** (2 ** 3))
> >
> > Thank you very much for your explanation
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >

Thank you very much for your explanation
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue27233] Missing documentation for PyOS_FSPath

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

I haven’t really been following the FS-path stuff, but I guess this also needs

.. versionadded:: 3.6

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

___
Python tracker 

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



[issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

2016-06-05 Thread Rustemzade Mehemmed

Changes by Rustemzade Mehemmed :


--
components: +Interpreter Core
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



[issue27107] mailbox.__all__ list is incomplete

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

FTR the closest thing I could find discussing reap_children() is Issue 16968.

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



[issue27105] cgi.__all__ is incomplete

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

Thanks for the patches Jacek. This one I committed after moving the test into 
CgiTests.

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



[issue27239] Make idlelib.macosx self-contained.

2016-06-05 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Lib/idlelib/macosx.py:8 initializes _tk_type to None.  It next defines private 
function _initializeTkVariantTests, which in called in setupApp and which 
initializes _tk_type.  Then follow 4 isXyzTk functins, which "assert _tk_type 
is not None".  This is fine for IDLE because IDLE call setupApp on startup.

This is not fine for testing.  In general, tests do not and should not call 
setupApp. If a test happens to exercise one of the 11 (for now) isXyzTk calls 
occurring outside of macosx, the assert is triggered.  The test writer must 
then discover to import and call the supposedly private 
_initializeTkVariantTests.

I would prefer instead that maxosx be more self-contained, and initialize 
_tk_type as needed.  _initializeTkVariantTests needs a Tk instance for this 
line.
ws = root.tk.call('tk', 'windowingsystem')
I would like to wrap that with root = tkinter.Tk() and root.destroy.  If that 
cannot be done on import, then instead of deleting the asserts, replace them 
with conditional calls to the initialization function.

--
assignee: terry.reedy
messages: 267513
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: Make idlelib.macosx self-contained.
type: behavior
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



[issue27109] plistlib.__all__ list is incomplete

2016-06-05 Thread Martin Panter

Changes by Martin Panter :


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



[issue27110] smtpd.__all__ list is incomplete

2016-06-05 Thread Martin Panter

Changes by Martin Panter :


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



[issue27108] mimetypes.__all__ list is incomplete

2016-06-05 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> fixed
stage: commit 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



[issue27107] mailbox.__all__ list is incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d62e57958e7c by Martin Panter in branch 'default':
Issue #27107: mailbox.fcntl = None on Windows
https://hg.python.org/cpython/rev/d62e57958e7c

--

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

Maybe an alternative would be to add a special PYTHONHASHSEED=best-effort (or 
whatever) value that says if there is no entropy available, use a predictable 
hash seed. That would force whoever starts the Python process to be aware of 
the problem.

--

___
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

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a36c7f87eba9 by Martin Panter in branch 'default':
Issue #23883: News updates for __all__ attributes
https://hg.python.org/cpython/rev/a36c7f87eba9

--

___
Python tracker 

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



[issue27108] mimetypes.__all__ list is incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2057b0af1c52 by Martin Panter in branch 'default':
Issue #27108: Add missing names to mimetypes.__all__, by Jacek Kołodziej
https://hg.python.org/cpython/rev/2057b0af1c52

--
nosy: +python-dev

___
Python tracker 

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



[issue27105] cgi.__all__ is incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 74ed6f3fb8d2 by Martin Panter in branch 'default':
Issue #27105: Add cgi.test() to __all__, based on Jacek Kołodziej’s patch
https://hg.python.org/cpython/rev/74ed6f3fb8d2

--
nosy: +python-dev

___
Python tracker 

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



[issue27109] plistlib.__all__ list is incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 450171f53e81 by Martin Panter in branch 'default':
Issue #27109: Add InvalidFileException to __all__, by Jacek Kołodziej
https://hg.python.org/cpython/rev/450171f53e81

--
nosy: +python-dev

___
Python tracker 

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



[issue27107] mailbox.__all__ list is incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4705b7597c86 by Martin Panter in branch 'default':
Issue #27107: Add exception classes to mailbox.__all__, by Jacek Kołodziej
https://hg.python.org/cpython/rev/4705b7597c86

--
nosy: +python-dev

___
Python tracker 

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



[issue27110] smtpd.__all__ list is incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bcc0c3fd4a40 by Martin Panter in branch 'default':
Issue #27110: Add smtpd.SMTPChannel to __all__, by Jacek Kołodziej
https://hg.python.org/cpython/rev/bcc0c3fd4a40

--
nosy: +python-dev

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

Minor thing: the patch has tabbed intentation in places rather than spaces.

As I understand it, if there is no entropy initialized, this patch will fall 
back to reading /dev/urandom, which will return predictable data (opposite of 
“random” data!). But since we take this non-strict fallback in other cases 
(e.g. no OS support), there is a decent argument for also taking the 
predictable fallback path when entropy is uninitialized.

--
nosy: +martin.panter

___
Python tracker 

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



[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-05 Thread Xiang Zhang

Xiang Zhang added the comment:

@skip_if_broken_ubuntu_ssl doesn't work in this case. `hasattr(ssl, 
'PROTOCOL_SSLv2')` returns False.

--

___
Python tracker 

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



[issue24759] Idle: require tk 8.5 and ttk widgets, and drop unneeded code.

2016-06-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Fixed whitespace and added comment.

--
Added file: http://bugs.python.org/file43254/require85-v3.diff

___
Python tracker 

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



[issue24790] Idle: improve stack viewer

2016-06-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Deleted .keys in 8.6.

--
versions:  -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-05 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> fixed
stage: commit 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



[issue27156] IDLE: remove unused code

2016-06-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

3 and 4 removed. Closing at least until I find something else that is not part 
of a refactoring but needs at least a question answered.

--
components: +IDLE
nosy:  -python-dev
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



Re: I'm wrong or Will we fix the ducks limp?

2016-06-05 Thread Lawrence D’Oliveiro
On Monday, June 6, 2016 at 1:08:21 PM UTC+12, Gregory Ewing wrote:
> The only special-ish thing about [None] is that it's unique --
> there will never be another one like it, no matter how
> much dog breeding you do. Fortunately, it's also immortal.

Maybe not immortal, but it seems to have 533 lives.

Anybody who writes a C extension module for Python knows that Py_None is an 
object just like any other, and has to be treated the same in terms of managing 
its reference counts.

(That’s how many unbalanced calls I had to make to Py_DECREF(Py_None) before it 
crashed Python.)
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue27156] IDLE: remove unused code

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 166784c40be8 by Terry Jan Reedy in branch 'default':
Issue #27156: Remove more unused idlelib code.
https://hg.python.org/cpython/rev/166784c40be8

--

___
Python tracker 

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



Re: I'm wrong or Will we fix the ducks limp?

2016-06-05 Thread Lawrence D’Oliveiro
On Sunday, June 5, 2016 at 3:18:05 PM UTC+12, I wrote:

> (This makes no difference for immutable objects, only mutable ones.)

I retract this part.

Thanks, Marko, for showing me where I was wrong. :)
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue17598] mingw: init system calls

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

Part of this patch is superceded by revision c7adad17f663 (Issue 22579). Here 
is a patch of the remaining significant changes. But I don’t know enough about 
Modules/Setup.config.in and Modules/Setup.dist to give it a proper review.

--
nosy: +martin.panter
stage:  -> patch review
versions: +Python 3.6 -Python 3.4
Added file: http://bugs.python.org/file43253/MINGW-INITSYS.v2.patch

___
Python tracker 

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



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

I was a little concerned that Alex’s patch used “test A -ef B”, which is not 
specified by Posix. But it is apparently widely supported (and consider we 
would only need it for cross compilation). Anyway, I was going to suggest test 
"$(srcdir)" == "." instead, but maybe Xavier’s solution is slightly better 
again.

I say go with vpath.patch, perhaps with a brief comment explaining that the cp 
+ mv dance avoids copying the file onto itself when doing an in-tree build.

--
stage:  -> commit review
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



Re: I'm wrong or Will we fix the ducks limp?

2016-06-05 Thread Gregory Ewing

Random832 wrote:

There *is* a variable called None
[getattr(__builtins__, 'None')] which holds a leash tied to that puppy
... But nothing's special about the object
itself, no more than any other object.


The only special-ish thing about it is that it's unique --
there will never be another one like it, no matter how
much dog breeding you do. Fortunately, it's also immortal.

It's not the only puppy with that property, though.
For instance, there's the pair True and False, born
of the same litter but of quite opposite temperaments.
And type, the ancient mother of all canines.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


[issue26014] Guide users to the newer package install instructions

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

Thanks, Susan, for your suggested patch.  I expanded on it to address all of 
the issues Nick brought up and then some, such as also updating to the changed 
setuptools doc link.  Pushed for release in 2.7.12, 3.5.2, and 3.6.0.

--
nosy: +ned.deily
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
versions: +Python 2.7, 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



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-05 Thread Yoni Lavi

Yoni Lavi added the comment:

Thank you very much for the detailed review, Nathan. Attached is a new patch 
that resolves the merge issues, and some of the other issues you mentioned. 

Concerning the index reference in marshal.rst , ah, yes, I missed that it only 
related to a single paragraph. I reverted that change.

Concerning versionadded in unittest.mock-examples.rst, you're right, I saw that 
this was already available elsewhere and removed it for consistency with other 
similar intro files. I'll revert if you tell me.

I think I fixed all the smaller issues you mentioned, too. I wasn't sure about 
the fuzz; I didn't see any issue, so I assume it was automatically resolved by 
`hg update`. 

I don't have any input to give concerning the 'subjective' issues and will be 
happy to wait for a decision.

--
Added file: http://bugs.python.org/file43252/mywork3.patch

___
Python tracker 

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



[issue26014] Guide users to the newer package install instructions

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 71fc5b246f5b by Ned Deily in branch '2.7':
Issue #26014: Guide 2.7 users to the new packaging documentation:
https://hg.python.org/cpython/rev/71fc5b246f5b

New changeset f5fd646b265b by Ned Deily in branch '3.5':
Issue #26014: Update 3.x packaging documentation:
https://hg.python.org/cpython/rev/f5fd646b265b

New changeset 7583d65da2ad by Ned Deily in branch 'default':
Issue #26014: merge from 3.5
https://hg.python.org/cpython/rev/7583d65da2ad

--
nosy: +python-dev

___
Python tracker 

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



[issue27238] Bare except: usages in turtle.py

2016-06-05 Thread Jelle Zijlstra

New submission from Jelle Zijlstra:

Will add a patch

--
assignee: Jelle Zijlstra
components: Library (Lib)
messages: 267493
nosy: Jelle Zijlstra, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Bare except: usages in turtle.py
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



[issue27072] random.getrandbits is limited to 2**31-1 bits on 64-bit Windows

2016-06-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Sorry Steven, I'm going to mark this as rejected on the grounds that it is 
likely to do more harm than good.  We could in fact make the range larger but 
it easily creates terrible effects (encouraging bad design and creating a 
non-interruptable, long-running, total-memory-filling call).  

While we do allow ``2 ** 50 ** 50``, that call is more deliberately asking for 
trouble than getrandbits(2**60).  If someone really needed that number of bits, 
it isn't hard to multiple calls to getrandbits() and combine the results, 
deliberately and interruptably.

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



[issue27236] Add CHAINED_COMPARE_OP opcode

2016-06-05 Thread Demur Rumed

Demur Rumed added the comment:

@rhettinger can you clarify your opinion in relation to #27140 with #27095 & 
#27213 in mind?

I agree that CHAINED_COMPARE_OP is unnecessary

--

___
Python tracker 

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



[issue27237] Kafka Python Consumer Messages gets truncated

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

Sorry, kafka is a third-party package, not part of the Python Standard Library. 
 Suggest you pursue this with the Kafka project:

http://kafka-python.readthedocs.io/en/master/support.html

--
nosy: +ned.deily
resolution:  -> third party
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



[issue27215] Docstrings of Sequence and MutableSequence seems not right

2016-06-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I think you're reading too much into the docs.  Most useful classes provide a 
__new__ or __init__ to put data into instances.  The docs are simply saying 
that that responsibility lies with the implementer rather than with the ABC.

IMO, the docs are more useful as-is.  Were we to accept the patch, it wouldn't 
be long before another user reported a bug saying that the implemented the 
other methods but the class didn't do anything useful.

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

I just spoke with @doko about this here at PyCon.  I think we came to the 
conclusion it might be time to consider removing the old 
@skip_if_broken_ubuntu_ssl decorator and focus on making the tests work with 
the most recent releases since pretty much every distributor and current Python 
releases have moved to disabling the old compromised ssl/tls versions.

--

___
Python tracker 

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



[issue27237] Kafka Python Consumer Messages gets truncated

2016-06-05 Thread Rahul

New submission from Rahul:

Snippet code is below:
from kafka import KafkaConsumer
from kafka.client import KafkaClient
from kafka.consumer import SimpleConsumer

consumer = KafkaConsumer('eventdetails_ingestion' , 
group_id='1',bootstrap_servers=‘:9092', max_partition_fetch_bytes=1055)
for msg in consumer:
try:
jValue = json.loads(str(msg.value))
   except ValueError:
fileErr.write(str(msg.value)+"\n")

Steps:
We send/produce large sets of messages to Kafka of around 20 to 30 KB size each 
messages in JSON format and producing around 200 messages / sec for 1 hour 
duration. We have 3 Kafka Brokers running and I am trying to consume the 
messages from these 3 Kafka Brokers from the same topic using the above code. 
The problem is that sometimes some of the messages gets truncated, I am not 
sure why it happen ?

--
components: Library (Lib)
messages: 267487
nosy: rgo...@threatmetrix.com
priority: normal
severity: normal
status: open
title: Kafka Python Consumer Messages gets truncated
type: performance
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



[issue23401] Add pickle support of Mapping views

2016-06-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> Raymond, what is your opinion?

Whether and how to pickle should be at the discretion of a concrete class 
rather than a requirement for being a mapping.  For example, it may not make 
any sense for a persistent dictionary such as a FileDict or an SQLDict.  Also, 
my mental model of a mapping view is something that is transparent, a window to 
the world rather than the world itself.

--

___
Python tracker 

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



[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

This test is already decorated with @skip_if_broken_ubuntu_ssl. I’m not sure 
Python should go too far out of its way to handle downstream patches, but it 
seems there is a precedent here.

--
nosy: +martin.panter

___
Python tracker 

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



Re: Yet Another Cairo API Binding

2016-06-05 Thread Lawrence D’Oliveiro
On Thursday, June 2, 2016 at 9:16:25 AM UTC+12, I wrote:
> Thought I would mention Qahirah , which is
> yet another binding for the Cairo  graphics
> library.

To add to this, I have bindings for Pixman 
 (examples at 
) and FreeType 
 (examples at 
).

Of course, everybody wants to see pretty pictures. So have a look here 
, here 
 
and here 
.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue27236] Add CHAINED_COMPARE_OP opcode

2016-06-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Please stop adding new opcodes for rare use cases.  That represents a sharp 
departure from our entire history of adding opcodes.

Code like "x = a < b > c < d" almost never comes up.

--
nosy: +rhettinger

___
Python tracker 

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



Re: Operator precedence problem

2016-06-05 Thread Michael Torrie
On 06/05/2016 10:05 AM, Uri Even-Chen wrote:
> My suggestion: Never write expressions, such as  2 ** 3 ** 2 or even 2 * 4
> + 5, without parentheses. Always add parentheses - 2 ** (3 ** 2) (or (2 **
> 3) **2) or (2 * 4) + 5 (or 2 * (4 + 5)).

I can understand using parenthesis when operator precedence isn't
working the way you want or expect, but I certainly would not recommend
using it for basic arithmetic with multiplication, division, addition
and subtraction. The rules of precedence for multiplication and division
are well known and well-understood. If a language failed to implement
them that would be a bug.  I think for the simple things extraneous
parenthesis makes expressions more difficult for a human to parse
because he will tend to second guess himself owing to extra parens.

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26336] Expose regex bytecode as attribute of compiled pattern object

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Yes, you can get at it with ctypes. I released a small (and virtually untested) 
library at https://github.com/JelleZijlstra/regdis that provides dis-like 
capabilities.

--

___
Python tracker 

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



Re: I'm wrong or Will we fix the ducks limp?

2016-06-05 Thread cs

On 03Jun2016 16:09, Sayth Renshaw  wrote:

(By the way, the "pf = pf.append(thing)" construction is weird.
All you need is pf.append(thing).)


I got the pf = pf.append(thing) from doing pandas because in pandas its not an 
inplace function.


In Python this doesn't do what you think. The convention with most Python 
methods is that methods which perform an in-place action return None, which 
means the above assignment will unbind "pf", binding it to None instead.


BTW, the short answer to why you can't just say pf.append(thing) and have "pf" 
be a list is that ".append" is not _inherently_ a list method i.e. the langauge 
does not specify that name as special. You can have another type where .append 
does somehing else. Therefore, the deduction that pf is uspposed to be a list 
may not be made.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-05 Thread Jack McCracken

Jack McCracken added the comment:

Don't know how useful this will be, but here's a crash report from Mac OS X 
10.11 with Klamann's example (Python 3.5).

--
nosy: +Jack.McCracken
Added file: http://bugs.python.org/file43251/coredump_macosx10.11.5.crash

___
Python tracker 

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



[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Jack McCracken

Jack McCracken added the comment:

Here's the patch I made.

--
keywords: +patch
Added file: http://bugs.python.org/file43250/add-many-slash-path-note.patch

___
Python tracker 

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



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Yes, those changes incorrectly assume that the source directory and the build 
directory are always different (using VPATH). Alex patch LGTM, this other patch 
overwrites the graminit.[ch] files, not sure if this is better.

--
Added file: http://bugs.python.org/file43249/vpath.patch

___
Python tracker 

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



[issue26467] Add async magic method support to unittest.mock.Mock

2016-06-05 Thread Yusuke Tsutsumi

Yusuke Tsutsumi added the comment:

Taking a look at the code, this may require a bit more discussion.

Mock's classes create copies of themselves when an attribute is accessed. As 
such, I can't just add __aexit__ and have it generate a different mock type 
entirely, unless I know exactly what an async variant of this mock is.

If there was a way to specifically provide a function for asynchronous 
situations, like __acall__, that would make this a lot easier as well.

Anyway, my proposal now is:

create new classes MockAsync and MagicMockAsync, and have MockAsync and 
MagicMockAsync implement the __aexit__ and __aenter__ methods.

How is that as an approach?

--

___
Python tracker 

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



[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Jack McCracken

Jack McCracken added the comment:

Hey all - I would love to write a patch :) Working on it!

--
nosy: +Jack.McCracken

___
Python tracker 

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



Re: I'm wrong or Will we fix the ducks limp?

2016-06-05 Thread Random832
On Sun, Jun 5, 2016, at 15:20, Marko Rauhamaa wrote:
> I say None is a wooden post, you say None is a puppy.
> 
> What piece of Python code could put our dispute to rest?

isinstance(None, object)

Anyway, I read the "wooden post" claim as suggesting that a reference to
None is somehow different from other references, as null in C# or Java
is different from an object reference in those languages.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-06-05 Thread Eric Fahlgren

Eric Fahlgren added the comment:

Thanks, Serhiy.  I sort of figured that it would get fixed with the
wordcode rework, and was going to verify that it was when 3.6 settled down.

On Sun, Jun 5, 2016 at 8:30 AM, Serhiy Storchaka 
wrote:

>
> Serhiy Storchaka added the comment:
>
> This bug was fixed in issue26881 with similar patch. Sorry, I didn't know
> about this issue. Your patches look good. In any case thank you for your
> effort.
>
> --
> nosy: +serhiy.storchaka
> resolution:  -> out of date
> stage:  -> resolved
> status: open -> closed
> superseder:  -> modulefinder should reuse the dis module
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue27127] Never have GET_ITER not followed by FOR_ITER

2016-06-05 Thread Demur Rumed

Demur Rumed added the comment:

I've gotten most tests to past by having FOR_ITER be traced as if the 
instruction index is that of the corresponding FOR_BEGIN. test_sys_settrace 
still fails on test_15_loops because an empty loop body doesn't have the 'pass' 
line traced (ie when FOR_ITER starts the line) which I'm currently pondering 
ways around

The first patch, which only moved GET_ITER into the closure, would still be 
good for list/set/dict comprehensions (to help PREDICT & JITs)

If there's essentially a decision that all loops should have JUMP_ABSOLUTE to 
their beginning for the sake of tracing simplicity, then FOR_BEGIN/FOR_ITER are 
dead

--

___
Python tracker 

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



[issue27052] Python2.7.11+ as in Debian testing and Ubuntu 16.04 LTS crashes with segfault

2016-06-05 Thread Matthias Klose

Matthias Klose added the comment:

(checked with the recent packages in Debian unstable and Ubuntu yakkety)

--

___
Python tracker 

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



[issue27052] Python2.7.11+ as in Debian testing and Ubuntu 16.04 LTS crashes with segfault

2016-06-05 Thread Matthias Klose

Changes by Matthias Klose :


--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue27052] Python2.7.11+ as in Debian testing and Ubuntu 16.04 LTS crashes with segfault

2016-06-05 Thread Matthias Klose

Matthias Klose added the comment:

I'm unable to reproduce this with the 2.7 branch 20160603.

--

___
Python tracker 

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



[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2016-06-05 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +davin
versions: +Python 3.5, Python 3.6 -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



[issue27224] IDLE: editor versus grep line number differ

2016-06-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Yesterday, I grepped three times and got the same wrong result each time, so I 
know I was not crazy.  But today, starting fresh with no IDLE or TortoiseHg 
running, all is well.  Closing as 'heisenbug' ;-).  Lesson: start fresh before 
reporting weird behavior.  (I should have known.  I occasionally have to reboot 
windows to reset its key mappings.)  Thanks, and sorry for the noise.

--
resolution:  -> not a bug
stage: test needed -> 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



[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

Can we close this as an Ubuntu-specific problem?

--
nosy: +doko, ned.deily

___
Python tracker 

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



[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Arno-Can Uestuensoez

Arno-Can Uestuensoez added the comment:

Hi Serhiy,
I am currently still investigating it for my own project. 

  
https://stackoverflow.com/questions/37646103/posix-path-1003-1-examples-and-behaviour-for-foo-bar

Currently I do not have the build environment, so I can provide the text, but 
because I am a bit under pressure with finishing a larger pack of OpenSource 
projects currently I cannot manage to setup the environment.

So can do this eventually in 2-3Weeks.

--

___
Python tracker 

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



[issue24459] Mention PYTHONFAULTHANDLER in the man page

2016-06-05 Thread Joshua Jay Herman

Joshua Jay Herman added the comment:

I have reviewed the comments on Rietveld and made the changes to the patch. 
Attached is the revised version.

--
Added file: 
http://bugs.python.org/file43248/addMissingEnvironmentVariables-review-1.patch

___
Python tracker 

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



[issue27052] Python2.7.11+ as in Debian testing and Ubuntu 16.04 LTS crashes with segfault

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

FWIW, I am also unable to reproduce the crash on OS X with a current top-of-2.7 
debug build.  Since it doesn't seem to be able to be reproduced with stock 
Python 2.7's, perhaps it is time to close the issue here?

--
nosy: +ned.deily

___
Python tracker 

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



[issue27127] Never have GET_ITER not followed by FOR_ITER

2016-06-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It looks to me this idea is dead.

--

___
Python tracker 

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



[issue26336] Expose regex bytecode as attribute of compiled pattern object

2016-06-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I prefer 'rexcode' for the attribute name.

I share Serhiy's  reservations.  When people write code that depends on CPython 
implementation details, even though documented as such, the existence of such 
code becomes a drag on change, especially when details have been stable for 
awhile.  I just saw this used as an argument against one of the proposed 
bytecode/wordcode changes. "It would break current 3rd party code." It also 
came up a few years ago with randomizing hashes (and dict iteration order).

Jelle, can one access the 'rexcode' via ctypes?  Is so, I think an re 
disassembler with docs would be a good pypi module.  Maybe you could also make 
it work with Barnett's regex module.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue27186] add os.fspath()

2016-06-05 Thread Dusty Phillips

Dusty Phillips added the comment:

Ethan: Can you clarify what you mean by "testing the other classes"? 
PureWindowsPath and PurePosixPath are tested by extension of _BasePurePathTest. 
So I think you mean that _BasePathTest also needs testing, but I don't see 
anything in there that would mirror the constructor testing that is happening 
in PurePath.

--

___
Python tracker 

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



Re: I'm wrong or Will we fix the ducks limp?

2016-06-05 Thread Marko Rauhamaa
Random832 :

> On Sun, Jun 5, 2016, at 02:37, Steven D'Aprano wrote:
>> You bind values (that is, objects)
>
> Values are not objects. x and z have the same value, and their objects
> are identical but distinct, but they are different because they point
> (or refer, or by your weird terminology "bind") to different objects.

Terminological disputes are not very useful. However, note that your
use of the word "value" is not the only one:

   Assignment statements are used to (re)bind names to values and to
   modify attributes or items of mutable objects
   https://docs.python.org/3/reference/simple_stmts.h
   tml#assignment-statements>

   The returned value (if any) is used as an argument to construct
   StopIteration and becomes the StopIteration.value attribute.
   https://docs.python.org/3/reference/simple_stmts.h
   tml#the-return-statement>

   The type of the exception is the exception instance’s class, the
   value is the instance itself.
   https://docs.python.org/3/reference/simple_stmts.htm
   l#the-raise-statement>

while on the other hand,

   Every object has an identity, a type and a value.
   https://docs.python.org/3/reference/datamodel.htm
   l#objects-values-and-types>

   The operators <, >, ==, >=, <=, and != compare the values of two
   objects. The objects do not need to have the same type.
   https://docs.python.org/3/reference/expressions.htm
   l#value-comparisons>

IOW, sometimes the word "value" is a synonym of "object," at other times
it refers to the specific characteristics of an object. The latter
concept is not defined very clearly:

   The value of some objects can change. Objects whose value can change
   are said to be mutable; objects whose value is unchangeable once they
   are created are called immutable. (The value of an immutable
   container object that contains a reference to a mutable object can
   change when the latter’s value is changed; however the container is
   still considered immutable, because the collection of objects it
   contains cannot be changed. So, immutability is not strictly the same
   as having an unchangeable value, it is more subtle.) An object’s
   mutability is determined by its type; for instance, numbers, strings
   and tuples are immutable, while dictionaries and lists are mutable.
   https://docs.python.org/3/reference/datamodel.html#objec
   ts-values-and-types>


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue27236] Add CHAINED_COMPARE_OP opcode

2016-06-05 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

For now complex code is generated for chained comparing.

$ echo "x = a < b > c < d" | ./python -m dis
  1   0 LOAD_NAME0 (a)
  2 LOAD_NAME1 (b)
  4 DUP_TOP
  6 ROT_THREE
  8 COMPARE_OP   0 (<)
 10 JUMP_IF_FALSE_OR_POP28
 12 LOAD_NAME2 (c)
 14 DUP_TOP
 16 ROT_THREE
 18 COMPARE_OP   4 (>)
 20 JUMP_IF_FALSE_OR_POP28
 22 LOAD_NAME3 (d)
 24 COMPARE_OP   0 (<)
 26 JUMP_FORWARD 4 (to 32)
>>   28 ROT_TWO
 30 POP_TOP
>>   32 STORE_NAME   4 (x)
 34 LOAD_CONST   0 (None)
 36 RETURN_VALUE

Proposed patch adds CHAINED_COMPARE_OP opcode that does all necessary stack 
manipulatios. Using it the generated code is simpler:

$ echo "x = a < b > c < d" | ./python -m dis
  1   0 LOAD_NAME0 (a)
  2 LOAD_NAME1 (b)
  4 CHAINED_COMPARE_OP   0 (<)
  6 JUMP_IF_FALSE_OR_POP18
  8 LOAD_NAME2 (c)
 10 CHAINED_COMPARE_OP   4 (>)
 12 JUMP_IF_FALSE_OR_POP18
 14 LOAD_NAME3 (d)
 16 COMPARE_OP   0 (<)
>>   18 STORE_NAME   4 (x)
 20 LOAD_CONST   0 (None)
 22 RETURN_VALUE

--
components: Interpreter Core
files: chained_compare_op.patch
keywords: patch
messages: 267466
nosy: Demur Rumed, Mark.Shannon, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Add CHAINED_COMPARE_OP opcode
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43247/chained_compare_op.patch

___
Python tracker 

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



Re: I'm wrong or Will we fix the ducks limp?

2016-06-05 Thread Marko Rauhamaa
Random832 :

> On Sun, Jun 5, 2016, at 04:01, Marko Rauhamaa wrote:
>> You could also think of variables as pegs, references as leashes, and
>> objects as cute puppies. One puppy could be held with multiple
>> leashes hung on separate pegs. Some puppies hold leashes in their
>> mouths. Every leash is tied to a puppy or a special wooden post
>> called None.
>
> You've got it all wrong about what's special about None. The object is
> just another puppy. There *is* a variable called None
> [getattr(__builtins__, 'None')] which holds a leash tied to that
> puppy, but it's rarely used, since everyone knows how to find that
> puppy directly [None is a keyword]. But nothing's special about the
> object itself, no more than any other object.

I say None is a wooden post, you say None is a puppy.

What piece of Python code could put our dispute to rest?


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Anyone know a donation app codebase?

2016-06-05 Thread Ben Finney
Albert  writes:

> Thank you for your answer Ben,

You're welcome. Please note that top-posting is poor etiquette for
discussions; instead, interleave your response like a written dialogue.
See .

> That is not exactly what I am looking for. I am interested in knowing
> if there are any python (django, flask, etc) opensource projects for
> managing donations

Again, PyPI is the place to search
.

> Any suggestion please?

I hope that helps.

-- 
 \  “It seems intuitively obvious to me, which means that it might |
  `\   be wrong.” —Chris Torek |
_o__)  |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26582] asyncio documentation links to wrong CancelledError

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

This patch documents CancelledError in the asyncio documentation.

--
keywords: +patch
nosy: +Jelle Zijlstra
Added file: http://bugs.python.org/file43246/issue26582.patch

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Brett Cannon

Changes by Brett Cannon :


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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Brett Cannon

Changes by Brett Cannon :


--
type: behavior -> enhancement

___
Python tracker 

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



[issue25941] Add 'How to Review a Patch' section to devguide

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

The revised patch looks good to me (other than some trailing whitespace).  
Camilla, thanks for your contribution.  If you haven't already, please sign a 
contributor form to cover this and future contributions as noted elsewhere in 
the Developer's Guide:

https://docs.python.org/devguide/coredev.html#sign-a-contributor-agreement

--
nosy: +ned.deily
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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Michał Górny

Michał Górny added the comment:

Yes, you could put it like this.

--

___
Python tracker 

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



[issue25941] Add 'How to Review a Patch' section to devguide

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8b3f4473432e by Ned Deily in branch 'default':
Issue #25941: Add "How To Review A Patch" section to the devguide.
https://hg.python.org/devguide/rev/8b3f4473432e

--
nosy: +python-dev

___
Python tracker 

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



[issue19489] move quick search box above TOC

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Yes, I don't think we control this, the layout is generated by sphinx.

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue15243] Misleading documentation for __prepare__

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

I think the current documentation is correct and doesn't need changes. There is 
also already an example of a working __prepare__ method.

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Brett Cannon

Brett Cannon added the comment:

But distutils still does the right thing with -O2 and --optimize 2, right? If 
that's the case then this is an enhancement request to add support to distutils 
to compile all bytecode levels and not a regression.

--

___
Python tracker 

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



[issue27182] PEP 519 support in the stdlib

2016-06-05 Thread Brett Cannon

Brett Cannon added the comment:

Functions that only accept file descriptors should not be updated to work with 
__fspath__() as it will never return an int/fd.

As for Ethan's suggestion, are you saying you want to toss the str/bytes check 
from os.fspath()? If so then you will need to go to python-dev and bring that 
up as the PEP clearly specifies that str/bytes is checked for and specifically 
in the order of the Python code. The thinking behind the current design is that 
since __fspath__() has to be explicitly implemented that people will do so 
properly, versus accidentally passing in some type that isn't str/bytes like 
the pre-PEP 519 world (i.e. trust the __fspath__() implementors to do the right 
thing and only protect against someone passing in something wrong from 
complicated code flow).

There has been discussion about using the ``path.__fspath__() if hasattr(path, 
'__fspath__') else path`` idiom in os.path so that the pre-existing type-checks 
can do their thing instead of checking twice, although that's different from 
how os.fspath() works (then again, since this is all new code we could argue 
that going our own route in os.path is acceptable in the name of performance).

--

___
Python tracker 

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



[issue27215] Docstrings of Sequence and MutableSequence seems not right

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

The docstrings (at least in 3.6) say subclasses must override __new__ *or* 
__init__. However, I think this is wrong too. The following is a correct (if 
not very useful) implementation of Sequence:

>>> import collections.abc
>>> class MySequence(collections.abc.Sequence):
... def __getitem__(self, key):
... raise IndexError(key)
... def __len__(self):
... return 0
... 

Other abc docstrings also don't claim that __init__ or __new__ must be 
implemented. The attached patch fixes the docstrings.

--
keywords: +patch
nosy: +Jelle Zijlstra
Added file: http://bugs.python.org/file43245/issue27215.patch

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-05 Thread Ned Deily

Changes by Ned Deily :


--
stage:  -> patch review

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-05 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +larry

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

Since 3.5.2 is almost upon us, I'm setting this to "release blocker" status so 
we can make a decision about whether this should be changed for 3.5.2 or not.  
@haypo, do you have an opinion about the patch?

--
nosy: +ned.deily
priority: normal -> release blocker

___
Python tracker 

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



[issue27221] [multiprocessing] Doc is outdated regarding method picklability

2016-06-05 Thread Jelle Zijlstra

Changes by Jelle Zijlstra :


Added file: http://bugs.python.org/file43244/issue27221.patch

___
Python tracker 

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



[issue27221] [multiprocessing] Doc is outdated regarding method picklability

2016-06-05 Thread Jelle Zijlstra

Changes by Jelle Zijlstra :


Removed file: http://bugs.python.org/file43243/issue27233.patch

___
Python tracker 

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



[issue19234] socket.fileno() documentation

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

This looks fixed.

--
nosy: +Jelle Zijlstra
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



[issue27221] [multiprocessing] Doc is outdated regarding method picklability

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Patch attached. I also checked that this case is tested, and it looks like the 
Bunch object in Lib/test/_test_multiprocessing.py uses a method as its target.

--
keywords: +patch
nosy: +Jelle Zijlstra
Added file: http://bugs.python.org/file43243/issue27233.patch

___
Python tracker 

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



[issue26971] python v3.5.1: sys.paths not respecting DESTDIRS and DESTSHARED

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

Sorry, it is no longer clear to me exactly what problem(s) and solution are 
being proposed here.  When dealing with installation problems like this, we 
have to be *very* precise: here's what I started with on what platform, here 
are the contents of the relevant directories and/or files before I start, here 
are exactly the steps I took, here are the results I expected, and here are the 
results I observed.  Using a downloaded tarball and the steps in @yaro-yaro's 
initial message, I see no change in /usr/lib64; note, there *may* have been 
Python .so files installed there by system packages but that should be 
irrelevant to building and installing your own Python.  I also could not 
reproduce @jojo's recipe as best I understand it and don't see how it could 
produce any change in /usr/lib64.  Changing the value of --libdir is a whole 
different matter and not relevant to the original problem.  Also the title of 
the issue refers to DESTDIR and DESTSHARED but nowhere in the body of the issue 
a
 re these variables directly referenced, so I have to assume they aren't being 
explicitly set.

Unless someone can better demonstrate an actual problem here, I'm going to 
close this issue.

--
status: open -> pending

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Michał Górny

Michał Górny added the comment:

Brett, .pyc was controlled by --compile and .pyo by --optimize (either 1 or 2). 
Technically only two variants could be used simultaneously, and distutils 
accounted for that.

Now you have .pyc + .opt-1.pyc + .opt-2.pyc, so three variants instead of two.

--

___
Python tracker 

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



  1   2   >