[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-09 Thread Camion

Camion  added the comment:

By the way, I guess if the problem arises like that, it's because it might be 
hard to distinguish both situations at the interpreter level, but if it was 
possible, it would be the best solution to have a different error message (even 
if I understand we should be very careful with the idea of changing the 
exception type, even in this case).

I mean : Eric shown an equivalent error, but both are only equivalent at the 
present discrimination level of the interpreter & language grammar.  I 
understand that distinguishing both those semantically different situation 
might be opening the Pandora box and it might be a bad idea... or not.

The point is that, if ever both those situations were in some way 
distinguishable, then... well... we certainly have no idea of how much code 
confronted with this specific situation AND treated it with exception handling, 
BUT, we might make the assumption that a frequent confrontation with this case 
would then already have been raised before, and consequently, it might be 
relevant, at least to keep it in mind for a future evolution (4.0) of the 
language.

--

___
Python tracker 

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



[issue30806] netrc.__repr__() is broken for writing to file

2017-12-09 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 3b9173d33adc2903e1af461214333b0052d7b1e9 by INADA Naoki (Steven 
Loria) in branch '2.7':
bpo-30806: Fix netrc.__repr__() format (GH-2491)
https://github.com/python/cpython/commit/3b9173d33adc2903e1af461214333b0052d7b1e9


--

___
Python tracker 

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



[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-09 Thread Camion

Camion  added the comment:

I wrote it like that on purpose, Steven : My goal was not to show the message 
itself which (I believe) was sufficiently described in the explanation, but to 
show how hard it might be to understand the mistake in regard with the error 
message, even here, with a real life but not outrageously complicated code. :-)

--

___
Python tracker 

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



[issue32255] csv.writer converts None to '""\n' when it is first line, otherwise '\n'

2017-12-09 Thread Licht Takeuchi

Licht Takeuchi  added the comment:

The current implementation does not quote in most case. IOW, the patch which 
makes all '' is quoted is the breaking change (Note that there are some 
applications does not use quoting).

--

___
Python tracker 

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



[issue32255] csv.writer converts None to '""\n' when it is first line, otherwise '\n'

2017-12-09 Thread Licht Takeuchi

Licht Takeuchi  added the comment:

I think the first one is buggy and there are two reasons.

1. The both are valid CSV. The double quoting is unnecessary. Some other 
applications, eg. Excel, does not use the double quoting.
Also, the current implementation make to quote only if the string is '' and the 
output is at the first line.

2. '' is not quoted when the two columns case.
## Input:
```
import csv
fp = open('test.csv', 'w')
w = csv.writer(fp, dialect=None)
w.writerow(['', ''])
w.writerow(['3', 'a'])
fp.close()
```
## Output:
```
,
3,a
```

These seem inconsistent and the quoting is unnecessary in this case.

# References
http://www.ietf.org/rfc/rfc4180.txt

--

___
Python tracker 

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



[issue32245] OSError: raw write() returned invalid length on latest Win 10 Consoles

2017-12-09 Thread Larry Hastings

Change by Larry Hastings :


--
nosy:  -larry

___
Python tracker 

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



[issue32255] csv.writer converts None to '""\n' when it is first line, otherwise '\n'

2017-12-09 Thread Nitish

Nitish  added the comment:

Which scenario you think is the wrong behaviour in this case? First one or 
second one?

I don't know much about csv module, but I thought it was a deliberate choice 
made to quote all empty lines and hence considered the second scenario as 
buggy. But your pull requests seems to fix the first case. Am I missing 
something here?

--

___
Python tracker 

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



[issue17972] inspect module docs omits many functions

2017-12-09 Thread Martin Panter

Change by Martin Panter :


--
dependencies: +Online doc does not include inspect.classify_class_attrs

___
Python tracker 

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



[issue32262] Fix linting errors in asyncio code; use f-strings consistently

2017-12-09 Thread Yury Selivanov

Yury Selivanov  added the comment:

I think it's OK. I want asyncio code to stay modern and up to date.  git blame 
is not a problem here, as only one-two lines are changed per function. Code 
consistency is more important.

--

___
Python tracker 

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



[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-09 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

I agree with Camion that the error message is misleading, and not just for 
beginners. It threw me for a loop too, when I first read it.

Serhiy is right, the exception type cannot and should not be changed, but we 
can change the error message. I'm re-opening the ticket as an enhancement to 
improve the message.

Here's my suggestion:

TypeError: cannot unpack object ('Fraction' is not iterable)

There is no stability guarantees on error messages, so we can include it in 3.6 
(and possibly older if desired).

By the way Camion, as interesting as your program to calculate the digits of pi 
is, in general it is better to cut the code down to the simplest version that 
demonstrates the problem. Something like this would demonstrate it equally as 
well:

def gen():
yield 1

for x, y in gen():
pass

--
nosy: +steven.daprano
resolution: not a bug -> 
stage: resolved -> needs patch
status: closed -> open
type: behavior -> enhancement
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



[issue27505] Missing documentation for setting module __class__ attribute

2017-12-09 Thread Nick Coghlan

Nick Coghlan  added the comment:

This is still a valid docs issue, although PEP 562's module __getattr__ and 
__dir__ will provide a simpler alternative for most of the cases that 
previously required setting the __class__ attribute: 
https://www.python.org/dev/peps/pep-0562/

So I've added https://bugs.python.org/issue32225 as a dependency for this 
issue, as it will likely make sense to figure out a good docs structure for 
those changes first, and then see if there's any work left to do specifically 
for this issue: https://bugs.python.org/issue32225#msg307935

Issue #24991 is a fairly different topic - I've added an extra comment there 
that should help clarify the actual question/proposal.

--
dependencies: +Implement PEP 562: module __getattr__ and __dir__

___
Python tracker 

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



[issue32225] Implement PEP 562: module __getattr__ and __dir__

2017-12-09 Thread Nick Coghlan

New submission from Nick Coghlan :

For documentation of this feature, I'd suggest adding a new subsection after 
https://docs.python.org/3/reference/datamodel.html#customizing-attribute-access 
(but at the same level), called "Customizing module attribute access".

That can then cover defining __getattr__ and __dir__ as module level functions, 
and also mention setting __class__ (which would be enough to close issue 27505 
as well).

The new section should explicitly mention that these only affect lookups and 
modifications made using the attribute access syntax - directly accessing the 
module globals (whether by code within the module, or via a reference to the 
module's globals dict) is unaffected.

--

___
Python tracker 

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



[issue32225] Implement PEP 562: module __getattr__ and __dir__

2017-12-09 Thread Nick Coghlan

Change by Nick Coghlan :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue24991] Define instance mutability explicitly on type objects?

2017-12-09 Thread Nick Coghlan

Nick Coghlan  added the comment:

I updated some of the issue metadata and added a question mark to the issue 
title to help make it clearer that this would require a PEP level conceptual 
enhancement to the language, rather than being about documenting an existing 
concept.

PEP 557's data classes take a step in that direction with their "frozen=True" 
parameter: https://www.python.org/dev/peps/pep-0557/#frozen-instances

--
components: +Interpreter Core
title: Define instance mutability explicitly on type objects -> Define instance 
mutability explicitly on type objects?
type:  -> enhancement
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue31506] Improve the error message logic for object_new & object_init

2017-12-09 Thread Nick Coghlan

Nick Coghlan  added the comment:

Thanks for the feedback and updates folks! If we decide to make any further 
changes, I think they will be best handled as a new issue :)

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



