Re: Proposed new syntax

2017-08-22 Thread Rustom Mody
Since this erm… discussion has also brought in Haskell
and in this case, the name, the history etc are related I thought I'd mention 
the following

Around 2015 there was a major upheaval in the Haskell community around the
socalled FTP (foldable-traversable-prelude) controversy.

In many respects this controversy is analogous and even identical to this one
and the heat there was considerably more than this thread's storm-in-a-teaspoon

Mark Lentczner resigned as Haskell's release manager¹
which in the python world would be analogous to say Raymond Hettinger saying
“Python 3 is too much of a mess; I am going to stick to python 2.2”
Along with hims went other stalwarts like Lennart Augustsson and Eric Meijer's
widely acclaimed EdX course switched from haskell to hugs²
[which is like switching to python 1.6]

The controversy somewhat oversimplified is that foldr (reduce-from-right) was
foldr : (a → b → b) → b → [a] → b
It was changed to
foldr : Foldable 풯  ⇒  (a → b → b) → b → 풯 a → b

If we think of [a] as list_of_a and 풯 a as any general list-like interface
we would see the close parallel with the divergence of opinion on this thread

¹ 
http://haskell.1045720.n5.nabble.com/quot-Excuse-me-I-think-this-i-my-stop-quot-Resigning-from-the-Platform-td5819861.html
² 
https://www.reddit.com/r/haskell/comments/3ove2e/got_the_welcome_email_from_edx_fp101x_course_hugs/
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv

2017-08-22 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, I think Sphinx is way too complicated for its own good, and it's arguably 
not the fault of Python's documentation that this doesn't work for you.

I would like to close this issue as "won't fix", except... in a sense Tuple 
actually *is* a class, since you can subclass from e.g. Tuple[int, str].

@Levikvskyi, what do you think?

--

___
Python tracker 

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



[issue16217] Tracebacks are unnecessarily verbose when using 'python -m'

2017-08-22 Thread Nick Coghlan

Nick Coghlan added the comment:

The reason we don't always drop the importlib frames in general is because we 
need them when we're debugging importlib itself, as well as when folks are 
calling into it directly. However, I think it would be reasonable to do it 
unconditionally for unhandled exceptions triggered via "-m": if we want the 
unfiltered exception in that case, we can either edit runpy to skip the 
filtering (when working on runpy), or else call the runpy API directly, rather 
than via -m.

That means I like the idea of implementing the traceback filtering and display 
inside runpy._run_module_as_main itself, rather than relying on the default 
interpreter level traceback display.

One potential approach to that would be to expand the current code that 
suppresses tracebacks entirely for runpy._Error exceptions to also handle the 
"except Exception as exc:" case and print out a traceback variants that omits 
any frames from runpy, importlib, or _frozen_importlib (KeyboardInterrupt and 
SystemExit would still escape unmodified)

As far as the implementation goes, this could potentially be made a general 
feature of the new(ish) TracebackException 
https://docs.python.org/3/library/traceback.html#tracebackexception-objects 
class by accepting an "ignore_modules" iterable as a parameter to 
TracebackException.format() and then ignoring frames running code from those 
modules (conveniently, runpy, importlib, and _frozen_importlib between them 
will exercise the cases of a single-file module, a self-contained package, and 
a frozen module, so only namespace package support would end up relying 
entirely on synthetic test cases).

--
versions: +Python 3.7 -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



[issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv

2017-08-22 Thread Bernát Gábor

Bernát Gábor added the comment:

I suppose when the python.org documentation is generated the objects.inv file 
gets generated with it (I did not found exactly this piece of code here 
though). When Sphinx runs, it's intersphinx plugin goes out to python.org, 
downloads the objects.inv, decodes it, and then tries to map the docstring 
param/return values/references to URLs. 

Actually intersphinx does not make the deduction of the type. It uses what the 
users entered in the docstring. In this case the user needs to know for each 
element to which bucket has been assigned to (e.g. 
class/data/function/method/exception/macro); and for compatibility reason that 
needs to stay stable, otherwise with a Python upgrade the user would need to 
update the code of its docstrings.

That being said for the sake of automation, in my case there actually another 
sphinx plugin 
(https://github.com/agronholm/sphinx-autodoc-typehints/blob/master/sphinx_autodoc_typehints.py)
 which actually generates, on the fly, the type information. So I suppose as a 
fix for my problem the sphinx_autodoc_typehint could be altered to still give 
back data, even though this now is a class. I'm not sure though how confident I 
am on "lying" to users about the data/class; but I suppose it's a necessary 
evil at this point.

So should we keep everything as it is? When I first identified why Tuple does 
not have the URL mapped to it, I thought the problem to be the fact that it 
goes to the wrong bucket (by just inspecting its type): data; but now I see 
that may not be such a bad thing after all.

--

___
Python tracker 

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



[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-22 Thread Isaac Elliott

New submission from Isaac Elliott:

In Python 3.5 and 3.6 (at least), the language reference presents a grammar 
that disallows assignment to literals.

For example, `(a for 1 in [1,2,3])` is a syntax error, as is `(1, a) = (2, 3)`.

However the grammar doesn't prevent assignment to subscripted or sliced 
literals.

For example neither `(a for [1,2,3][0] in [1,2,3])` nor `([1,2,3][0], a) = (2, 
3)` are considered syntax errors.

Similar behavior is exhibited for slices.

The problem is that the `target_list` production 
(https://docs.python.org/3.5/reference/simple_stmts.html#grammar-token-target_list)
 reuses the `subscription` and `slicing` productions which both use the 
`primary` production, allowing literals on their left side.

--
messages: 300740
nosy: Isaac Elliott
priority: normal
severity: normal
status: open
title: Assigning to subscript/slice of literal is permitted
type: behavior
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



Re: Proposed new syntax

2017-08-22 Thread Marko Rauhamaa
Gregory Ewing :

> Marko Rauhamaa wrote:
>> You will always have to step outside your formal system and resort to
>> hand-waving in a natural language.
>
> If the hand-waving is rigorous, this amounts to expanding your formal
> system by adding new axioms and/or rules to it.

Ultimately, it's not rigorous. You can add rigor to any number of
meta-levels, but on top of it all, you will need an informal "observer"
level. It's turtles all the way down.

For example, you can't have a set of all sets. The NBG set theory solves
the problem by introducing the concept of classes. You can have a class
of all sets. But you can't have a class of all classes.

> If the hand-waving is not rigorous, then you haven't really proved
> anything.

The mathematicians have stopped caring.

In fact, even if metamathematics were a closed, formal system, the best
it could achieve would be circular reasoning. That would still be
satisfactory and "convincing." However, no interesting system can prove
its own consistency (but it *can* prove it can't prove its own
consistency).

Recommended reading:

   https://www.amazon.com/Unprovability-Consistency-Essay-Moda
   l-Logic/dp/0521092973>


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


[issue31254] WeakKeyDictionary/Mapping doesn't call __missing__

2017-08-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

For WeakKeyDictionary, I suspect that adding a __missing__() call would make 
the API more tricky and would likely cause more problems than it solves.

Without a compelling use case, my recommendation would be to leave it alone.  
(FWIW, all of the weak reference data structures have a long history of bugs, 
it seems that this is difficult to get right).

--
nosy: +rhettinger
type:  -> enhancement
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



[issue31209] MappingProxyType can not be pickled

2017-08-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> So I guess my questions now are;
> 
> 1. Should types.MappingProxyType be pickleable?
> 2. Should there be some documentation about the intended use of
> MappingProxyType?
>
> I imagine the answer to the first question is "no" given 
> how `__setstate__` works.

For the second question, I don't think so.  AFAICT the only intention was to 
support the actual mapping views for regular dicts.  Its likely that not much 
thought was given to other uses, so it doesn't make sense to document intention 
when none really exists ;-)

Given the answers above and that you have a PR solve your upstream issue with 
Schematics, can this bug report be closed?

--

___
Python tracker 

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



opencv tutorial links

2017-08-22 Thread Abdur-Rahmaan Janhangeer
dear mail list,

the only famous module i need to cover in python is open cv

can you drop some links or book recommendations apart from the official
website?

thanks,

Abdur-Rahmaan Janhangeer,
Mauritius
abdurrahmaanjanhangeer.wordpress.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Outlook csv Files

2017-08-22 Thread Abdur-Rahmaan Janhangeer
as someone who works with languages, this one seems quite manageable

 i assume you know how to deal with csv.
1 get the cell string
2 split at _
that will make you move around mpre easily as this separates in big chunk
3 for the first chunck, you might want to split at ,
4 and so on

Abdur-Rahmaan Janhangeer,
Mauritius
abdurrahmaanjanhangeer.wordpress.com

On 23 Aug 2017 03:34, "Gregory Grimes"  wrote:

> All,
>
> I have exported Remedy emails from Outlook to a csv file.  The issue is
> one cell, Body, has information in multiple lines:
>
> Subject,Body,From: (Name),From: (Address),From: (Type),To: (Name),To:
> (Address),To: (Type),CC: (Name),CC: (Address),CC: (Type),BCC: (Name),BCC:
> (Address),BCC: (Type),Billing Information,Categories,
> Importance,Mileage,Sensitivity
> INC00977622 Assigned : DBA - PKG1 : mbbanms0006.xxx.com - Alert,
> "Remedy Ticket Information
> 
> Date Open
> 08/09/17 12:10:57
> Ticket Number
> INC00977622  com/HPD%3AHelp+Desk/Default+User+View/?eid=INC00938650>
> Date Modified
> 08/09/17 12:10:57
> Category
> Status
> Assigned
> Priority
> High
> Short Description
> mbbanms0006.xxx.com - Alert
> User Information
> 
> User Name
> Remedy SPI
> User Login
> remedyspi
> User Phone
> ###
> User Email
> helpd...@xxx.com 
> User Department
> Staff Information
> 
> Staff Name
> Staff Login
> Staff Phone
> Staff Email
> 
> Staff Department
> DBA - PKG1
> Detailed Ticket Information
> 
> Incident Description
> Target : mb08dorb Type : Database Instance Host : mbbanms0006.xxx.com
> Info : A session was terminated at time/line number: Wed Aug 09 12:10:10
> 2017/84281. Metric=ORA-01000: maximum open cursors exceeded~ORA-01000:
> maximum open cursors exceeded~ORA-01000: maximum open cursors
> exceeded~ORA-01000: maximum open cursors exceeded~ORA-01000: maximum open
> cursors exceeded~ORA-01000: maximum open cursors exceeded~ORA-01000:
> maximum open cursors exceeded~ORA-01000: maximum open cursors
> exceeded~ORA-01000: maximum open cursors exceeded~ORA-01000: maximum open
> cursors exceeded~ORA-01000: maximum open cursors exceeded~ORA-01000:
> maximum open cursors exceeded~ORA-01000: maximum o
> Click Here to Access Remedy  “
>
> My question, what is the best way to parse the long Body string to extract
> information from this file for analysis?
>
> Thanks.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: python list name in subject

2017-08-22 Thread Abdur-Rahmaan Janhangeer
ah thanks for the tip about me filtering them

thought the community liked core python style (mail lists where python dev
talk, discuss ideas,i.e. the ones where guido replies etc)

anyways thanks all

Abdur-Rahmaan Janhangeer,
Mauritius
abdurrahmaanjanhangeer.wordpress.com

On 22 Aug 2017 12:38, "Abdur-Rahmaan Janhangeer" 
wrote:

> Hi all,
>
> i am subscribed to different python lists and they put their names in the
> subject
> [name] subject
>
> hence i can at a glance tell which mail belongs to which list.
>
> A requests to admins to implement if possible
>
> Thank you!
>
>
> 
>  Garanti
> sans virus. www.avast.com
> 
> <#m_1748413376357339298_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: python list name in subject

2017-08-22 Thread Ben Finney
Abdur-Rahmaan Janhangeer  writes:

> i am subscribed to different python lists and they put their names in the
> subject
> [name] subject

That's non-standard. The standard place for that information is the
“List-Id” field .

> hence i can at a glance tell which mail belongs to which list.

Set up a filter on the specific value of the “List-Id” field, which is
set by any standards-conformant mailing list software.

Presto, you get any organisation you like based on that information; and
the rest of us don't get the Subject field cluttered.

-- 
 \   “Most people are other people. Their thoughts are someone |
  `\  else’s opinions, their lives a mimicry, their passions a |
_o__)   quotation.” —Oscar Wilde, _De Profundis_, 1897 |
Ben Finney

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


Re: Proposed new syntax

2017-08-22 Thread Ben Finney
Stephan Houben  writes:

> I have often done things like:
>
>   generate_id = itertools.count().__next__

Could you be convinced to instead do::

import functools
import itertools

generate_id = functools.partial(next, itertools.count())

-- 
 \“The right to search for truth implies also a duty; one must |
  `\  not conceal any part of what one has recognized to be true.” |
_o__) —Albert Einstein |
Ben Finney

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


Re: python list name in subject

2017-08-22 Thread Grant Edwards
On 2017-08-23, D'Arcy Cain  wrote:
> On 08/22/2017 10:14 AM, Grant Edwards wrote:
>> Please don't. It wastes space which is better used on the subject.  If
>> you want the mailing list prepended, then configure procmail (or
>> whatever) to do it for you.
>
> Better yet, put it in its own folder.

Even better, point a news client[1] at

   nntp://news.gmane.org/gmane.comp.python.general


[1] https://en.wikipedia.org/wiki/List_of_Usenet_newsreaders

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


[issue31244] IDLE: work around shortcuts bug in Windows' IMEs and tk

2017-08-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Constantine: the point of checking the behavior of the Japanese IME was to 
determine whether there is a problem with all IMEs or just some.  Since Ctrl + 
the 2nd key from the left on the bottom row (marked 'X') invokes 'Delete' in 
both American and Japanese entry modes, the behavior you want should be 
possible.

I do not know where the bug is, and do not care, other than knowing that it is 
not in IDLE (or Python).  I do care that anyone in the world, like you, with 
sufficient knowledge to use Python, be able to also use IDLE if they chose.   
Even if switching keyboards with alt-shift is a fast, habituated, motion, it is 
clearly a nuisance in this context  So, even though IDLE is not Firefox, I am 
willing to consider somehow implementing what Serhiy described and supporting 
either adding workaround keyset(s) to IDLE or make it easier for users to 
create their own custom keysets that work.

When I mentioned the menus, I assume that the alt menu shortcuts work, so 
alt-e, alt-c, for instance, would copy a selection.  When we tried this with 
the Japanese keyboard, the alt shortcuts work for the top menu (F_ile, E_dit, 
S_hell, etc) but not for the drop-down submenus.  After alt-e displays the edit 
menu, alt-c, etc, have no apparent effect.  Another bug, and one which I doubt 
we can work around without language-specific menus.  (This is a separate issue.)

Step 1 for this issue: what is the scope of the problem.  I presume it is not 
unique to Ukranian.  Does it affect all Cyrillic IMEs?  If so, do different 
cyrillic keyboards have the the alphabetic chars in different places, so that a 
separate workaround is needed for every IME, even for letter chars?

--
assignee:  -> terry.reedy
components: +IDLE
resolution: third party -> 
stage: resolved -> test needed
title: Shortcuts bug in Python IDLE -> IDLE: work around shortcuts bug in 
Windows' IMEs and tk
versions: +Python 3.7

___
Python tracker 

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



[issue31255] Test getrandom before using it

2017-08-22 Thread Benda Xu

Benda Xu added the comment:

Thanks Victor. Python-3.5 has received your patches in time and 3.5.4 builds 
well with glibc-2.25 and https://wiki.gentoo.org/wiki/Project:Prefix
  2. 
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c8e2396d9cf4fe13057741f5bd1b9989eeeb746

--

___
Python tracker 

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



Re: python list name in subject

2017-08-22 Thread D'Arcy Cain

On 08/22/2017 10:14 AM, Grant Edwards wrote:

Please don't. It wastes space which is better used on the subject.  If
you want the mailing list prepended, then configure procmail (or
whatever) to do it for you.


Better yet, put it in its own folder.

--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com
--
https://mail.python.org/mailman/listinfo/python-list


[issue31209] MappingProxyType can not be pickled

2017-08-22 Thread Alex Hayes

Alex Hayes added the comment:

Some background. I'm not actually trying to pickle MappingProxyType, I'm using 
the schematics [1] library and recently it broke support for pickle [2] and the 
cause of that is because they are using MappingProxyType [3] internally (when 
they used to use dict).

The Python docs on MappingProxyType [4] provides an appropriate level of API 
documentation but what it doesn't cover is when you should or should not use 
MappingProxyType (understandably, it's most likely a complex answer). However, 
I imagine that it's being used in schematics because at the bottom of the 
Python dict documentation [5] it states;

> See also types.MappingProxyType can be used to create a read-only view of a 
> dict.

To answer the question "What would be the point of pickling a MappingProxy?" I 
would probably have to ask, what is the intended use of MappingProxyType?

If one was unfamiliar with the way in which pickle and MappingProxyType works I 
imagine they would think there would be no reason why a "read-only view of a 
dict" can't be pickled.

So I guess my questions now are;

1. Should types.MappingProxyType be pickleable?
2. Should there be some documentation about the intended use of 
MappingProxyType?

I imagine the answer to the first question is "no" given how `__setstate__` 
works.




[1] https://github.com/schematics/schematics
[2] https://github.com/schematics/schematics/issues/510
[3] https://github.com/schematics/schematics/pull/511
[4] https://docs.python.org/3/library/types.html#types.MappingProxyType
[5] https://docs.python.org/3/library/stdtypes.html#dict

--

___
Python tracker 

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



[issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog

2017-08-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Reading PEP 434, special rules for IDLE, should mostly answer your question.

--

___
Python tracker 

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



[issue12887] Documenting all SO_* constants in socket module

2017-08-22 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage: needs patch -> patch review
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



Outlook csv Files

2017-08-22 Thread Gregory Grimes
All,

I have exported Remedy emails from Outlook to a csv file.  The issue is one 
cell, Body, has information in multiple lines:

Subject,Body,From: (Name),From: (Address),From: (Type),To: (Name),To: 
(Address),To: (Type),CC: (Name),CC: (Address),CC: (Type),BCC: (Name),BCC: 
(Address),BCC: (Type),Billing 
Information,Categories,Importance,Mileage,Sensitivity
INC00977622 Assigned : DBA - PKG1 : mbbanms0006.xxx.com - Alert,
"Remedy Ticket Information 

Date Open 
08/09/17 12:10:57 
Ticket Number 
INC00977622 

 
Date Modified 
08/09/17 12:10:57 
Category
Status
Assigned 
Priority
High 
Short Description 
mbbanms0006.xxx.com - Alert 
User Information 

User Name
Remedy SPI 
User Login
remedyspi
User Phone
###
User Email
helpd...@xxx.com  
User Department
Staff Information

Staff Name
Staff Login
Staff Phone
Staff Email
 
Staff Department
DBA - PKG1 
Detailed Ticket Information 

Incident Description
Target : mb08dorb Type : Database Instance Host : mbbanms0006.xxx.com Info 
: A session was terminated at time/line number: Wed Aug 09 12:10:10 2017/84281. 
Metric=ORA-01000: maximum open cursors exceeded~ORA-01000: maximum open cursors 
exceeded~ORA-01000: maximum open cursors exceeded~ORA-01000: maximum open 
cursors exceeded~ORA-01000: maximum open cursors exceeded~ORA-01000: maximum 
open cursors exceeded~ORA-01000: maximum open cursors exceeded~ORA-01000: 
maximum open cursors exceeded~ORA-01000: maximum open cursors 
exceeded~ORA-01000: maximum open cursors exceeded~ORA-01000: maximum open 
cursors exceeded~ORA-01000: maximum open cursors exceeded~ORA-01000: maximum o 
Click Here to Access Remedy  “

My question, what is the best way to parse the long Body string to extract 
information from this file for analysis?

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


Re: Proposed new syntax

2017-08-22 Thread Gregory Ewing

Marko Rauhamaa wrote:

You will always have
to step outside your formal system and resort to hand-waving in a
natural language.


If the hand-waving is rigorous, this amounts to expanding your
formal system by adding new axioms and/or rules to it.

If the hand-waving is not rigorous, then you haven't really
proved anything.

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


[issue31262] Documentation Error

2017-08-22 Thread Dipti Sherlekar

Dipti Sherlekar added the comment:

Thanks all.

Dipti
On Tue, Aug 22, 2017 at 4:28 PM Martin Panter 
wrote:

>
> Martin Panter added the comment:
>
> Assuming this is about the Classes section in the tutorial, you seem to be
> going down the same track as 
>
> --
> nosy: +martin.panter
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue31262] Documentation Error

2017-08-22 Thread Martin Panter

Martin Panter added the comment:

Assuming this is about the Classes section in the tutorial, you seem to be 
going down the same track as 

--
nosy: +martin.panter

___
Python tracker 

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



[issue31262] Documentation Error

2017-08-22 Thread R. David Murray

R. David Murray added the comment:

No, that sentence is telling you what the *Python*'s behavior is, using C++ 
terminology.  Unlike C++, where class members are private by default, the 
Python equivalent of class members are public by default.

If you can figure out a clearer way to phrase that you may reopen the issue 
with your suggestion.

--
nosy: +r.david.murray
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue31261] unittest fails to properly destruct objects created during setUp if a test fails

2017-08-22 Thread R. David Murray

R. David Murray added the comment:

GC cleanup is not guaranteed to be synchronous.  You are observing normal 
Python behavior here.  Cleanup does not happen until the TestCase instance is 
finalized (thus eliminating the self.dummy reference to your DummyClass).  In 
the case of passing tests, that is after the '.' is printed.  In the case of 
failing tests, that is after the failure is printed, which isn't until the 
failure summary is printed at after running all tests.

If it is important to you that DummyClass be finalized, you need to add an 
addCleanup call to your setUp method that will do whatever finalization you 
need done.  Including doing 'del self.dummy' (or self.dummy = None) if you need 
the reference to it gone...but depending on garbage collection is a bad idea, 
so if you are doing that there is probably something sub-optimal about your 
design.

--
nosy: +r.david.murray
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue28667] FD_SETSIZE is unsigned on FreeBSD

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:


New changeset cb7fdf69ec9235cb358580f189089eaf575fb9df by Victor Stinner in 
branch '3.6':
bpo-28667: Fix a compile warning on FreeBSD when compare with FD_SETSIZE. 
(#501) (#3190)
https://github.com/python/cpython/commit/cb7fdf69ec9235cb358580f189089eaf575fb9df


--
nosy: +haypo

___
Python tracker 

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



[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:

In my experience, it's not that hard to crash CPython (without ctypes) if you 
know internals or just if you look into Lib/test/crashers/ :-)

I agree that it's a good practice to fix crashes when there is a simple known 
script to crash Python. The question is more where is the limit between 
security and bug fixes.

To be honest, the change is very safe and is very short.

@Larry: It's up to you, you are the release manager :-)

If we consider that the discussed bugs impact the security, I will ask for 
backports to 2.7, 3.3 and 3.4 as well.

--

___
Python tracker 

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



[issue31262] Documentation Error

2017-08-22 Thread Dipti Sherlekar

New submission from Dipti Sherlekar:

Documentation says : In C++ terminology, normally class members (including the 
data members) are public  

Solution: In C++ the class memebers are private not public by default.

--
assignee: docs@python
components: Documentation
messages: 300727
nosy: Dipti Sherlekar, docs@python
priority: normal
severity: normal
status: open
title: Documentation Error
versions: Python 3.7

___
Python tracker 

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



[issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv

2017-08-22 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks, I am a little closer to understanding now.

> once intersphinx looks at the Tuple during documentation generation it 
> deduces it actually is of type class

How does intersphinx deduce this? Also, does it run when we generate the Python 
docs, or when you generate the docs for your project (that references the 
Python docs)? Finally, are there other objects in the typing for which this is 
a problem? (I guess I could answer this myself once I understand how 
intersphinx decides whether something is a class or data.)

I also think this is somewhat unfortunate, because it seems that whenever 
something is changed from "class" to "data" or vice versa, intersphinx will be 
confused, even though it's easy to give examples where such a change could be 
backwards compatible.

--

___
Python tracker 

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



[issue31261] unittest fails to properly destruct objects created during setUp if a test fails

2017-08-22 Thread Micah

New submission from Micah:

When running the attached example test dummy objects are created during setUp 
and destructed at the end of a passing test but when a test fails the dummy 
object that was created in setUp fails to deconstruct. This leads to cascading 
errors when writing integration tests where having a "ghost" object sitting in 
the background and listening to messages is detrimental.

This behavior became apparent when I was writing integration tests making use 
of a signalling package so I pulled everything that wasn't base python to see 
if the bug was reproduced and it was. The object that failed to deconstruct 
when the test failed(0x01CA971F6208) deconstructs at the end of the entire 
testcase while the object declared within the test function 
itself(0x01CA971F62B0) deconstructs as soon as the test fails out.

The output of the test that I ran was this:

> python -m unittest test_bug.py


test_fail (test_bug.TestBug)
Created 
Created local 
F
deleting 


test_pass (test_bug.TestBug)
Created 
.
deleting 


test_passes (test_bug.TestBug)
Created 
.
deleting 

==
FAIL: test_fail (test_bug.TestBug)
--
Traceback (most recent call last):
  File "C:\Code\test_bug.py", line 27, in test_fail
self.assertTrue(False)
AssertionError: False is not true

--
Ran 3 tests in 0.004s

FAILED (failures=1)

deleting 

--
components: Windows
files: test_bug.py
messages: 300725
nosy: MCBama, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: unittest fails to properly destruct objects created during setUp if a 
test fails
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file47094/test_bug.py

___
Python tracker 

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



[issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv

2017-08-22 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

> For the end user the fact that this is a class is still hidden

I am not sure what you mean by this, but with your PR the rendered docs will 
literally say ``class typing.Tuple``.

> We should probably add a unit test that makes sure all runtime "type" matches 
> with documentation "type" in the future

I already mention, this was not an omission but a deliberate decision, see 
http://bugs.python.org/review/28644/diff/19105/Doc/library/typing.rst#newcode444
 (and below the same for Callable)

--

___
Python tracker 

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



[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-08-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

After experimenting a bit more with this approach, I now realize that the case 
where a get() is waiting and gets interrupted by a put() call is not handled 
properly: there is no obvious way for the get() call to realize (when the 
interruption finishes) that the queue is now non-empty and can be popped from.

So perhaps we need C code after all.

--

___
Python tracker 

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



[issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog

2017-08-22 Thread Łukasz Langa

Łukasz Langa added the comment:

I don't understand why GH-3097 was introduced to 3.6.2. This doesn't look like 
a bugfix?

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv

2017-08-22 Thread Bernát Gábor

Bernát Gábor added the comment:

so here's the problem in detail:

Intersphinx (http://www.sphinx-doc.org/en/stable/ext/intersphinx.html) is a 
built in Sphinx plugin that allows to link to documentation of other projects 
in your own documentation. For example when specifying the argument of a 
function which can be either int or string you might specify the argument to be 
Union[int, str]. In this case Sphinx will generate the type of the argument as 
this object, where e.g. the Union word will be a link to 
https://docs.python.org/3/library/typing.html#typing.Union and so on. 

In order to know for which object/function/type what is the correct URL an 
intersphinx object (which is basically a mapping) needs to be generated. This 
maps each element to an URL. This intersphinx mapping storage object (available 
at https://docs.python.org/3/objects.inv and similarly under other version 
pattern for the according version) is generated from the Python documentation. 

Now there's one indirection as far as this objects.inv goes; it does not 
actually stores mappings of element to URL, but what instead does it stores a 
mapping of type to element to url. Where type is here defined as either 
data/class etc. In order to resolve from an element to an URL both keys need to 
be correct (the type and the key too). 

For Python 3.6+ the typing.Tuple mapping now fails because according to the 
documentation the Tuple is under the section data, but once intersphinx looks 
at the Tuple during documentation generation it deduces it actually is of type 
class, and tries to locate it there. In order for intersphinx to resolve the 
correct web page URL, the runtime information of an element need to coincide 
with it's documentation type. Hence, what this PR tries to fix, migrating the 
documentation type/section of data to class (as in the meantime under Python 
3.6 the Tuple is now a class).

For the end user the fact that this is a class is still hidden, but for the 
documentation generation tool to resolve the correct URL, the runtime 
information needs to coincide with the documentation one. We should probably 
add a unit test that makes sure all runtime "type" matches with documentation 
"type" in the future. Let's make that the scope of another PR; is now clear?

--

___
Python tracker 

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



[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2017-08-22 Thread Preston Landers

Changes by Preston Landers :


--
nosy: +planders

___
Python tracker 

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



[issue30983] eval frame rename in pep 0523 broke gdb's python extension

2017-08-22 Thread Łukasz Langa

Changes by Łukasz Langa :


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



[issue30983] eval frame rename in pep 0523 broke gdb's python extension

2017-08-22 Thread Łukasz Langa

Łukasz Langa added the comment:


New changeset 8e572491b59c2334723bfd7411ab2a9fbd100f70 by Łukasz Langa in 
branch '3.6':
[3.6] bpo-30983: [gdb] Fix py-bt, etc. for non-debug shared builds (GH-3153) 
(#3192)
https://github.com/python/cpython/commit/8e572491b59c2334723bfd7411ab2a9fbd100f70


--

___
Python tracker 

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



Re: requests.{get,post} timeout

2017-08-22 Thread Skip Montanaro
> You could provide both, but since one of them can be handled
> externally (with a thread, with a SIGALRM, or with some other sort of
> time limiting), the other one MUST be provided by the request.

Given the semantics of timeouts which percolate up from the socket
level, I agree with Chris. It has a particular meaning, that
implemented by the underlying socket layer. Unfortunately, the word
"timeout" can take on related (but different) meanings, depending on
context. We can discuss how to implement the timeout which means, "the
maximum amount of time it should take to transfer a chunk of content
from one end of the connection to the other", it's difficult to say
exactly where detecting such timeouts should live in the application's
network stack. That it might be tedious to implement correctly (I
suspect given their druthers, most people would prefer to leave
sleeping threading and signaling dogs lie) is kind of beside the
point.

Now that I have a firmer grasp of what timeout I do have (the socket
level per-read-or-write call timeout), I can decide how important it
is for me to implement the other.

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


[issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses

2017-08-22 Thread Łukasz Langa

Changes by Łukasz Langa :


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



[issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses

2017-08-22 Thread Łukasz Langa

Łukasz Langa added the comment:


New changeset 772d809a63f40fd35679da3fb115cdf7fa81bd20 by Łukasz Langa (Martijn 
Pieters) in branch 'master':
bpo-31161: only check for parens error for SyntaxError (#3082)
https://github.com/python/cpython/commit/772d809a63f40fd35679da3fb115cdf7fa81bd20


--

___
Python tracker 

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



[issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses

2017-08-22 Thread Łukasz Langa

Łukasz Langa added the comment:


New changeset 680f04a926bce04e4320ba883068c345eba502a6 by Łukasz Langa (Martijn 
Pieters) in branch '3.6':
bpo-31161: only check for parens error for SyntaxError (#3083)
https://github.com/python/cpython/commit/680f04a926bce04e4320ba883068c345eba502a6


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue30983] eval frame rename in pep 0523 broke gdb's python extension

2017-08-22 Thread Łukasz Langa

Changes by Łukasz Langa :


--
pull_requests: +3231

___
Python tracker 

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



Re: requests.{get,post} timeout

2017-08-22 Thread Chris Angelico
On Wed, Aug 23, 2017 at 5:06 AM, Jon Ribbens  wrote:
>> You can always add in the overall timeout separately. If the low-level
>> timeout were implemented that way, there would be no way to externally
>> add the other form of timeout. Therefore the only sane way to
>> implement the request timeout is a between-byte limit.
>
> I have no idea what you mean here. The only sane way to implement the
> request timeout is to provide both types of timeout.

You could provide both, but since one of them can be handled
externally (with a thread, with a SIGALRM, or with some other sort of
time limiting), the other one MUST be provided by the request.

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


Re: requests.{get,post} timeout

2017-08-22 Thread Chris Angelico
On Wed, Aug 23, 2017 at 5:10 AM, MRAB  wrote:
> On 2017-08-22 19:43, Chris Angelico wrote:
>>
>> On Wed, Aug 23, 2017 at 4:14 AM, Jon Ribbens 
>> wrote:
>>>
>>> On 2017-08-22, Chris Angelico  wrote:

 On Wed, Aug 23, 2017 at 2:58 AM, Jon Ribbens 
 wrote:
>
> Yes. There is no timeout feature that can be used to limit the total
> time a 'requests' request takes. Some people might think that this is
> a serious flaw in the requests library that would need urgent
> rectification in order to make the library safe and useful to use in
> almost any situation, but the 'requests' developers are apparently not
> among those people.


 I'm not either. The idea of a timeout is to detect when something's
 completely not working, not to limit the overall time to process.
>>>
>>>
>>> We appear to have different understandings of the word "timeout".
>>> I think it means a time, which if it runs out, will stop the operation.
>>>
>>> I am somewhat surprised that anyone might have a different definition
>>> - not least because, from a human being's point of view, they care
>>> about the overall time something takes to happen and telling them that
>>> nothing's wrong because technically we are still "successfully" receiving
>>> the expected 10 kilobytes of data 3 hours later is unlikely to make
>>> them happy.
>>
>>
>> You start downloading a file from a web page. It stalls out.
>>
>> Is it merely slow, and continuing to wait will get you a result?
>>
>> Or has it actually stalled out and you should give up?
>>
>> The low-level timeout will distinguish between those. If you want a
>> high-level timeout across the entire job, you can do that too, but
>> then you have to figure out exactly how long is "too long". Let's say
>> you set a thirty-second timeout. Great! Now someone uses your program
>> on a midrange connection to download a 100MB file, or on a poor
>> connection to download a 5MB file, or on dial-up to download a 10KB
>> file. Data is constantly flowing, but at some point, the connection
>> just dies, because it's hit your timeout. This is EXTREMELY
>> frustrating.
>>
>> You can always add in the overall timeout separately. If the low-level
>> timeout were implemented that way, there would be no way to externally
>> add the other form of timeout. Therefore the only sane way to
>> implement the request timeout is a between-byte limit.
>>
> You might want to have a way of setting the minimum data rate in order to
> defend against a slowloris attack.

That assumes that that's an attack - it often isn't. But if that's
what you want, then add that as a separate feature - it's distinct
from a timeout.

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


Re: requests.{get,post} timeout

2017-08-22 Thread Jon Ribbens
On 2017-08-22, Chris Angelico  wrote:
> The low-level timeout will distinguish between those. If you want a
> high-level timeout across the entire job, you can do that too, but
> then you have to figure out exactly how long is "too long". Let's say
> you set a thirty-second timeout. Great! Now someone uses your program
> on a midrange connection to download a 100MB file, or on a poor
> connection to download a 5MB file, or on dial-up to download a 10KB
> file. Data is constantly flowing, but at some point, the connection
> just dies, because it's hit your timeout. This is EXTREMELY
> frustrating.

Sure, the right timeout to use depends on what your application is and
what it's doing.

> You can always add in the overall timeout separately. If the low-level
> timeout were implemented that way, there would be no way to externally
> add the other form of timeout. Therefore the only sane way to
> implement the request timeout is a between-byte limit.

I have no idea what you mean here. The only sane way to implement the
request timeout is to provide both types of timeout.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: requests.{get,post} timeout

2017-08-22 Thread MRAB

On 2017-08-22 19:43, Chris Angelico wrote:

On Wed, Aug 23, 2017 at 4:14 AM, Jon Ribbens  wrote:

On 2017-08-22, Chris Angelico  wrote:

On Wed, Aug 23, 2017 at 2:58 AM, Jon Ribbens  wrote:

Yes. There is no timeout feature that can be used to limit the total
time a 'requests' request takes. Some people might think that this is
a serious flaw in the requests library that would need urgent
rectification in order to make the library safe and useful to use in
almost any situation, but the 'requests' developers are apparently not
among those people.


I'm not either. The idea of a timeout is to detect when something's
completely not working, not to limit the overall time to process.


We appear to have different understandings of the word "timeout".
I think it means a time, which if it runs out, will stop the operation.

I am somewhat surprised that anyone might have a different definition
- not least because, from a human being's point of view, they care
about the overall time something takes to happen and telling them that
nothing's wrong because technically we are still "successfully" receiving
the expected 10 kilobytes of data 3 hours later is unlikely to make
them happy.


You start downloading a file from a web page. It stalls out.

Is it merely slow, and continuing to wait will get you a result?

Or has it actually stalled out and you should give up?

The low-level timeout will distinguish between those. If you want a
high-level timeout across the entire job, you can do that too, but
then you have to figure out exactly how long is "too long". Let's say
you set a thirty-second timeout. Great! Now someone uses your program
on a midrange connection to download a 100MB file, or on a poor
connection to download a 5MB file, or on dial-up to download a 10KB
file. Data is constantly flowing, but at some point, the connection
just dies, because it's hit your timeout. This is EXTREMELY
frustrating.

You can always add in the overall timeout separately. If the low-level
timeout were implemented that way, there would be no way to externally
add the other form of timeout. Therefore the only sane way to
implement the request timeout is a between-byte limit.

You might want to have a way of setting the minimum data rate in order 
to defend against a slowloris attack.

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


[issue23835] configparser does not convert defaults to strings

2017-08-22 Thread Łukasz Langa

Łukasz Langa added the comment:

I merged the original fix and documented it. I thought about it some more and 
remembered that RawConfigParser objects do in fact support non-string values by 
historical coincidence. It's unfortunately a popular idiom with old programs to 
load some configuration defaults using the `defaults=` keyword and later use 
the legacy get() and set() API which doesn't check types inside. A config file 
like this cannot be safely written back to a file, etc.

I would very much like to get rid of RawConfigParser entirely but we're stuck 
with it due to backwards compatibility. So, to fix the regression, I created PR 
3191.

--

___
Python tracker 

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



[issue23835] configparser does not convert defaults to strings

2017-08-22 Thread Łukasz Langa

Changes by Łukasz Langa :


--
pull_requests: +3230

___
Python tracker 

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



Re: requests.{get,post} timeout

2017-08-22 Thread Chris Angelico
On Wed, Aug 23, 2017 at 4:31 AM, Grant Edwards
 wrote:
> On 2017-08-22, Chris Angelico  wrote:
>
>> """
>> Once your client has connected to the server and sent the HTTP
>> request, the read timeout is the number of seconds the client will
>> wait for the server to send a response. (Specifically, it's the number
>> of seconds that the client will wait between bytes sent from the
>> server. In 99.9% of cases, this is the time before the server sends
>> the first byte).
>> """
>>
>> "Between bytes" implies that you could have a long request, as long as
>> there's a keep-alive transmission every few seconds.
>
> Except a keep-alive transmission doesn't contain any bytes, so it
> shouldn't reset the timer.

If it's a TCP keep-alive, yes. But if you're looking at a long-poll
HTTP server, or a websocket, or you're proxying a different type of
connection, you can use a connection-level keep-alive to reset it.
I've often worked with TELNET, using an IAC GA or similar as a
keep-alive to get past stupid routers that drop connections after five
minutes of idleness..

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


Re: requests.{get,post} timeout

2017-08-22 Thread Chris Angelico
On Wed, Aug 23, 2017 at 4:14 AM, Jon Ribbens  wrote:
> On 2017-08-22, Chris Angelico  wrote:
>> On Wed, Aug 23, 2017 at 2:58 AM, Jon Ribbens  
>> wrote:
>>> Yes. There is no timeout feature that can be used to limit the total
>>> time a 'requests' request takes. Some people might think that this is
>>> a serious flaw in the requests library that would need urgent
>>> rectification in order to make the library safe and useful to use in
>>> almost any situation, but the 'requests' developers are apparently not
>>> among those people.
>>
>> I'm not either. The idea of a timeout is to detect when something's
>> completely not working, not to limit the overall time to process.
>
> We appear to have different understandings of the word "timeout".
> I think it means a time, which if it runs out, will stop the operation.
>
> I am somewhat surprised that anyone might have a different definition
> - not least because, from a human being's point of view, they care
> about the overall time something takes to happen and telling them that
> nothing's wrong because technically we are still "successfully" receiving
> the expected 10 kilobytes of data 3 hours later is unlikely to make
> them happy.

You start downloading a file from a web page. It stalls out.

Is it merely slow, and continuing to wait will get you a result?

Or has it actually stalled out and you should give up?

The low-level timeout will distinguish between those. If you want a
high-level timeout across the entire job, you can do that too, but
then you have to figure out exactly how long is "too long". Let's say
you set a thirty-second timeout. Great! Now someone uses your program
on a midrange connection to download a 100MB file, or on a poor
connection to download a 5MB file, or on dial-up to download a 10KB
file. Data is constantly flowing, but at some point, the connection
just dies, because it's hit your timeout. This is EXTREMELY
frustrating.

You can always add in the overall timeout separately. If the low-level
timeout were implemented that way, there would be no way to externally
add the other form of timeout. Therefore the only sane way to
implement the request timeout is a between-byte limit.

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


Re: requests.{get,post} timeout

2017-08-22 Thread Grant Edwards
On 2017-08-22, Chris Angelico  wrote:

> """
> Once your client has connected to the server and sent the HTTP
> request, the read timeout is the number of seconds the client will
> wait for the server to send a response. (Specifically, it's the number
> of seconds that the client will wait between bytes sent from the
> server. In 99.9% of cases, this is the time before the server sends
> the first byte).
> """
>
> "Between bytes" implies that you could have a long request, as long as
> there's a keep-alive transmission every few seconds.

Except a keep-alive transmission doesn't contain any bytes, so it
shouldn't reset the timer.

-- 
Grant Edwards   grant.b.edwardsYow! It's some people
  at   inside the wall!  This is
  gmail.combetter than mopping!

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


Re: requests.{get,post} timeout

2017-08-22 Thread Jon Ribbens
On 2017-08-22, Chris Angelico  wrote:
> On Wed, Aug 23, 2017 at 2:58 AM, Jon Ribbens  
> wrote:
>> Yes. There is no timeout feature that can be used to limit the total
>> time a 'requests' request takes. Some people might think that this is
>> a serious flaw in the requests library that would need urgent
>> rectification in order to make the library safe and useful to use in
>> almost any situation, but the 'requests' developers are apparently not
>> among those people.
>
> I'm not either. The idea of a timeout is to detect when something's
> completely not working, not to limit the overall time to process.

We appear to have different understandings of the word "timeout".
I think it means a time, which if it runs out, will stop the operation.

I am somewhat surprised that anyone might have a different definition
- not least because, from a human being's point of view, they care
about the overall time something takes to happen and telling them that
nothing's wrong because technically we are still "successfully" receiving
the expected 10 kilobytes of data 3 hours later is unlikely to make
them happy.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31244] Shortcuts bug in Python IDLE

2017-08-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I confirm the issue. Seems this is a particularity of Tk implementation on 
Windows (it looks as a bug from user's point of view). There is a workaround, 
but it is too complex. For the particular keyboard layout and for every 
registered shortcut you need to find the character emitted by pressing the 
corresponding key, find its code in the current ANSI codepage, find the name 
for this code in the keysym table [1], and register additional shortcut for 
this name. For example for making Ctrl-O working with Ukrainian encoding you 
need to add  open-window-from-file action. Cyrillic letter 
"щ" is emitted when the key "o" is pressed in Ukrainian layout, it has the code 
249 in CP-1251, which corresponds the name ugrave in the keysym table. All this 
is too complex for IDLE. I think that we should close this issue as "Won't fix" 
and hope that this will be fixed automatically in future versions of Tk.

Firefox starved from similar issue for many years. It was fixed in recent 
versions. But Firefox is much more complex program than IDLE.

[1] https://www.tcl.tk/man/tcl/TkCmd/keysyms.htm

--

___
Python tracker 

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



[issue31260] [2.7] Enhance PC/VS9.0/ project to produce python.bat, as PCbuild/

2017-08-22 Thread Steve Dower

Changes by Steve Dower :


--
nosy:  -steve.dower

___
Python tracker 

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



[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-22 Thread Larry Hastings

Larry Hastings added the comment:

I thought crashing bugs were generally considered security bugs.  With a 
reliable crashing bug exploiting a reasonable module (e.g. not ctypes) you can 
crash Python instances in hosting services.  If those instances are shared with 
other users (e.g. Google App Engine) you can cause a temporary DOS.  At least, 
that's the theory as I understood it...!

--

___
Python tracker 

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



[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:

Larry Hastings: "Victor, what do you think, does this need a 3.5 backport?  I'm 
inclined to say yes."

Naoki has to design an evil object which triggers explicitly the garbage 
collector to get a crash. He found the bug by reading the code. I don't remind 
anyone complaining about the bug. So I don't think that it's a major bug, as 
was bpo-21435 which was *easy* to trigger using asyncio.

So no, I don't think that this issue desevers a backport.

But it's just my opinion, feel free to backport to 3.5 if you consider that the 
bug is critical enough ;-)

--

___
Python tracker 

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



[issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv

2017-08-22 Thread Guido van Rossum

Guido van Rossum added the comment:

Before I spend more time reviewing your patch, can you please explain what you 
mean by "sphinx fails to find these"? Is there a particular dead link on 
docs.python.org or a specific query you typed in the search box that failed to 
find the definition of typing.Tuple?

--

___
Python tracker 

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



Multiple try expect in a for loop

2017-08-22 Thread Ganesh Pal
Hello python friends,

I need a suggestion  on the below piece of code . I have for loop and I
need to do the below i.e create 100 of queue  ,open ,and append some data
to a data structure.   Is multiple try except the way to go or any other
idea's.

I feel  that there is a better way to  write those try except statement or
avoid it  . I am  a Linux user on python 2.7

def create_queue():
q_name = ""
q_fd = ""
for itr in range(1, 100):
q_name =  randomword(100)
print q_name
try:
q.create(q_name)
except OSError as e:
sys.stderr.write('Unable to create Queue %s: %s\n' % (q_name,
str(e)))
return False
try:
q_fd =  q.open(q_name); // Can I add multiple statement like
this ?
q.append(q_fd, randomword(100))
except OSError as e:
sys.stderr.write('Unable to open or append Queue %s: %s\n' %
(q_name, str(e)))
return False

return True


Regards,
Ganesh
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-22 Thread Larry Hastings

Larry Hastings added the comment:

Victor, what do you think, does this need a 3.5 backport?  I'm inclined to say 
yes.

--

___
Python tracker 

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



Re: requests.{get,post} timeout

2017-08-22 Thread Chris Angelico
On Wed, Aug 23, 2017 at 2:58 AM, Jon Ribbens  wrote:
> On 2017-08-22, Skip Montanaro  wrote:
>> I'm using the requests module with timeouts to fetch URLs, for example:
>>
>> response = requests.get("http://www.google.com/;, timeout=10)
>>
>> I understand the timeout value in this case applies both to creating the
>> connection and fetching the remote content. Can the server dribble out the
>> content (say, one byte every few seconds) to avoid triggering the timeout,
>
> Yes. There is no timeout feature that can be used to limit the total
> time a 'requests' request takes. Some people might think that this is
> a serious flaw in the requests library that would need urgent
> rectification in order to make the library safe and useful to use in
> almost any situation, but the 'requests' developers are apparently not
> among those people.

I'm not either. The idea of a timeout is to detect when something's
completely not working, not to limit the overall time to process. If
you want that, you can do it locally, maybe with signal.alarm or a
thread or something.

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


Re: requests.{get,post} timeout

2017-08-22 Thread Skip Montanaro
> """
> Once your client has connected to the server and sent the HTTP
> request, the read timeout is the number of seconds the client will
> wait for the server to send a response. (Specifically, it's the number
> of seconds that the client will wait between bytes sent from the
> server. In 99.9% of cases, this is the time before the server sends
> the first byte).
> """
>
> "Between bytes" implies that you could have a long request, as long as
> there's a keep-alive transmission every few seconds.

Thanks, Chris. That appears to be what's going on.

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


Re: requests.{get,post} timeout

2017-08-22 Thread Jon Ribbens
On 2017-08-22, Skip Montanaro  wrote:
> I'm using the requests module with timeouts to fetch URLs, for example:
>
> response = requests.get("http://www.google.com/;, timeout=10)
>
> I understand the timeout value in this case applies both to creating the
> connection and fetching the remote content. Can the server dribble out the
> content (say, one byte every few seconds) to avoid triggering the timeout,

Yes. There is no timeout feature that can be used to limit the total
time a 'requests' request takes. Some people might think that this is
a serious flaw in the requests library that would need urgent
rectification in order to make the library safe and useful to use in
almost any situation, but the 'requests' developers are apparently not
among those people.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: requests.{get,post} timeout

2017-08-22 Thread Chris Angelico
On Wed, Aug 23, 2017 at 12:02 AM, Skip Montanaro
 wrote:
> I'm using the requests module with timeouts to fetch URLs, for example:
>
> response = requests.get("http://www.google.com/;, timeout=10)
>
> I understand the timeout value in this case applies both to creating the
> connection and fetching the remote content. Can the server dribble out the
> content (say, one byte every few seconds) to avoid triggering the timeout,
> or must the request be completed within ten seconds after the connection is
> successfully opened? My reading of the documentation here is inconclusive:
>
> http://docs.python-requests.org/en/master/user/advanced/#timeouts
>
> If you specify a single value for the timeout, like this:
>
> r = requests.get('https://github.com', timeout=5)
>
> The timeout value will be applied to both the connect and the read
> timeouts.
>
> Does "read timeout" imply the timeout applied to an individual read from
> the underlying socket? A quick glance at the code suggests that might be
> the case, but I got a bit lost in the urllib3 code which underpins the
> requests module.

"""
Once your client has connected to the server and sent the HTTP
request, the read timeout is the number of seconds the client will
wait for the server to send a response. (Specifically, it's the number
of seconds that the client will wait between bytes sent from the
server. In 99.9% of cases, this is the time before the server sends
the first byte).
"""

"Between bytes" implies that you could have a long request, as long as
there's a keep-alive transmission every few seconds.

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


[issue16217] Tracebacks are unnecessarily verbose when using 'python -m'

2017-08-22 Thread Dmitry Kazakov

Dmitry Kazakov added the comment:

In order to load and compile the module code, runpy calls the loader's get_code 
method. Because that happens outside of the normal import process, and 
PyImport_ImportModuleLevelObject is currently the only place where 
remove_importlib_frames is being invoked, tracebacks of exceptions occurring in 
get_code are kept unmodified.

Would it be wrong to drop all importlib frames from all unhandled exceptions, 
except when the -v flag is present? On the other hand, since the patch from 
#issue15486 seems to work fine in most scenarios, I propose removing both runpy 
and importlib traceback entries locally inside the runpy module. There may be 
better solutions, though...

In any case, I'm willing to write a patch.

--
nosy: +vaultah

___
Python tracker 

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



[issue28667] FD_SETSIZE is unsigned on FreeBSD

2017-08-22 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3229

___
Python tracker 

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



[issue30871] Add test.pythoninfo

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:

I modified the buildbot configuration so a pythoninfo failure marks the build 
as WARNINGS instead of FAILED:
https://github.com/python/buildmaster-config/commit/3866fac355b91d9d56507c345992fad2169759b4

But I'm not sure that it works :-/ I forced a build, but the build was marked 
as FAILED.

--

___
Python tracker 

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



[issue31259] [3.6] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 468534d92f6879e925c4cd8a228ea300abfb7e4d by Victor Stinner in 
branch '3.6':
bpo-31259: test_urllib2_localnet uses addCleanup(server.stop) (#3186)
https://github.com/python/cpython/commit/468534d92f6879e925c4cd8a228ea300abfb7e4d


--

___
Python tracker 

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



Re: python list name in subject

2017-08-22 Thread Rick Johnson
Tim Chase wrote:
> Rick Johnson wrote:

[...]

> Checking mailing list headers...yep, the "forum-of-origin"
> type hint is already present in standards-compliant fashion
> defined by RFC4021[1]:
>
> [...]
> 
> Just need a mail client that knows about standards and
> isn't fettered. ;-)

Well, that pretty much disqualifies google groups. :-)
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31234] Make support.threading_cleanup() stricter

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 41bbd82b6b6a887e893974fa5cdaae7782ae6cac by Victor Stinner in 
branch 'master':
bpo-31234: test_threaded_import: fix test_side_effect_import() (#3189)
https://github.com/python/cpython/commit/41bbd82b6b6a887e893974fa5cdaae7782ae6cac


--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 830d7d2936434ace113822294acce82f62cde41b by Victor Stinner in 
branch 'master':
bpo-31234: test_httpservers joins the server thread (#3188)
https://github.com/python/cpython/commit/830d7d2936434ace113822294acce82f62cde41b


--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 5f20539ee5c6e3f1da23e8fc31ba519a3d078c79 by Victor Stinner in 
branch '3.6':
bpo-31234: fork_wait tests now join threads (#3139) (#3187)
https://github.com/python/cpython/commit/5f20539ee5c6e3f1da23e8fc31ba519a3d078c79


--

___
Python tracker 

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



[issue30871] Add test.pythoninfo

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:

I created bpo-31260: [2.7] Enhance PC/VS9.0/ project to produce python.bat, as 
PCbuild/

--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-08-22 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3228

___
Python tracker 

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



Re: python list name in subject

2017-08-22 Thread Tim Chase
On 2017-08-22 08:21, Rick Johnson wrote:
> Grant Edwards wrote:
> > Abdur-Rahmaan Janhangeer wrote:  
> > > 
> > > Hi all,  i am subscribed to different python lists and
> > > they put their names in the subject [name] subject  hence
> > > i can at a glance tell which mail belongs to which list.
> > > A requests to admins to implement if possible  
> > 
> > Please don't. It wastes space which is better used on the
> > subject.  If you want the mailing list prepended, then
> > configure procmail (or whatever) to do it for you.  
> 
> Although, considering that the BDFL has now made type-hints
> an official part of the language, a "forum-of-origin" type-
> hint, may be more Pythonic than we care to realize. 

Checking mailing list headers...yep, the "forum-of-origin" type hint
is already present in standards-compliant fashion defined by
RFC4021[1]:

List-Id: General discussion list for the Python programming language
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 

Just need a mail client that knows about standards and isn't
fettered. ;-)

-tkc


[1] https://tools.ietf.org/html/rfc4021#section-2.1.31
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31234] Make support.threading_cleanup() stricter

2017-08-22 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3227

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-08-22 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3226

___
Python tracker 

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



Re: python list name in subject

2017-08-22 Thread Rick Johnson
Grant Edwards wrote:
> Abdur-Rahmaan Janhangeer wrote:
> > 
> > Hi all,  i am subscribed to different python lists and
> > they put their names in the subject [name] subject  hence
> > i can at a glance tell which mail belongs to which list.
> > A requests to admins to implement if possible
> 
> Please don't. It wastes space which is better used on the
> subject.  If you want the mailing list prepended, then
> configure procmail (or whatever) to do it for you.

Although, considering that the BDFL has now made type-hints
an official part of the language, a "forum-of-origin" type-
hint, may be more Pythonic than we care to realize. 

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


Re: Proposed new syntax

2017-08-22 Thread Chris Angelico
On Wed, Aug 23, 2017 at 1:12 AM, Stephan Houben
 wrote:
> Op 2017-08-22, Ian Kelly schreef :
>> Careful! Python's dunder methods are reserved for use by Python.
>> They're exposed so that we can override them. Calling them directly is
>> generally considered bad style. And in this case specifically, it's
>> not equivalent.
>
> Mmm, you are correct. That's kind of a deception, really.
>
> I have often done things like:
>
>   generate_id = itertools.count().__next__
>
> but I suppose that isn't OK either, then.

That one probably won't bite you, but that doesn't mean it's correct.

General rule of thumb: Dunders are for defining, not for calling.

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


[issue31260] [2.7] Enhance PC/VS9.0/ project to produce python.bat, as PCbuild/

2017-08-22 Thread STINNER Victor

New submission from STINNER Victor:

It would be nice to have a python.bat script produced by the PC/VS9.0/ project, 
as done by the PCbuild/ project.

It would fix the newly added buildbot step "pythoninfo":
https://bugs.python.org/issue30871#msg300703

Without python.bat, it's not easy to get the path to the Python executable from 
the buildbot configuration.

--
components: Build, Windows
messages: 300704
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: [2.7] Enhance PC/VS9.0/ project to produce python.bat, as PCbuild/
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



[issue30871] Add test.pythoninfo

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:

Crap, everything is fine on all CIs... except of a single Windows buildbot 
using Visual Studio 2010 which doesn't produce the required python.bat:

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%20VS9.0%202.7/builds/187/steps/pythoninfo/logs/stdio

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

___
Python tracker 

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



Re: Proposed new syntax

2017-08-22 Thread Stephan Houben
Op 2017-08-22, Ian Kelly schreef :
> Careful! Python's dunder methods are reserved for use by Python.
> They're exposed so that we can override them. Calling them directly is
> generally considered bad style. And in this case specifically, it's
> not equivalent. 

Mmm, you are correct. That's kind of a deception, really.

I have often done things like:

  generate_id = itertools.count().__next__

but I suppose that isn't OK either, then.

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


[issue31258] [2.7] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests:  -3224

___
Python tracker 

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



[issue31259] [3.6] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3225

___
Python tracker 

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



[issue31258] [2.7] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3224

___
Python tracker 

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



[issue31259] [3.6] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:

At this point, I'm not sure that I want to make threading_cleanup() stricter, 
since it's tricky to fix all dangling threads in all tests. At least, I opened 
an issue for 3.6 as a placeholder if we need to backport a few fixes.

See also bpo-31234 where I already backported a few fixes to 3.6.

--

___
Python tracker 

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



[issue31238] pydoc: ServerThread.stop() leaves a dangling thread

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:

I left Python 2.7 and 3.6 unchanged to focus on fixing dangling threads and 
other similar bugs in the master branch first. I will see later if we really 
need to backport the fix to stable branches. In the meanwhile, I close the 
issue.

--

___
Python tracker 

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



[issue31238] pydoc: ServerThread.stop() leaves a dangling thread

2017-08-22 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue31259] [3.6] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3223

___
Python tracker 

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



[issue31259] [3.6] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

New submission from STINNER Victor:

Backport reap_children() and threading_cleanup() enhancements from master to 
3.6 to make tests more reliables, reduce random failures on Python CIs.

See also bpo-31258 for Python 2.7

--
components: Tests
messages: 300700
nosy: haypo
priority: normal
severity: normal
status: open
title: [3.6] Enhance support reap_children() and threading_cleanup()
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



[issue31258] [2.7] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 02e03672e6766b1da847b1635982a70346780744 by Victor Stinner in 
branch '2.7':
bpo-31258: test_urllib2_localnet uses addCleanup(server.stop) (#3184)
https://github.com/python/cpython/commit/02e03672e6766b1da847b1635982a70346780744


--

___
Python tracker 

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



[issue31258] [2.7] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 1460ce5a9325690d8a1913c296a9bba437ff0f39 by Victor Stinner in 
branch '2.7':
bpo-31258: test_signal: call waitpid() to prevent zombie process (#3183)
https://github.com/python/cpython/commit/1460ce5a9325690d8a1913c296a9bba437ff0f39


--

___
Python tracker 

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



[issue31249] test_concurrent_futures leaks dangling threads

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:


New changeset bc61315377056fe362b744d9c44e17cd3178ce54 by Victor Stinner in 
branch 'master':
bpo-31249: Fix ref cycle in ThreadPoolExecutor (#3178)
https://github.com/python/cpython/commit/bc61315377056fe362b744d9c44e17cd3178ce54


--

___
Python tracker 

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



[issue31258] [2.7] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

STINNER Victor added the comment:

Using PR 3182, test_socketserver fails with --fail-env-changed because of 
bpo-31151 "socketserver.ForkingMixIn.server_close() leaks zombie processes".

--

___
Python tracker 

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



[issue2506] Add mechanism to disable optimizations

2017-08-22 Thread diana

Changes by diana :


--
nosy: +diana

___
Python tracker 

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



[issue31258] [2.7] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3222

___
Python tracker 

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



[issue31258] [2.7] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3221

___
Python tracker 

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



[issue31258] [2.7] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3220

___
Python tracker 

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



[issue31258] [2.7] Enhance support reap_children() and threading_cleanup()

2017-08-22 Thread STINNER Victor

New submission from STINNER Victor:

Backport reap_children() and threading_cleanup() enhancements from master to 
2.7 to make tests more reliables, reduce random failures on Python CIs.

--
components: Tests
messages: 300695
nosy: haypo
priority: normal
severity: normal
status: open
title: [2.7] Enhance support reap_children() and threading_cleanup()
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



[issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv

2017-08-22 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3219

___
Python tracker 

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



  1   2   >