[issue37555] _CallList.__contains__ doesn't always respect ANY.

2019-07-21 Thread Elizabeth Uselton


Elizabeth Uselton  added the comment:

Serhiy, thanks for pointing that out. I generally agree with everything in that 
thread, and learned some new things (I had no idea count(), index() and 
remove() used needle on the left side!) However, I'm not trying to spearhead a 
rewrite of everything. I think what I'm advocating for on the two assertEqual 
order tests is that as Guido mentioned "people should fix their __eq__ 
implementation to properly return NotImplemented". _Call's __eq__ currently has 
no path to NotImplemented, and if it did, those tests would pass. Perhaps I 
should change it from the or statement to make it more clear that's what's 
effectively happening.

I'd like to talk more about what a good solution would be for the _Call __eq__ 
issue, since people (including myself!) have concerns, but I think it would be 
best to open another bug for that, and not scope creep myself. I've reverted 
all the commits having to do with that part so hopefully the issue with 
_call_matcher can get sorted separately, and then we can talk about this as 
it's own issue.

--

___
Python tracker 

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



[issue37647] Wrong lineno in traceback when formatting strings with % and multilines

2019-07-21 Thread Bruno P. Kinoshita


New submission from Bruno P. Kinoshita :

Hi,

Tested on Python 3.7 on Ubuntu LTS. But I believe this affects previous 
versions too, as found it from an issue posted in Jinja2 in 2013: 
https://github.com/pallets/jinja/issues/276

This code simulates the issue where the traceback has the wrong line number 
(without using any Jinja2 code):

```
class Z(object):
def __str__(self):
raise ValueError('Z error')


def raise_generator():
yield 'three values are: %s %s %s' % (
'primeiro',
Z(),  # traceback must point to this lineno 9
'terceiro'  # but points to this lineno 10 (__str__ only, __eq__ is OK)
)


print(list(raise_generator()))
```

The output:

```
Traceback (most recent call last):
  File 
"/home/kinow/Development/python/workspace/cylc-flow/cylc/flow/tests/Z.py", line 
14, in 
print(list(raise_generator()))
  File 
"/home/kinow/Development/python/workspace/cylc-flow/cylc/flow/tests/Z.py", line 
10, in raise_generator
'terceiro'  # but points to this lineno 10 (__str__ only, __eq__ is OK)
  File 
"/home/kinow/Development/python/workspace/cylc-flow/cylc/flow/tests/Z.py", line 
3, in __str__
raise ValueError('Z error')
ValueError: Z error
```

Jinja uses something similar to the class Z to raise errors when the template 
has undefined variables. The curious part is that if instead of simply 
formatting the string with "%s" % (Z()) you use "%s" % (str(Z())) or if you 
callZ().__str__(), then the traceback reports the correct line number.

Not sure if intentional, but would be nice if the traceback reported the 
correct line number, and I think other applications could end up having the 
same issue.

This is my first issue, so I apologize if I did not include enough information, 
or if there is anything missing in this ticket. Let me know if I need to update 
it with more information or formatting the code.

Would be happy to work on this if this is considered an easy-to-fix issue.

Thanks all for your work on Python,

Bruno P. Kinoshita

--
components: Interpreter Core
messages: 348277
nosy: kinow
priority: normal
severity: normal
status: open
title: Wrong lineno in traceback when formatting strings with % and multilines
type: behavior
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



[issue30550] Document order-preserving dictionary output in json

2019-07-21 Thread Kyle Stanley


Kyle Stanley  added the comment:

> Please keep focused on the OP's thought that the JSON docs should explicitly 
> promised that
> key/value pairs are added in the order that they are encountered. The 
> existing JSON docs imply
> this pretty strongly, but it can be made more explicit.

I agree that the behavior could be more explicitly stated in the docs, as that 
could be potentially useful information for users to be aware of. 

Apologies for derailing the topic, I became too focused on the OrderedDict vs 
Dict topic, which was only a small part of the issue. Any further discussion on 
that topic or updating the OrderedDict docs should probably be moved into it's 
own issue, if at all.

--

___
Python tracker 

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



[issue30550] Document order-preserving dictionary output in json

2019-07-21 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
priority: normal -> low
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



[issue30550] Document order-preserving dictionary output in json

2019-07-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Kyle, the link you gave already discusses performance to the extent that it 
matters.  Please keep focused on the OP's thought that the JSON docs should 
explicitly promised that key/value pairs are added in the order that they are 
encountered.  The existing JSON docs imply this pretty strongly, but it can be 
made more explicit.

--

___
Python tracker 

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



[issue30550] Document order-preserving dictionary output in json

2019-07-21 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee: docs@python -> rhettinger

___
Python tracker 

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



[issue37646] eval() in a list comprehension

2019-07-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This used to work as you expected in Python 2.