[issue31506] Improve the error message logic for object_new & object_init

2017-12-09 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 780acc89bccf332d334a27887684cc942eb6 by Nick Coghlan (Sanyam 
Khurana) in branch 'master':
bpo-31506: Improve the error message logic for class instantiation (GH-4740)
https://github.com/python/cpython/commit/780acc89bccf332d334a27887684cc942eb6


--

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-12-09 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +4678

___
Python tracker 

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



[issue32257] Support Disabling Renegotiation for SSLContext

2017-12-09 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

Another reason to consider making it possible to disable renegotiation is 
HTTP/2. RFC 7540 says:

   A deployment of HTTP/2 over TLS 1.2 MUST disable renegotiation.  An
   endpoint MUST treat a TLS renegotiation as a connection error
   (Section 5.4.1) of type PROTOCOL_ERROR.

https://tools.ietf.org/html/rfc7540#section-9.2.1

--
nosy: +njs

___
Python tracker 

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



[issue27505] Missing documentation for setting module __class__ attribute

2017-12-09 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Hi Nick,

I started looking at this issue for documenting #22986 and then found #24912 
and #24991.  Has anything changed in the code since 2015 that would make these 
issues (this one and 24991) obsolete?  It seems there were a lot of ideas 
flying around, but I couldn't find other tickets (and the code is still in 
place for 22986 and 24912).  If these haven't been superseded, do you think the 
discussion on #24991 should be continued or should the documentation mentioned 
in this issue still be done?

Thanks!

--
nosy: +csabella

___
Python tracker 

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



[issue32262] Fix linting errors in asyncio code; use f-strings consistently

2017-12-09 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

Usually we don't do such kind of changes. This spoils the output of `git 
annotate` and `git blame` and makes harder researching the history.

--
nosy: +pitrou, rhettinger, serhiy.storchaka

___
Python tracker 

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



[issue32265] Correctly classify builtin static and class methods

2017-12-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +4677
stage:  -> patch review

___
Python tracker 

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



[issue32265] Correctly classify builtin static and class methods

2017-12-09 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

Currently class and some static methods of builtin types are classified as 
plain methods. The proposed patch adds types.ClassMethodDescriptorType for 
unbound class methods of builtin types and makes inspect.classify_class_attrs() 
correctly classifying static and class methods of builtin types. This results 
in changing the help() output.

All __new__ methods now are classified as static.

Examples of class methods are dict.fromkeys and int.from_bytes.

--
components: Library (Lib)
messages: 307928
nosy: serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: Correctly classify builtin static and class methods
type: enhancement
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



[issue20285] Improve object.__doc__ and help(object) output

2017-12-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

How about "The starting base class of all types and classes other than itself." 
(Object.__bases__ = ().)

--

___
Python tracker 

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



[issue32245] OSError: raw write() returned invalid length on latest Win 10 Consoles

2017-12-09 Thread Eryk Sun

Eryk Sun  added the comment:

We need a test that reproduces this problem on a vanilla installation of Python 
3.5. Include the system locale context as well, i.e. the ANSI codepage, OEM 
codepage, and active console output codepage. A reliable test will help 
determine whether this problem also affects legacy console I/O in Python 3.6. 
However, even if the problem affects 3.6, that doesn't mean there's anything we 
can reasonably do about it if the fault is the console host process (i.e. 
conhost.exe, running either ConhostV1.dll or the new ConhostV2.dll 
implementation). 

A possible workaround in Python 3.5 would be to install and enable the 
win_unicode_console package. This package uses the console's native Unicode API 
instead of the legacy codepage API.

--
nosy: +eryksun

___
Python tracker 

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



[issue32264] move pygetopt.h into internal/

2017-12-09 Thread Benjamin Peterson

New submission from Benjamin Peterson :

This header has no public functions. It shouldn't be distributed.

--
components: Interpreter Core
messages: 307925
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: move pygetopt.h into internal/
type: enhancement
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



[issue32260] siphash shouldn't byte swap the keys

2017-12-09 Thread Benjamin Peterson

Change by Benjamin Peterson :


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



[issue30140] Binary arithmetic does not always call subclasses first

2017-12-09 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
components: +Interpreter Core
keywords: +needs review, patch
stage:  -> patch review
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



[issue32257] Support Disabling Renegotiation for SSLContext

2017-12-09 Thread Qichao Chu

Qichao Chu  added the comment:

I don't think it is a bug in OpenSSL. For various reasons, certain applications 
must allow renegotiation while this leaves security problem for others. That's 
why if python can control this flag, applications will be more confident in 
dealing with DoS attacks aimed at renegotiation.

This flag controls not only SSL3 but also TLSv1.1 and TLSv1.2 after testing on 
Nginx and Gevent. 

As of OpenSSL 1.0.2h, in file ssl/s3_lib.c

int ssl3_renegotiate(SSL *s)
{
if (s->handshake_func == NULL)
return (1);

if (s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)
return (0);

s->s3->renegotiate = 1;
return (1);
}

--

___
Python tracker 

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



[issue32263] Template string docs refer to "normal %-based substitutions"

2017-12-09 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue30737] Update devguide link to the new URL

2017-12-09 Thread Julien Palard

Julien Palard  added the comment:

Just created http://psf.upfronthosting.co.za/roundup/meta/issue646 to track the 
"CORE DEVELOPMENT" link of b.p.o.

--

___
Python tracker 

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



[issue32262] Fix linting errors in asyncio code; use f-strings consistently

2017-12-09 Thread Yury Selivanov

Change by Yury Selivanov :


--
keywords: +patch
pull_requests: +4676
stage:  -> patch review

___
Python tracker 

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



[issue32263] Template string docs refer to "normal %-based substitutions"

2017-12-09 Thread Glenn Linderman

New submission from Glenn Linderman :

At least as far back as Python 3.1, the description for Template strings 
(section 6.1.5 in version 3.6.4rc1 docs) starts by differentiating what 
Template strings do, as:

Instead of the normal %-based substitutions, Templates support $-based 
substitutions, using the following rules:

Since this immediately follows a section describing the "Custom String 
Formatting" and the "Format Specification Mini-Language", which does a type of 
substitutions that is {} based, rather than % based, it is hard to grasp 
exactly why %-based substitutions would be considered "normal". Of course, I 
know why, due to the % operator, but for someone just reading through chapter 
6, it is a reference that raises the mental question "Huh? What is normal 
%-based substitution? Are Templates abnormal, if %-based substitutions are 
normal? What did I miss? The previous section was about {}-based substitutions? 
Are they abnormal, too? What are normal %-based substitutions, anyway?" rather 
than helping to describe what Templates are and do.

--
assignee: docs@python
components: Documentation
messages: 307922
nosy: docs@python, v+python
priority: normal
severity: normal
status: open
title: Template string docs refer to "normal %-based substitutions"
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue32262] Fix linting errors in asyncio code; use f-strings consistently

2017-12-09 Thread Yury Selivanov

Change by Yury Selivanov :


--
components: asyncio
nosy: yselivanov
priority: normal
severity: normal
status: open
title: Fix linting errors in asyncio code; use f-strings consistently
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



[issue32262] Fix linting errors in asyncio code; use f-strings consistently

2017-12-09 Thread Yury Selivanov

Change by Yury Selivanov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue30737] Update devguide link to the new URL

2017-12-09 Thread Julien Palard

Julien Palard  added the comment:

I opened a PR on psf-salt to fix HTTP redirections 
https://github.com/python/psf-salt/pull/123

--

___
Python tracker 

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



[issue32245] OSError: raw write() returned invalid length on latest Win 10 Consoles

2017-12-09 Thread Larry Hastings

Larry Hastings  added the comment:

To confirm what Steve said: we no longer accept bug fixes for Python 3.5 (or 
3.4).  We only accept security fixes for 3.5 (and 3.4).

--

___
Python tracker 

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



[issue30737] Update devguide link to the new URL

2017-12-09 Thread Julien Palard

Julien Palard  added the comment:

Just spotted the "CORE DEVELOPMENT" link in the bugs.python.org points to the 
old one too.

Redirections should be placed on https://docs.python.org/devguide/ to the new 
one too.

--
nosy: +mdk

___
Python tracker 

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



[issue32245] OSError: raw write() returned invalid length on latest Win 10 Consoles

2017-12-09 Thread Steve Dower

Steve Dower  added the comment:

Does this only affect Python 3.5? We're highly unlikely to take a fix for that 
version.

This code was rewritten for 3.6, so it wouldn't surprise me if there is no 
longer an issue.

--
nosy: +larry

___
Python tracker 

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



[issue31392] Upgrade installers to OpenSSL 1.1.0g and 1.0.2n

2017-12-09 Thread Ned Deily

Ned Deily  added the comment:

And now 1.0.2n is out. I'm not sure how vulnerable Python is to the main 
problem fixed (see https://www.openssl.org/news/secadv/20171207.txt) which only 
impacts 1.0.2.x but I'd be willing to pull it into 3.6.4 final for the Windows 
and macOS installers.

--
title: Upgrade installers to OpenSSL 1.1.0g and 1.0.2m -> Upgrade installers to 
OpenSSL 1.1.0g and 1.0.2n

___
Python tracker 

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



[issue20285] Improve object.__doc__ and help(object) output

2017-12-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

"Python class" can be read as a user type defined in Python (usually with the 
"class" statement). The term "class" in the glossary is used with this meaning 
in contrary to the term "type" which means also builtin and extension types. In 
Python 3 "object" is a base class of all types, not only user-defined class.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32260] siphash shouldn't byte swap the keys

2017-12-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 60ed1308304964e5648d8bfc9b74bd549570fa83 by Benjamin Peterson in 
branch 'master':
byte swap the raw hash secrets (more bpo-32260) (#4773)
https://github.com/python/cpython/commit/60ed1308304964e5648d8bfc9b74bd549570fa83


--

___
Python tracker 

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



[issue32260] siphash shouldn't byte swap the keys

2017-12-09 Thread Benjamin Peterson

Change by Benjamin Peterson :


--
pull_requests: +4675

___
Python tracker 

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



[issue32245] OSError: raw write() returned invalid length on latest Win 10 Consoles

2017-12-09 Thread Eryk Sun

Change by Eryk Sun :


--
components: +Windows
nosy: +paul.moore, tim.golden, zach.ware
stage:  -> test needed

___
Python tracker 

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



[issue20285] Improve object.__doc__ and help(object) output

2017-12-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

After looking at https://en.wiktionary.org/wiki/base I can explain better why 
'most base class' is wrong, and felt wrong to participants in the python-list 
thread.

'Base' is actually two words.  As a noun (or verb), it comes from Ancient Greek 
βάσις (básis), a foundation from which other things extend or derive.  As an 
adjective, it comes from Late Latin bassus (“low”).

In computer science and Python, the couplet 'base class' is being used, it 
seems to me and apparently others, as a noun-noun compound, meaning, 
'foundation class', not as an adjective-noun phrase meaning 'low class' (let 
along 'depraved class').  However, 'most base class' must be parsed as '(most 
base) class', with 'base' re-interpreted as the adjective meaning 'low' (or 
worse).  The switch in meaning of 'base' is similar in 'baseball' versus  'most 
base ball'.

--

___
Python tracker 

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



[issue32260] siphash shouldn't byte swap the keys

2017-12-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 4e3e156391e70cd23cae18f2629ec323b3b1e7de by Benjamin Peterson in 
branch 'master':
bpo-32260: don't byte swap siphash keys (#4771)
https://github.com/python/cpython/commit/4e3e156391e70cd23cae18f2629ec323b3b1e7de


--

___
Python tracker 

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



[issue32261] Online doc does not include inspect.classify_class_attrs

2017-12-09 Thread Cheryl Sabella

New submission from Cheryl Sabella :

Documentation for inspect.classify_class_attrs exists in the docstring and, 
therefore, pydoc, but is not included in the online docs for inspect.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 307912
nosy: csabella, docs@python
priority: normal
severity: normal
status: open
title: Online doc does not include inspect.classify_class_attrs
type: enhancement
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



[issue32257] Support Disabling Renegotiation for SSLContext

2017-12-09 Thread Christian Heimes

Christian Heimes  added the comment:

If it's a bug in OpenSSL, please report the bug with OpenSSL and request a fix. 
Bugs should be patched where they occur. Can you contact OpenSSL development 
team, please?

The flag is not documented and I don't know how it influences OpenSSL. Does the 
flag only affect SSL 3.0 or also TLS 1.0 and newer?

--

___
Python tracker 

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



[issue32260] siphash shouldn't byte swap the keys

2017-12-09 Thread Benjamin Peterson

Change by Benjamin Peterson :


--
keywords: +patch
pull_requests: +4674
stage:  -> patch review

___
Python tracker 

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



[issue32260] siphash shouldn't byte swap the keys

2017-12-09 Thread Benjamin Peterson

New submission from Benjamin Peterson :

Reference siphash takes the keys as a bytes, so it makes sense to byte swap 
when reifying the keys as 64-bit integers. However, Python's modified siphash 
takes host integers in to start with.

--
components: Interpreter Core
messages: 307910
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: siphash shouldn't byte swap the keys
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue31650] implement PEP 552

2017-12-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 42aa93b8ff2f7879282b06efc73a31ec7785e602 by Benjamin Peterson in 
branch 'master':
closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575)
https://github.com/python/cpython/commit/42aa93b8ff2f7879282b06efc73a31ec7785e602


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



[issue31650] implement PEP 552

2017-12-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

On Sat, Dec 9, 2017, at 01:06, Serhiy Storchaka wrote:
> 
> Serhiy Storchaka  added the comment:
> 
> While we are here, can other changes be made?

All these suggestions seem fine, but they're not in the PEP and the
change is already large enough.

gps also points out we should expand the timestamp field to 64 bits for
2038 proofing.

--

___
Python tracker 

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



[issue8722] Documentation for __getattr__

2017-12-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Thanks.  I normally look at source in my local clone with an editor.  I found 
'view blame' and 'view blame prior' on github.

--
keywords:  -patch

___
Python tracker 

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



[issue32257] Support Disabling Renegotiation for SSLContext

2017-12-09 Thread Qichao Chu

Qichao Chu  added the comment:

Hi Christian,

Thank you for review! I have changed the code to directly setting this flag by 
using s3->flag. Code is copied from nginx repo: 
https://github.com/nginx/nginx/blob/ed0cc4d52308b75ab217724392994e6828af4fda/src/event/ngx_event_openssl.c.

I think this change is still needed. Although OpenSSL claimed it is fixed, 
THC-SSL-DOS showed it is vulnerable. If this is not the case, then nginx won't 
need to set the flag.

Thanks,
Qichao

--

___
Python tracker 

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



[issue32253] Deprecate old-style locking in asyncio/locks.py

2017-12-09 Thread Andrew Svetlov

Change by Andrew Svetlov :


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



[issue32253] Deprecate old-style locking in asyncio/locks.py

2017-12-09 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset 28d8d14013ade0657fed4673f5fa3c08eb2b1944 by Andrew Svetlov in 
branch 'master':
bpo-32253: Deprecate with statement and bare await for asyncio locks (GH-4764)
https://github.com/python/cpython/commit/28d8d14013ade0657fed4673f5fa3c08eb2b1944


--

___
Python tracker 

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



[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-09 Thread Camion

Camion  added the comment:

I'm not talking about changing the type of the exception, Serhiy. but only to 
make the text message more explicit by adding a lead to a secondary possible 
cause. I do not understand how this addition would be misleading - more than 
the case I presented ? (Did you check my example ?)

I agree that this message might possibly make my mistake obvious to an senior 
_python_ programmer, but doesn't the constraint of being _experienced in 
python_, not go in contradiction with the mantra "Explicit is better than 
implicit" ?

--

___
Python tracker 

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



[issue32234] Add context management to mailbox.Mailbox

2017-12-09 Thread Yury Selivanov

Change by Yury Selivanov :


--
nosy:  -yselivanov

___
Python tracker 

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



[issue32234] Add context management to mailbox.Mailbox

2017-12-09 Thread sblondon

Change by sblondon :


--
keywords: +patch
pull_requests: +4673
stage:  -> patch review

___
Python tracker 

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



[issue32253] Deprecate old-style locking in asyncio/locks.py

2017-12-09 Thread Yury Selivanov

Yury Selivanov  added the comment:

> This can make harder writing portable code that works in 2.7, 3.4 and 3.7.

asyncio for Python 3.4 is fairly outdated.  Most of the async packages today 
require 3.5+, as they usually use async/await syntax.  I say this sort of 
backwards compatibility (showing a warning) isn't really a big concern.  A 
bigger concern for us is new code using 'with await lock' pattern, hence the 
warning.

--

___
Python tracker 

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



[issue26865] Meta-issue: support of the android platform

2017-12-09 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

issue 22724 is fixed for Android.

--
dependencies:  -byte-compile fails for cross-builds

___
Python tracker 

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



[issue26865] Meta-issue: support of the android platform

2017-12-09 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
dependencies: +Add platform.android_ver()  to test.pythoninfo for Android 
platforms, Do not use the canonical path in pydoc 
test_mixed_case_module_names_are_lower_cased, [asyncio] test failure when the 
platform lacks a functional  sem_open(), [ctypes] all long double tests fail on 
android-24-x86_64, [ctypes] test_struct_by_value fails on android-24-arm64, 
android: locale is modified by test_strftime, android: test_faulthandler fails 
also on API 24, detect_modules() in setup.py must also search the sysroot 
paths, test.pythoninfo does not print the cross-built sysconfig data, 
test_regrtest alters the execution environment on Android, uuid.getnode() 
should return the MAC address on Android

___
Python tracker 

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



[issue26865] Meta-issue: support of the android platform

2017-12-09 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

issue #32031: Do not use the canonical path in pydoc 
test_mixed_case_module_names_are_lower_cased
issue #32059: detect_modules() in setup.py must also search the sysroot paths
issue #32126: [asyncio] test failure when the platform lacks a functional 
sem_open()
issue #32138: android: test_faulthandler fails also on API 24
issue #32139: android: locale is modified by test_strftime
issue #32205: test.pythoninfo prints the native sysconfig data when 
cross-compiling
issue #32199: uuid.getnode() now returns the MAC address on Android
issue #32246: test_regrtest alters the execution environment on Android
issue #32210: Add platform.android_ver() to test.pythoninfo for Android 
platforms
issue #32202: [ctypes] all long double tests fail on android-24-x86_64
issue #32203: [ctypes] test_struct_by_value fails on android-24-arm64

--

___
Python tracker 

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



[issue32255] csv.writer converts None to '""\n' when it is first line, otherwise '\n'

2017-12-09 Thread Licht Takeuchi

Change by Licht Takeuchi :


--
keywords: +patch
pull_requests: +4672
stage:  -> patch review

___
Python tracker 

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



[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I concur with Eric. The current exception is correct and allows to identify 
your mistake. Changing the type of the exception will break an existing code, 
and the message proposed by you is misleading.

--
nosy: +serhiy.storchaka
status: open -> closed

___
Python tracker 

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



[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-09 Thread Camion

Camion  added the comment:

Ok, but the other explanation is valid as well. That's why I suggest to modify 
the error message like this : 


TypeError: '[TYPE]' object is not iterable
- OR -
ValueError: not enough values to unpack (expected [N], got 1)

--
status: closed -> open

___
Python tracker 

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



[issue2636] Adding a new regex module (compatible with re)

2017-12-09 Thread petros

Change by petros :


--
nosy: +petros

___
Python tracker 

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



[issue20285] Improve object.__doc__ and help(object) output

2017-12-09 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Hi Terry,

I've submitted a PR for this.  Thanks!

--
nosy: +csabella

___
Python tracker 

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



[issue32212] few discrepancy between source and docs in logging

2017-12-09 Thread Vinay Sajip

Change by Vinay Sajip :


--
resolution: not a bug -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue32212] few discrepancy between source and docs in logging

2017-12-09 Thread Vinay Sajip

Vinay Sajip  added the comment:


New changeset 292fce9934280867ca9a65870495f83fca37751e by Vinay Sajip in branch 
'2.7':
bpo-32212: Updated logging documentation to make parameter names more 
consistent with source. (GH-4765) (GH-4768)
https://github.com/python/cpython/commit/292fce9934280867ca9a65870495f83fca37751e


--

___
Python tracker 

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



[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-09 Thread Eric V. Smith

Eric V. Smith  added the comment:

The error message is correct, but I'm sorry it's confusing.

Here's an equivalent error:

a, b = 3

You'll get the error "TypeError: 'int' object is not iterable". That's because 
Python sees 2 items to the left of the assignment, so it needs to extract 2 
items from the right side. To get 2 values from the right side, it iterates 
over the right side. In this case, 3 cannot be iterated over, thus the error 
message.

Now consider:

a, b = 3, 4

Again, to get 2 items from the right side, Python iterates over it. In this 
case the thing on the right side is a 2 element tuple. It's a little confusing 
that it's a tuple because it doesn't have parentheses, but the comma between 3 
and 4 makes it a tuple. In this case, Python can iterate over the tuple, and 
the tuple has exactly 2 elements, so the assignment to a and b succeeds with a 
= 3 and b = 4.

I hope that clears it up.

--
nosy: +eric.smith
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



[issue32212] few discrepancy between source and docs in logging

2017-12-09 Thread Vinay Sajip

Vinay Sajip  added the comment:


New changeset 63868181a904c844d8d01e3badfdd5b134acc5fa by Vinay Sajip in branch 
'3.6':
bpo-32212: Updated logging documentation to make parameter names more 
consistent with source. (GH-4765) (GH-4767)
https://github.com/python/cpython/commit/63868181a904c844d8d01e3badfdd5b134acc5fa


--

___
Python tracker 

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



[issue32212] few discrepancy between source and docs in logging

2017-12-09 Thread Vinay Sajip

Change by Vinay Sajip :


--
pull_requests: +4671

___
Python tracker 

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



[issue8722] Documentation for __getattr__

2017-12-09 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

>> Is there a way to get an annotated listing from git (given which patch, and 
>> therefore which person, is responsible for each line)?

Which source did you want to look at?  In github, if you go into any source, 
you can click on a line and it gives an option for 'git blame'.  That shows the 
last commit change for each line.  You can then click an icon to see a previous 
commit, etc.  For the .rst sources, it's a little different and there is a 
Blame button at the top of the source that will bring up the same view (commit 
annotations to the left of the source) as right-clicking.

I had posted about git blame a few months ago on core mentorship and Carol 
Willing mentioned another tool to get all the changes by line.  Here was her 
post:

Thanks for passing along the tip for others. You may also find the npm package 
`git-guilt` useful as it will display all the contributors to a particular 
line's history. https://www.npmjs.com/package/git-guilt 


--

___
Python tracker 

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



[issue32257] Support Disabling Renegotiation for SSLContext

2017-12-09 Thread Christian Heimes

Christian Heimes  added the comment:

I don't think your PR is required. The issue has been addressed in OpenSSL 
0.9.8m over 7 years ago, https://access.redhat.com/security/cve/cve-2009-3555.


>From https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html

> OpenSSL always attempts to use secure renegotiation as described in RFC5746. 
> This counters the prefix attack described in CVE-2009-3555 and elsewhere.


OpenSSL changelog

Changes between 0.9.8l and 0.9.8m [25 Feb 2010]


  *) Implement RFC5746. Re-enable renegotiation but require the extension
 as needed. Unfortunately, SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
 turns out to be a bad idea. It has been replaced by
 SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION which can be set with
 SSL_CTX_set_options(). This is really not recommended unless you
 know what you are doing.
 [Eric Rescorla , Ben Laurie, Steve Henson]

--

___
Python tracker 

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



[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-09 Thread Camion

New submission from Camion :

I'm new with Python and I've been blocked for day on a "TypeError: 'Fraction' 
object is not iterable" error message, while the problem turned out to be 
completely different.

I don't even know to what programming case this message would have been the 
right interpretation, but in this situation, it was completely wrong and I 
believe it can cause much loss of time for inexperienced python programmer (at 
least, I believe it should document alternative causes)

Here is a sample code to show how misleading it can be (It's a program to 
compute pi with fractions)

from fractions import Fraction


def order(x):
r, old_r, n, old_n = 2, 1, 1, 0
while (x>=r):
r, old_r, n, old_n = r*r, r, 2*n, n
return order(x >> old_n) + old_n if old_n > 0 else 0


def terms(m, n, i):
return Fraction(4 * m, n**(2*i+1) * (2*i+1))


def terms_generator(exp_prec):
ws = [ [terms(parm[1], parm[2], 0), 0] + list(parm)
  for parm in ((1, 44, 57),
   (1, 7, 239),
   (-1, 12, 682),
   (1, 24, 12943))]
digits = 0
while digits

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



[issue32212] few discrepancy between source and docs in logging

2017-12-09 Thread Vinay Sajip

Change by Vinay Sajip :


--
pull_requests: +4670

___
Python tracker 

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



[issue32257] Support Disabling Renegotiation for SSLContext

2017-12-09 Thread Christian Heimes

Christian Heimes  added the comment:

Thanks for your patch, a few comments

We generally don't have special functions to set flags. 
SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS is an OpenSSL < 1.1.0 option. OpenSSL 1.1.0 
still defines the flag but no longer uses it. With your patch, the Python 
function would fail with a NameError.

I don't think that self.options is the right way to set that flag. The option 
attribute manipulates SSL_CTX->options, which affects SSL->options. The flag 
has to be set on SSL->s3->flags.

Your patch is missing documentation update and tests.

--

___
Python tracker 

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



[issue32212] few discrepancy between source and docs in logging

2017-12-09 Thread Vinay Sajip

Vinay Sajip  added the comment:


New changeset a9f8df646aac7fc94ced0aefd1ed2c8566d14d10 by Vinay Sajip in branch 
'master':
bpo-32212: Updated logging documentation to make parameter names more 
consistent with source. (GH-4765)
https://github.com/python/cpython/commit/a9f8df646aac7fc94ced0aefd1ed2c8566d14d10


--

___
Python tracker 

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



[issue32250] Add loop.current_task() and loop.all_tasks() methods

2017-12-09 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
keywords: +patch
pull_requests: +4669
stage:  -> patch review

___
Python tracker 

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



[issue32212] few discrepancy between source and docs in logging

2017-12-09 Thread Vinay Sajip

Change by Vinay Sajip :


--
keywords: +patch
pull_requests: +4668
stage: needs patch -> patch review

___
Python tracker 

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



[issue32258] Rewrite asyncio docs to use async/await syntax

2017-12-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
title: Rewrite ayncio docs to use async/await syntax -> Rewrite asyncio docs to 
use async/await syntax

___
Python tracker 

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



[issue32258] Rewrite ayncio docs to use async/await syntax

2017-12-09 Thread Andrew Svetlov

New submission from Andrew Svetlov :

https://bugs.python.org/issue32193 switched asyncio implementation to 
async/await syntax.

We need to update documentation as well.

--
assignee: docs@python
components: Documentation, asyncio
messages: 307889
nosy: asvetlov, docs@python, yselivanov
priority: normal
severity: normal
status: open
title: Rewrite ayncio docs to use async/await syntax
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



[issue32253] Deprecate old-style locking in asyncio/locks.py

2017-12-09 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

1. asyncio is not supported by 2.7 anyway
2. with (yield from lock) is based on very non-obvious tricks:
  a) lock.__enter__ is forbidden and raises RuntimeError
  b) actually lock.__iter__ is called for lock acquiring *before* calling `with`
  c) the object returned from __iter__ is a context manager with 
__enter__/__exit__ methods
3. asyncio is converted to async/await syntax by 
https://bugs.python.org/issue32193 (old `yield from` style is fully supported 
still).
4. the deprecation was proposed by Yury Selivanov in 
https://github.com/python/cpython/pull/4753#discussion_r155658200

--

___
Python tracker 

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



[issue32253] Deprecate old-style locking in asyncio/locks.py

2017-12-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This can make harder writing portable code that works in 2.7, 3.4 and 3.7.

What is the benefit of the deprecation? Are there inevitable design or 
implementation errors in these constructions? Or getting rid of them can 
significantly simplify the implementation?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue8722] Documentation for __getattr__

2017-12-09 Thread Berker Peksag

Change by Berker Peksag :


--
keywords: +patch

___
Python tracker 

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



[issue32252] test_regrtest leaves a test_python_* directory in TEMPDIR

2017-12-09 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Oh it seems your Fedora 27 also uses systemd and uses the same configuration as 
archlinux, see https://wiki.archlinux.org/index.php/Core_dump. In that case 
according to this wiki your core dumps go to /var/lib/systemd/coredump and this 
may explain the different behaviors between your system and mine.

My setup (updating the file /etc/sysctl.d/50-coredump.conf) was the documented 
archlinux practice 4 years ago when systemd used to store the coredumps in log 
files (very annoying). This setup is still working although it is not 
documented in this wiki (maybe somewhere else).

FWIW I have kept the notes made when configuring archlinux at that time, they 
are:

disable core dumps managed by systemd-coredumpctl(1) - see also man pages for 
sysctl.d and sysctl
/etc/sysctl.d/50-coredump.conf# same file name as in 
/usr/lib/sysctl.d/
kernel.core_pattern=core-%e.%s
echo "core-%e.%s" > /proc/sys/kernel/core_pattern # or reboot

# per user
ulimit -c unlimited

--

___
Python tracker 

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



[issue32253] Deprecate old-style locking in asyncio/locks.py

2017-12-09 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
keywords: +patch
pull_requests: +4667
stage:  -> patch review

___
Python tracker 

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



[issue32252] test_regrtest leaves a test_python_* directory in TEMPDIR

2017-12-09 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

> Can you please explain how to reproduce the bug? (Which commands should I 
> type?)

./python -m test test_regrtest

> What is your /proc/sys/kernel/core_pattern?

$ cat /proc/sys/kernel/core_pattern
core-%e.%s
$ ulimit -c
unlimited

FWIW on archlinux (my platform) coredumps are handled by systemd and to enable 
coredumps the file /etc/sysctl.d/50-coredump.conf has to be updated to contain:

kernel.core_pattern=core-%e.%s

--

___
Python tracker 

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



[issue31650] implement PEP 552

2017-12-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

While we are here, can other changes be made?

1. Increase the size of the constant part of the signature. Currently it is 
only 2 bytes (3rd and 4th bytes are b'\r\n') and it is hard to use them in 
tools like `file`.

2. Split the magic number on two parts. The first part encodes 
backward-incompatible changes and can be updated only in new feature releases. 
The second part encodes backward compatible changes and can be changed in 
bugfix releases.

3. Maybe even include the minimal Python version? This would simplify the 
launcher which needs to map a magic number to Python version.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-12-09 Thread STINNER Victor

STINNER Victor  added the comment:

(Oops, closing was my intent of my previous comment, but I forgot it,
thanks Berker.)

--

___
Python tracker 

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