In Python 3, list comprehensions create their own inner scope just like 
generator expressions.  

Per the eval() docs, "if both dictionaries are omitted, the expression is 
executed in the environment where eval() is called." 

In your code example, the inner scope doesn't have a local variable "x", so the 
global variable "x" is retrieved.  

That said, I would have expected the inner "x" to be found as a non-local.  So 
yes, this does seem odd an it isn't really true that "the expression is 
executed in the environment where eval() is called."  Instead, it uses the 
globals() and locals() of the environment where it is called but not the nested 
scope.  Perhaps this should be clarified in the docs if it is in fact the 
intended behavior.

--
nosy: +rhettinger

___
Python tracker 

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



[issue36018] Add a Normal Distribution class to the statistics module

2019-07-21 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I have a query about the documentation:

   The default *method* is "exclusive" and is used for data sampled
   from a population that can have more extreme values than found 
   in the samples. ...
   Setting the *method* to "inclusive" is used for describing 
   population data or for samples that include the extreme points.

In all my reading about quantile calculation methods, this is the first time 
I've come across this recommendation. Do you have a source for it or a 
justification?

Thanks.

--

___
Python tracker 

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



[issue37646] eval() in a list comprehension

2019-07-21 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

What leads you to believe that eval *shouldn't* work in the global scope in a 
comprehension?

If not the global scope, which scope should it be, local or nonlocal? Is the 
behaviour documented differently?

For reference, the current docs for eval are here:
https://docs.python.org/3.5/library/functions.html#eval

--
nosy: +steven.daprano

___
Python tracker 

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



[issue36546] Add quantiles() to the statistics module

2019-07-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14679
pull_request: https://github.com/python/cpython/pull/14899

___
Python tracker 

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



[issue37646] eval() in a list comprehension

2019-07-21 Thread Grzegorz Krasoń

New submission from Grzegorz Krasoń :

eval() works in a global scope when invoked in a list comprehension.

--
components: Interpreter Core
files: demo.py
messages: 348271
nosy: Grzegorz Krasoń
priority: normal
severity: normal
status: open
title: eval() in a list comprehension
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48495/demo.py

___
Python tracker 

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



[issue36018] Add a Normal Distribution class to the statistics module

2019-07-21 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +14678
pull_request: https://github.com/python/cpython/pull/14898

___
Python tracker 

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



[issue32912] Raise non-silent warning for invalid escape sequences

2019-07-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I think it is poor form to bombard end-users with warnings about things they 
can't fix.

--

___
Python tracker 

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



[issue32912] Raise non-silent warning for invalid escape sequences

2019-07-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Here's another example from the current build of the docs using Sphinx:

(venv) ~/npython/Doc $ make html
mkdir -p build
Building NEWS from Misc/NEWS.d with blurb
PATH=./venv/bin:$PATH sphinx-build -b html -d build/doctrees -D 
latex_elements.papersize=  -W . build/html
Running Sphinx v2.1.0
/Users/raymond/npython/venv/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:2978:
 SyntaxWarning: invalid escape sequence \l
  self.out.append('}] \leavevmode ')

--

___
Python tracker 

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



[issue36338] urlparse of urllib returns wrong hostname

2019-07-21 Thread jpic


Change by jpic :


--
nosy: +jpic

___
Python tracker 

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



[issue37415] Error build Python with Intel compiler: doesn't provide atomic_uintptr_t

2019-07-21 Thread Stefan Krah


Stefan Krah  added the comment:

Is it available with -std=c11? It is a bit strange that we use -std=c99. I 
thought that header is C11:

https://en.cppreference.com/w/c/atomic

--
nosy: +skrah

___
Python tracker 

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



[issue37415] Error build Python with Intel compiler: doesn't provide atomic_uintptr_t

2019-07-21 Thread Glenn Johnson


Change by Glenn Johnson :


--
nosy: +Glenn Johnson

___
Python tracker 

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



[issue36338] urlparse of urllib returns wrong hostname

2019-07-21 Thread jpic


Change by jpic :


--
pull_requests: +14677
pull_request: https://github.com/python/cpython/pull/14896

___
Python tracker 

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



[issue17535] IDLE editor line numbers

2019-07-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Ned, about window menus and Mac's single menu: tk and macOS work together to 
switch the menu to the menu of a window that becomes active.  I opened two 
editor windows and clicked 'Show Code Context' in just one of them.  The menu 
then said 'Hide Code Context'.  I clicked the other window and then Option and 
it said 'Show...'.  More experiments clicking windows and toggling CC went 
well.  Show/Hide Line Numbers is intended to work the same way.  Since Tal 
cannot now test, verification would be nice, as well as the line-up check 
described above

--

___
Python tracker 

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



[issue17535] IDLE editor line numbers

2019-07-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Tal's 2 issues above have been resolved.
1. Line numbers are initially off by default but this can be reversed on the 
Settings General tab.
2. Line numbers can be shown and hidden for a window on the Option menu.

The only bug I know of that must be fixed before merging is that font changes 
do not always get propagated to the numbers.

I recently added 1 pixel of padding to line up line numbers and text.  How is 
is on other machines?  Especially Mac, if anyone has one?  (Tal's just broke.) 
Easy test: open a new file; type multiple 2s and 7s on lines 2 and 7.  Eyeball, 
then, use paper to see if low and high horizontal lines on 2s and 7s are lined 
up properly.

--
title: IDLE: Add an option to show line numbers along the left side of the 
editor window, and have it enabled by default. -> IDLE editor line numbers

___
Python tracker 

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



[issue30550] Document order-preserving dictionary output in json

2019-07-21 Thread Kyle Stanley


Kyle Stanley  added the comment:

> OrderedDict is not recommended to preserve order any more.

> Please forget about OrderedDict unless you need additional feature 
> OrderedDict provides.  It is far inefficient than regular dict.

Thanks for the clarification. Should this recommendation be briefly mentioned 
in the documentation 
(https://docs.python.org/3.9/library/collections.html#ordereddict-objects)? 

Currently, the docs reference that as of 3.7, the order-preserving behavior of 
standard dictionaries is guaranteed, but there is no mention of the significant 
differences in efficiency. Based on the current description, a user might end 
up using OrderedDictionary on the basis that they *might* have a need for 
reordering elements. 

If the difference in performance is significant enough, it would be worth 
noting in the docs so that users can take it into consideration when deciding 
which data structure to use.

--

___
Python tracker 

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



[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-21 Thread miss-islington


miss-islington  added the comment:


New changeset 849a37a2b640af14cfb004cdbced01983b0d9d2b by Miss Islington (bot) 
in branch '3.7':
bpo-37627: Add acknowledgment (GH-14883)
https://github.com/python/cpython/commit/849a37a2b640af14cfb004cdbced01983b0d9d2b


--

___
Python tracker 

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



[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-21 Thread miss-islington


miss-islington  added the comment:


New changeset 52ee929957871da3d2622ab16887a1a03e6e08bf by Miss Islington (bot) 
in branch '3.8':
bpo-37627: Add acknowledgment (GH-14883)
https://github.com/python/cpython/commit/52ee929957871da3d2622ab16887a1a03e6e08bf


--

___
Python tracker 

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



[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14676
pull_request: https://github.com/python/cpython/pull/14895

___
Python tracker 

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



[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14675
pull_request: https://github.com/python/cpython/pull/14894

___
Python tracker 

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



[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 4214f1ec3b3c73badd639229eff81eb5e57b82ec by Terry Jan Reedy in 
branch 'master':
bpo-37627: Add acknowledgment (#14883)
https://github.com/python/cpython/commit/4214f1ec3b3c73badd639229eff81eb5e57b82ec


--

___
Python tracker 

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



[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-21 Thread miss-islington


miss-islington  added the comment:


New changeset 9325f4091b66f3a9cc85681435367671d335e3e7 by Miss Islington (bot) 
in branch '3.8':
bpo-37627: Initialize IDLE Custom Run dialog with previous entries (GH-14870)
https://github.com/python/cpython/commit/9325f4091b66f3a9cc85681435367671d335e3e7


--

___
Python tracker 

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



[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14674
pull_request: https://github.com/python/cpython/pull/14893

___
Python tracker 

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



[issue37645] Replace PyEval_GetFuncName/PyEval_GetFuncDesc

2019-07-21 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
keywords: +patch
pull_requests: +14673
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14890

___
Python tracker 

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



[issue37644] Sphinx (Travis doc build) is blocking merging

2019-07-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Although the error message says line 267, the suspicious line is on 273 for the 
copies in my repository on windows.  If 267 does not work, I will revise and 
merge my overlapping PR that removes the number.  Most of the entries in 
susp-ignored.csv do not have line numbers, which seems less fragile. I don't 
think that this entry needs one either.  The prefix "This is the description of 
the" does not appear elsewhere in the file, is unlikely to, and if the sentence 
were repeated, it would likely not be an issue anyway.

--

___
Python tracker 

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



[issue37644] Sphinx (Travis doc build) is blocking merging

2019-07-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +14672
pull_request: https://github.com/python/cpython/pull/14887

___
Python tracker 

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



[issue37544] Test hang causes --enable-optimizations build to hang

2019-07-21 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

While test hangs shouldn't happen, I recommend working around such odd 
situations you are finding on your system by supplying your own modified 
PROFILE_TASK setting at make time that avoids whatever test(s) are causing you 
problems.  The linked to issue36044 contains some suggested PROFILE_TASK 
settings.

--
title: Test failures cause --enable-optimizations build to hang -> Test hang 
causes --enable-optimizations build to hang

___
Python tracker 

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



[issue37644] Sphinx (Travis doc build) is blocking merging

2019-07-21 Thread Ned Deily


Change by Ned Deily :


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

___
Python tracker 

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



[issue37644] Sphinx (Travis doc build) is blocking merging

2019-07-21 Thread miss-islington


miss-islington  added the comment:


New changeset 8f501647ca1fba32204c0c1a705e06b4e43c69b1 by Miss Islington (bot) 
in branch '3.8':
Bpo-37644: update suspicious.csv for distutils/examples (GH-14885)
https://github.com/python/cpython/commit/8f501647ca1fba32204c0c1a705e06b4e43c69b1


--
nosy: +miss-islington

___
Python tracker 

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



[issue37645] Replace PyEval_GetFuncName/PyEval_GetFuncDesc

2019-07-21 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

4. It uses the __name__ instead of the __qualname__

--

___
Python tracker 

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



[issue37644] Sphinx (Travis doc build) is blocking merging

2019-07-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14671
pull_request: https://github.com/python/cpython/pull/14886

___
Python tracker 

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



[issue37644] Sphinx (Travis doc build) is blocking merging

2019-07-21 Thread Ned Deily


Ned Deily  added the comment:


New changeset 22f0483d44b13140f6ea9927f0cf088c493e875a by Ned Deily in branch 
'master':
Bpo-37644: update suspicious.csv for distutils/examples (GH-14885)
https://github.com/python/cpython/commit/22f0483d44b13140f6ea9927f0cf088c493e875a


--
nosy: +ned.deily

___
Python tracker 

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



[issue37644] Sphinx (Travis doc build) is blocking merging

2019-07-21 Thread Ned Deily


Change by Ned Deily :


--
keywords: +patch
pull_requests: +14670
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14885

___
Python tracker 

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



[issue37645] Replace PyEval_GetFuncName/PyEval_GetFuncDesc

2019-07-21 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

PyEval_GetFuncName is bad API because

1. It hardcodes a limited number of function classes (which doesn't even 
include all function classes in the core interpreter) instead of supporting 
duck-typing.
2. In case of a "function" object, it relies on a borrowed reference to the 
function.
3. It is returning a C string instead of a Python string, so we cannot return a 
new reference even if we wanted to.

Since PyEval_GetFuncName and PyEval_GetFuncDesc are always used together, we 
might as well replace them by a single function with a proper API.

--
components: Interpreter Core
messages: 348255
nosy: jdemeyer, vstinner
priority: normal
severity: normal
status: open
title: Replace PyEval_GetFuncName/PyEval_GetFuncDesc
versions: Python 3.9

___
Python tracker 

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



[issue37641] Embeddable distribution pyc filenames show build machine location

2019-07-21 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +14669
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14884

___
Python tracker 

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



[issue37644] Sphinx (Travis doc build) is blocking merging

2019-07-21 Thread Ammar Askar


Ammar Askar  added the comment:

This particular error used to be covered here: 
https://github.com/python/cpython/blob/master/Doc/tools/susp-ignored.csv but 
looks like a line number change has broken it.

--
nosy: +ammar2

___
Python tracker 

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



[issue37644] Sphinx (Travis doc build) is blocking merging

2019-07-21 Thread Terry J. Reedy


New submission from Terry J. Reedy :

One of the required CI tests is a Travis doc build, even if a PR does not touch 
any doc file.  The following failure appears to be deterministic on master and 
3.8.  A 3.7 backport passed.  It has happened multiple times on multiple PRs 
today.  Example:
https://travis-ci.org/python/cpython/jobs/561700698
The failure is
'''
Warning, treated as error:
[distutils/examples:267] "`" found in "This is the description of the 
``foobar`` package."
'''
I have no idea why this is seen as suspicious.

I have 4 PRs blocked by this.
https://github.com/python/cpython/pull/14872
https://github.com/python/cpython/pull/14879
https://github.com/python/cpython/pull/14883
https://github.com/python/cpython/pull/14881
The last one is the 3.8 backport of a PR that passed CI maybe 12 hours ago.  
Its 3.7 backport passed and is merged.

If nothing else, can warnings not be treated as errors?

--
components: Tests
keywords: 3.8regression
messages: 348253
nosy: mdk, terry.reedy, vstinner, zach.ware
priority: critical
severity: normal
stage: needs patch
status: open
title: Sphinx (Travis doc build) is blocking merging
type: behavior
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-21 Thread miss-islington


miss-islington  added the comment:


New changeset d9086f2324264e93155dd81f4484975215e38f00 by Miss Islington (bot) 
in branch '3.7':
bpo-37627: Initialize IDLE Custom Run dialog with previous entries (GH-14870)
https://github.com/python/cpython/commit/d9086f2324264e93155dd81f4484975215e38f00


--
nosy: +miss-islington

___
Python tracker 

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



[issue1346874] httplib simply ignores CONTINUE

2019-07-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy:  -terry.reedy
versions:  -Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +14668
pull_request: https://github.com/python/cpython/pull/14883

___
Python tracker 

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



[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 35b87e6001bd991f625abe305951c77ddeb9a9c5 by Terry Jan Reedy 
(Ngalim Siregar) in branch 'master':
bpo-37627: Initialize IDLE Custom Run dialog with previous entries (#14870)
https://github.com/python/cpython/commit/35b87e6001bd991f625abe305951c77ddeb9a9c5


--

___
Python tracker 

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



[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14666
pull_request: https://github.com/python/cpython/pull/14881

___
Python tracker 

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



[issue1346874] httplib simply ignores CONTINUE

2019-07-21 Thread Tim B


Tim B  added the comment:

I've created a PR to potentially implement this in 3.9. Please take a look and 
review/test, if this issue is still relevant to you.

--
nosy: +tbartlett0

___
Python tracker 

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



[issue37627] Minor improvements to IDLE's "Run Customized"

2019-07-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14667
pull_request: https://github.com/python/cpython/pull/14882

___
Python tracker 

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



[issue1346874] httplib simply ignores CONTINUE

2019-07-21 Thread Tim B


Change by Tim B :


--
versions: +Python 3.9

___
Python tracker 

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



[issue1346874] httplib simply ignores CONTINUE

2019-07-21 Thread Tim B


Change by Tim B :


--
pull_requests: +14665
pull_request: https://github.com/python/cpython/pull/14880

___
Python tracker 

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



[issue37605] CI should not depend on gmane response

2019-07-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

gmane was down awhile yesterday, so another merge (temporarily) blocked because 
of this.  If either of you knows how to fix this, please do so.

--

___
Python tracker 

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



[issue37643] Except clause

2019-07-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

Yes, this should be discussed on python-ideas first, so I'm closing it here.

But to be honest with you, there's really no chance this would get accepted. 
It's just too easy to do it with existing list comprehension syntax, which is 
much more general purpose.

>>> [v for v in [1, 2, 3, 4, 5] if not v in [2]]
[1, 3, 4, 5]

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



[issue37544] Test failures cause --enable-optimizations build to hang

2019-07-21 Thread Ned Deily


Change by Ned Deily :


--
title: Multiple test failures during build -> Test failures cause 
--enable-optimizations build to hang

___
Python tracker 

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



[issue33467] Python 3.7: profile-opt build errors because a test seems to hang

2019-07-21 Thread Ned Deily


Ned Deily  added the comment:

Thanks for your report.  I'm sorry we haven't replied to it before now.  
Similar behavior has been more recently reported in Issue37544 and there is 
discussion going on there.  So I am going to close your issue as a duplicate of 
it; feel free to join in the discussion there.

--
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Multiple test failures during build

___
Python tracker 

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



[issue37544] Multiple test failures during build

2019-07-21 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the additional info.  I see two issues here.  One, you are building 
with OpenSSL 1.1.1, the initial release back in 2018-09.  There have been a few 
releases since then (currently at 1.1.1c) which do fix problems.  You should 
try to upgrade it.

Second, and more importantly, is that "make run_profile_task" hangs because a 
test hangs up and the tests are being run sequentially (i.e. without regrtest 
-j options meaning tests all run in one process sequentially).  These days 
nearly all our testing using -j because of the possibility of individual tests 
failures and residual effects between tests. And note that "make test", which 
runs in parallel, did complete. I see there is some discussion going on 
Issue36044 about changing the set of tests run_profile_task uses which would 
likely mitigate problems like this.  I'm CCing gps here for his views.

It also appears Issue33467 is a similar report.  I'm going to close it as a 
duplicate of this one.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue19113] duplicate test names in Lib/ctypes/test/test_functions.py

2019-07-21 Thread hai shi


hai shi  added the comment:

en, in python 3.8.0a3, I got those other error info:

$ /home/shihai/workspace/cpython/python test_functions.py

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/home/shihai/workspace/cpython/Lib/hashlib.py", line 244, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/home/shihai/workspace/cpython/Lib/hashlib.py", line 113, in 
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5

but in master branch, the test case is ok.

--
nosy: +shihai1991

___
Python tracker 

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



[issue36564] Infinite loop with short maximum line lengths in EmailPolicy

2019-07-21 Thread Ned Deily


Change by Ned Deily :


--
keywords: +security_issue
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6, Python 3.9

___
Python tracker 

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



[issue37642] timezone allows no offset from range (23:59, 24:00)

2019-07-21 Thread Ngalim Siregar


Change by Ngalim Siregar :


--
keywords: +patch
pull_requests: +14664
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14878

___
Python tracker 

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



[issue36564] Infinite loop with short maximum line lengths in EmailPolicy

2019-07-21 Thread Ned Deily


Ned Deily  added the comment:


New changeset 79a47e2b9cff6c9facdbc022a752177ab89dc533 by Ned Deily (Miss 
Islington (bot)) in branch '3.6':
Fix infinite loop in email folding logic (GH-12732) (GH-14799)
https://github.com/python/cpython/commit/79a47e2b9cff6c9facdbc022a752177ab89dc533


--
nosy: +ned.deily

___
Python tracker 

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



[issue37642] timezone allows no offset from range (23:59, 24:00)

2019-07-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue37643] Except clause

2019-07-21 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I guess you are popping 2 from the list and using except for the same. New 
syntax and semantics needs to be discussed in python-ideas mailing list. Though 
this reads like English except is used for exception based semantics. I would 
propose closing this and reopen if it's agreed by core devs in the mailing list.

--
nosy: +xtreak

___
Python tracker 

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



[issue37642] timezone allows no offset from range (23:59, 24:00)

2019-07-21 Thread Paul Ganssle


Paul Ganssle  added the comment:

I agree that the C and Python behavior should be the same, and both of them 
should allow all offsets less than 24 hours. I'm actually quite surprised we 
don't have a test for this in `datetimetester.py`.

--
stage:  -> needs patch

___
Python tracker 

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



[issue37636] Deprecate slicing and ordering operations on sys.version

2019-07-21 Thread Paul Ganssle


Paul Ganssle  added the comment:

> So is the proposed change, in a way. At some point, there will be a 4.0 
> release, which may or may not break the code in question.

I don't think it's a foregone conclusion that there will be a 4.0 release. It 
could be that we decide that a 4.0 release would be reserved for a very 
specific kind of major compatibility breakage and that we were never going to 
do that kind of breakage again.

In any case, I think one part of what Serhiy was trying to say is that we can't 
just avoid this problem by releasing 4.0 instead of 3.10, because switching to 
4.0 brings its own (not inconsiderable) host of problems. Presumably the 
symlink would be `python4` instead of `python3`, so a bunch of shebangs, 
documentation and guides would need to be updated.

Basically, unless something changes, a bunch of stuff is going to break in the 
release after 3.9 no matter what we do. It's probably a good idea to try to 
mitigate the problems of *both* versioning approaches, to give us maximum 
freedom in our choice of versioning scheme int he future.

--
nosy: +p-ganssle

___
Python tracker 

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



[issue37636] Deprecate slicing and ordering operations on sys.version

2019-07-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think it is better to left this on third-party linters.

* It is easy to catch patterns like `sys.version_info[0] == 3` or 
`sys.version[:3]` in the linter than in the Python compiler or interpreter. 
Linters are designed for this.

* Not always slicing sys.version is an error. For example, 
`sys.version[:sys.version.index(' ')]` is a valid code. Linters have options 
which allow to ignore some kind of warnings or warnings at the particular line.

* Users that ignore linters usually do not check the version. They wrote their 
scripts for the default system Python and update them when they become broken 
after system upgrade.

--

___
Python tracker 

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



[issue30550] Document order-preserving dictionary output in json

2019-07-21 Thread Eric O. LEBIGOT


Eric O. LEBIGOT  added the comment:

The essence of the original post is simply to document any order-preserving 
properties of the Python to JSON and JSON to Python transformation for 
mappings. This way users can rely on it. This is for instance useful if a 
program modifies JSON created by a user and wants to preserve the user ordering.

--

___
Python tracker 

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



[issue37643] Except clause

2019-07-21 Thread Артур Григорьев

New submission from Артур Григорьев :

Is is possible to add to Python the following syntax (keyword 'except'):
[1, 2, 3, 4, 5] except [2]
>>> [1, 3, 4, 5]

--
messages: 348238
nosy: Артур Григорьев
priority: normal
severity: normal
status: open
title: Except clause
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue37642] timezone allows no offset from range (23:59, 24:00)

2019-07-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +belopolsky, p-ganssle

___
Python tracker 

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



[issue37642] timezone allows no offset from range (23:59, 24:00)

2019-07-21 Thread Jörn Heissler

New submission from Jörn Heissler :

https://bugs.python.org/issue5288 changed datetime.timezone to accept 
sub-minute offsets.

The C implementation allows offsets from range (23:59, 24:00) while the python 
implementation does not:

# C
>>> timezone(timedelta(seconds=86399))
datetime.timezone(datetime.timedelta(seconds=86399))

# Python
>>> timezone(timedelta(seconds=86399))
Traceback (most recent call last):
  File "", line 1, in 
  File "cpython/Lib/datetime.py", line 2194, in __new__
raise ValueError("offset must be a timedelta "
ValueError: offset must be a timedelta strictly between -timedelta(hours=24) 
and timedelta(hours=24).

This is because _maxoffset is defined as timedelta(hours=23, minutes=59)

Second issue: The (undocumented) "min" and "max" attributes (both C and python) 
show 23:59
even though the C implementation can get closer to 24:00.
Should this be changed to timezone(timedelta(seconds=86399, 
microseconds=99))?


(Same applies to the minimums)

--
components: Library (Lib)
messages: 348237
nosy: joernheissler
priority: normal
severity: normal
status: open
title: timezone allows no offset from range (23:59, 24:00)
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37636] Deprecate slicing and ordering operations on sys.version

2019-07-21 Thread Stefan Behnel


Stefan Behnel  added the comment:

> Changing the major version number itself is a breaking change

So is the proposed change, in a way. At some point, there will be a 4.0 
release, which may or may not break the code in question. So, testing for 
"version_info[0] == 3" is already wrong, because that code almost certainly 
wants to know if it runs in Py2 and not if it runs in Py3. It's better fixed 
soon, before we get too close to Py4, and I think a deprecation notice could be 
helpful for that. Preferably for as many of the non-future-proof spellings as 
possible.

--
nosy: +scoder

___
Python tracker 

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



[issue37641] Embeddable distribution pyc filenames show build machine location

2019-07-21 Thread Bill Collins


New submission from Bill Collins :

pyc files within the embeddable zip are compiled with their filename as the 
temporary directory in which they are compiled. Thus, stack traces will appear 
as (e.g.) D:\obj\windows-release\37win32_Release\msi_python\zip_win32\image.py, 
which is a little surprising and not obvious that it's actually from 
email/mime/image.py.

We currently work around this by updating the pyc files before shipping to be 
relative paths to Lib/; however, fixing this upstream would appear to be as 
simple as passing through the dest from _write_to_zip to _py_temp_compile 
(https://github.com/python/cpython/blob/21a92f8cda525d25a165b773fbe1bfffd303a000/PC/layout/main.py#L302)
 to be passed into _compile_one_py

--
components: Build, Installation, Windows
messages: 348235
nosy: Bill Collins, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Embeddable distribution pyc filenames show build machine location
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-21 Thread Sebastian Bank


Change by Sebastian Bank :


--
nosy: +xflr6

___
Python tracker 

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



[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

2019-07-21 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

FWIW I like Serhiy's approach more. I have never seen a single metaclass 
overriding type.__call__, while overriding type.__new__ is a common practice.

--

___
Python tracker 

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



[issue37640] telnetlib crash in Python3 while receiving un-printable characters from server

2019-07-21 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +14663
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14877

___
Python tracker 

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



[issue37640] telnetlib crash in Python3 while receiving un-printable characters from server

2019-07-21 Thread hoang nguyen


New submission from hoang nguyen :

```
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.7/site-packages/Pwn/Pwn.py", line 209, in io
self.con.interact()
  File 
"/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/telnetlib.py",
 line 553, in interact
sys.stdout.write(text.decode('ascii'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 41: 
ordinal not in range(128)
```
crash detail

set up a netcat server:
```
cat /dev/urandom | nc -l 127.0.0.1 
```

test.py
```
import telnetlib

tn = telnetlib.Telnet('127.0.0.1', )
tn.interact()
```

--
components: Library (Lib)
files: test.py
messages: 348233
nosy: hoang nguyen
priority: normal
severity: normal
status: open
title: telnetlib crash in Python3 while receiving un-printable characters from 
server
type: crash
versions: Python 3.6
Added file: https://bugs.python.org/file48494/test.py

___
Python tracker 

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



[issue30550] Document order-preserving dictionary output in json

2019-07-21 Thread Inada Naoki


Inada Naoki  added the comment:

OrderedDict is not recommended to preserve order any more.

Note that mention about `object_pairs_hook=OrderedDict` is removed 
intentionally.
https://github.com/python/cpython/pull/5001

Please forget about OrderedDict unless you need additional feature OrderedDict 
provides.  It is far inefficient than regular dict.

--
nosy: +inada.naoki

___
Python tracker 

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



[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2019-07-21 Thread Emanuel Zephir


Emanuel Zephir  added the comment:

I believe this to be a bug in the standard library instead of solely being the 
result of an application error.

When a Popen instance is finalized by the garbage collector, the internal 
handle is also finalized and closed despite the instance being put on the 
active list. This results in _cleanup throwing because the handle can no longer 
be used.

I've attached a small reproduction.

--
nosy: +emanuel
Added file: https://bugs.python.org/file48493/invalid_handle.py

___
Python tracker 

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



[issue36324] Inverse cumulative normal distribution function

2019-07-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset c613c3319ed9bdc8cd74c730ad946169c0776c8a by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.8':
bpo-36324: Make internal attributes for statistics.NormalDist() private. 
(GH-14871) (GH-14875)
https://github.com/python/cpython/commit/c613c3319ed9bdc8cd74c730ad946169c0776c8a


--

___
Python tracker 

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



[issue34224] python 3.7 inside venv tries to write back to read-only installation directory (Grammar3.7.0.final.0.pickle)

2019-07-21 Thread Andreas Jung


Andreas Jung  added the comment:

This issue is still true for 3.8.0b1, Ubuntu 19.04, umask is 0077, Python 3.8 
is installed using "sudo make install".

!bin/python
bin/python setup.py develop
running develop
running egg_info
writing fs.webdavfs.egg-info/PKG-INFO
writing dependency_links to fs.webdavfs.egg-info/dependency_links.txt
writing entry points to fs.webdavfs.egg-info/entry_points.txt
writing requirements to fs.webdavfs.egg-info/requires.txt
writing top-level names to fs.webdavfs.egg-info/top_level.txt
error: [Errno 13] Permission denied: 
'/opt/python-3.8.0b1/lib/python3.8/lib2to3/Grammar3.8.0.beta.1.pickle'


So "python3 -m venv" should setup a virtualenv properly without the need 
writing anything to the Python installation directory. Or it is up to "make 
install" to generate the related files properly during installation.

--

___
Python tracker 

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



[issue36324] Inverse cumulative normal distribution function

2019-07-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 02c91f59b6f6e720a9e89635e00c55bcf7f932a8 by Raymond Hettinger in 
branch 'master':
bpo-36324: Make internal attributes for statistics.NormalDist() private. 
(GH-14871)
https://github.com/python/cpython/commit/02c91f59b6f6e720a9e89635e00c55bcf7f932a8


--

___
Python tracker 

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



[issue36324] Inverse cumulative normal distribution function

2019-07-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14662
pull_request: https://github.com/python/cpython/pull/14875

___
Python tracker 

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



[issue30550] Document order-preserving dictionary output in json

2019-07-21 Thread Kyle Stanley


Kyle Stanley  added the comment:

>Thus, if a user gives an OrderedDict (or a dict with a known order, in Python 
>3.7+), it is useful that >he know that the order of its elements will not be 
>changed upon transformation into JSON.

I would agree that it could be helpful to document that if a user passes an 
OrderedDict, the order of the elements will not changed, I was just pointing 
out that a default dictionary implementation would not normally retain the 
order. 

However, after looking through the 3.7 changes and reading the discussions, it 
looks like dictionaries retaining insertion order was decided to be made an 
official part of the language. If the order matters though, it would make sense 
to recommend users to use OrderedDict. The order in the default dictionary 
implementation can end up becoming sorted if pprint is used.

Discussions: 
https://mail.python.org/pipermail/python-dev/2017-December/151283.html and 
https://mail.python.org/pipermail/python-dev/2017-December/151376.html

--

___
Python tracker 

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



[issue37639] What happened to StreamReaderProtocol?

2019-07-21 Thread Aymeric Augustin


New submission from Aymeric Augustin :

`StreamReaderProtocol` was a public API from Python 3.4 to 3.6:

- 
https://docs.python.org/3.4/library/asyncio-stream.html?highlight=streamreaderprotocol#streamreaderprotocol
- 
https://docs.python.org/3.5/library/asyncio-stream.html?highlight=streamreaderprotocol#streamreaderprotocol
- 
https://docs.python.org/3.6/library/asyncio-stream.html?highlight=streamreaderprotocol#streamreaderprotocol

In Python 3.7, it vanished from the documentation. I couldn't find which commit 
made that change and why.

- 
https://docs.python.org/3.7/search.html?q=streamreaderprotocol_keywords=yes=default

Apparently it's deprecated in Python 3.8 as a side effect of 
https://bugs.python.org/issue36889.

Unfortunately, that ticket says nothing about `StreamReaderProtocol` and how to 
replace it. The documentation added when fixing that ticket doesn't say 
anything about `StreamReaderProtocol` either.

It would be less difficult to swallow the rate of API churn in asyncio if there 
were at least a few words about why it's happening and what concrete benefits 
it brings to users.

I can understand the need to change APIs, even public APIs. However, when 
there's zero information in tickets, commit messages and documentations, I 
don't know why change is happening and how I'm supposed to adapt my code. 
That's stressful. If what I'm doing is deprecated, probably it's a bad idea, 
but I can't know why?

I'm sure you aren't trying to convince me to avoid stream utilities in asyncio 
and write my own buffering. However, that's the result you're getting :-/ 
Providing a quick explanation of deprecations / removals of public APIs would 
help.

(Somewhat related: https://bugs.python.org/issue24885)

--
components: asyncio
messages: 348226
nosy: asvetlov, aymeric.augustin, yselivanov
priority: normal
severity: normal
status: open
title: What happened to StreamReaderProtocol?
versions: Python 3.8

___
Python tracker 

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