[issue33475] Fix converting AST expression to string and optimize parenthesis

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

There are still problems with f-strings like f'''{"'"}''' => f'{"\'"}' 
(SyntaxError: f-string expression part cannot include a backslash). But this is 
a separate hard issue (issue33552).

--

___
Python tracker 

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



[issue33552] f-strings and string annotations

2018-05-17 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

There are problems with converting annotations containing f-strings into 
strings (from __future__ import annotations). For example f'''{"'"}''' is 
converted to f'{"\'"}', but the latter is a syntax error.

>>> from __future__ import annotations
>>> x: f'''{"'"}'''
>>> print(__annotations__['x'])
f'{"\'"}'
>>> x: f'{"\'"}'
  File "", line 1
SyntaxError: f-string expression part cannot include a backslash

More complex examples:

f"""{"'''"}"""
f"""{"'" '"'}"""
f"""{"'''"}""" f'''{'"""'}'''

--
components: Interpreter Core
messages: 316886
nosy: eric.smith, lukasz.langa, serhiy.storchaka
priority: normal
severity: normal
status: open
title: f-strings and string annotations
type: behavior
versions: 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



[issue33513] incorrect detection of information of some distributions python2

2018-05-17 Thread STINNER Victor

STINNER Victor  added the comment:

Oh wow. That looks more like a new feature than a bugfix or short cleanup. I'm 
not sure that it's ok to do it in Python 2.

platform.linux_distribution() is deprecated since Python 3.5 and just has been 
removed from Python 3.8: see bpo-28167.

I suggest to close this issue as WONTFIX, sorry.

--
nosy: +vstinner

___
Python tracker 

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



[issue28167] remove platform.linux_distribution()

2018-05-17 Thread STINNER Victor

STINNER Victor  added the comment:

Can you please have a look at bpo-33513 which is for Python 2.7: "incorrect 
detection of information of some distributions python2"?

--

___
Python tracker 

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



[issue33551] The string prefixes u and f can't used together

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The string prefix u is used exclusively for compatibility with Python 2. It 
helps writing code that works in Python 2 and Python 3. The string prefix f is 
not compatible with Python 2. If you use it, you no longer have reasons for 
using the string prefix u.

--
nosy: +serhiy.storchaka
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



[issue33513] incorrect detection of information of some distributions python2

2018-05-17 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> wont fix
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



[issue33507] Improving the html rendered by cgitb.html

2018-05-17 Thread STINNER Victor

STINNER Victor  added the comment:

It's difficult to discuss colors, maybe because I'm partially colorblind :-), 
each people has different taste.

Instead of hardcoding colors, would it be better to use CSS instead.

--
nosy: +vstinner

___
Python tracker 

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



[issue33553] possible documentation improvement proposal for multiprocessing

2018-05-17 Thread Derek Kim

New submission from Derek Kim :

>>> from multiprocessing import Pool
>>> p = Pool(5)
>>> def f(x):
... return x*x
...
>>> p.map(f, [1,2,3])

This example in the document is confusing because this is already wrong code 
when run with fork method even if you run it as a script. With fork start 
method, f should be defined before p is created.

Also, just advising that one shouldn't use interactive shell and should run 
multiprocessing code in if __name__ == '__main__' is not informative becuase 
those conditions are generally no problem with fork method.

Can I try improving the documentation?

--
assignee: docs@python
components: Documentation
messages: 316892
nosy: Derek Kim, docs@python
priority: normal
severity: normal
status: open
title: possible documentation improvement proposal for multiprocessing
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



[issue33553] Documentation improvement proposal for multiprocessing

2018-05-17 Thread Derek Kim

Change by Derek Kim :


--
title: possible documentation improvement proposal for multiprocessing -> 
Documentation improvement proposal for multiprocessing

___
Python tracker 

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



[issue33553] Documentation improvement proposal for multiprocessing

2018-05-17 Thread Derek Kim

Derek Kim  added the comment:

https://docs.python.org/3.8/library/multiprocessing.html#multiprocessing-programming

here is the link to the document.

--

___
Python tracker 

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



[issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X

2018-05-17 Thread Ned Deily

Ned Deily  added the comment:


New changeset d504108a88bd14a560dec875df682f4e581490e5 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-13631: Fix the order of initialization for readline libedit on macOS. 
(GH-6915) (GH-6928)
https://github.com/python/cpython/commit/d504108a88bd14a560dec875df682f4e581490e5


--

___
Python tracker 

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



[issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X

2018-05-17 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the patch and PR, Zvezdan!  Merged for 3.7.0 and 3.8.0.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue33518] Add PEP to glossary

2018-05-17 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset d5f144260886959c1fe06bc4506a23fd10f92348 by Victor Stinner 
(Andrés Delfino) in branch 'master':
bpo-33518: Add PEP entry to documentation glossary (GH-6860)
https://github.com/python/cpython/commit/d5f144260886959c1fe06bc4506a23fd10f92348


--
nosy: +vstinner

___
Python tracker 

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



[issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword.

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset f90f5d5c1d95721e0ca0b1c302e3d13ed34753a8 by Serhiy Storchaka 
(Matthias Bussonnier) in branch 'master':
bpo-33549: Remove shim and deprecation warning to access DocumentLS.async. 
(GH-6924)
https://github.com/python/cpython/commit/f90f5d5c1d95721e0ca0b1c302e3d13ed34753a8


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword.

2018-05-17 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6600

___
Python tracker 

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



[issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword.

2018-05-17 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
components: +Library (Lib), XML
versions: +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



[issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored

2018-05-17 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.5

___
Python tracker 

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



[issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword.

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 216a27766fab59f4dfecfae0c453f7f3fd478989 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-33549: Remove shim and deprecation warning to access DocumentLS.async. 
(GH-6924) (GH-6929)
https://github.com/python/cpython/commit/216a27766fab59f4dfecfae0c453f7f3fd478989


--

___
Python tracker 

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



[issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword.

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you Matthias!

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-17 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests:  -1013

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Nick, should  a DeprecationWarning be replaced with a RuntimeWarning or a 
RuntimeError? There are contradictions about this in comments and the 
documentation.

--

___
Python tracker 

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



[issue33554] Optimize PyDictObject

2018-05-17 Thread b@n

New submission from b@n :

make_keys_shared reusing oldkeys memory

--
components: Interpreter Core
messages: 316901
nosy: b@n
priority: normal
severity: normal
status: open
title: Optimize PyDictObject
type: enhancement
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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-17 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6601

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

PR 6931 replaces a DeprecationWarning with a RuntimeError (is it correct?). It 
was planned to do in 3.7, but it is too later for 3.7.

--
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open
versions: +Python 3.8 -Python 3.6, Python 3.7

___
Python tracker 

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



[issue33554] Optimize PyDictObject

2018-05-17 Thread Roundup Robot

Change by Roundup Robot :


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

___
Python tracker 

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



[issue33554] Optimize PyDictObject

2018-05-17 Thread INADA Naoki

INADA Naoki  added the comment:

Could you show some micro benchmark shows performance benefit?

--
nosy: +inada.naoki

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-17 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6603

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

An alternate PR 6933 replaces it with a RuntimeWarning.

--

___
Python tracker 

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



[issue33501] split existing optimization levels into granular options

2018-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

PSF link for Diana Clark's thread on python-ideas about this: 
https://mail.python.org/pipermail/python-ideas/2017-September/047224.html (this 
is the same thread Brett linked, just to the PSF archives rather than Google 
Groups)

--

___
Python tracker 

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



[issue33554] Optimize PyDictObject

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Are you aware of causes that prevented writing the code in this way? This will 
break OrderedDict. Issue31954 is an attempt to solve this problem (and it 
supersedes this issue).

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33388] Support PEP 566 metadata in dist.py

2018-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

If these warnings are being emitted when using setuptools, that's a bug in 
setuptools (as it should be ensuring these are handled without warnings), and 
can be reported over on https://github.com/pypa/setuptools/

If these warnings are being emitted when using plain distutils, that's OK, 
since it genuinely doesn't support them (and folks should be using setuptools 
instead).

Longer term, we want to get setuptools to the point of being independent of the 
standard library's copy of distutils: 
https://github.com/pypa/packaging-problems/issues/127

Once that's the case, then we'll look at the exact mechanics of how we can stop 
shipping distutils by default in the standard library (and instead require 
folks to install setuptools in order to get it).

--

___
Python tracker 

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



[issue33501] split existing optimization levels into granular options

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Isn't this a duplicate of the old issue2506?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33554] Optimize PyDictObject

2018-05-17 Thread b@n

b@n  added the comment:

Will not break OrderedDict, The order is still the same.

--

___
Python tracker 

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



[issue31973] Incomplete DeprecationWarning for async/await keywords

2018-05-17 Thread Sorin Sbarnea

Sorin Sbarnea  added the comment:

I agree that this deprecation approach is not very helpful because it does not 
indicate a recommended way to fix.

Yep, we all know that we will be forced to rename these parameters/variables 
everywhere and likely break few APIs due to it.

I am curious if there is any emerging pattern for new naming as I find really 
annoying if every python project using these keywords would endup picking 
different alternatives for their rename.

--
nosy: +sorin

___
Python tracker 

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



[issue33554] Optimize PyDictObject

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Ah, I didn't notice that this affects only dicts with shared keys! Well, this 
is not related to the issue with OrderedDict which can't have shared keys.

Still we need evidences of the performance benefit. The PR adds >40 lines of 
code and the benefit should be large enough to compensate the maintaining 
complexity and possible performance regressions in other parts of the code.

--

___
Python tracker 

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



[issue33555] No SyntaxError raised for `return` with argument inside generator

2018-05-17 Thread FHTMitchell

New submission from FHTMitchell :

In python 2.7 if you run the following code you get an error (as you would 
expect)

Python 2.7.14 | packaged by conda-forge | (default, Dec 25 2017, 01:17:32) [MSC 
v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

>>> def f():
... yield 1
... return 2
...
  File "", line 3
SyntaxError: 'return' with argument inside generator

However, in python 3.6 the error is silently ignored

Python 3.6.4 | packaged by conda-forge | (default, Dec 24 2017, 10:11:43) [MSC 
v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> def f():
... yield 1
... return 2
...
>>> for i in f():
... print(i)
...
1

and still is in 3.7

Python 3.7.0b2 (v3.7.0b2:b0ef5c979b, Feb 28 2018, 02:24:20) [MSC v.1912 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> def f():
... yield 1
... return 2
...
>>> for i in f():
... print(i)
...
1

This is a source of confusion
 
https://stackoverflow.com/questions/47831240/why-is-no-value-returned-from-my-generator/
 
especially since the PEP says it is disallowed:

 
https://www.python.org/dev/peps/pep-0255/#then-why-not-allow-an-expression-on-return-too

--
components: Interpreter Core
messages: 316912
nosy: FHTMitchell
priority: normal
severity: normal
status: open
title: No SyntaxError raised for `return` with argument inside generator
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue33555] No SyntaxError raised for `return` with argument inside generator

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It is not silently ignored. It is used as an argument to construct 
StopIteration. See The Python Language Reference:

https://docs.python.org/3/reference/simple_stmts.html#the-return-statement

--
nosy: +serhiy.storchaka
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



[issue13474] Mention of "-m" Flag Missing From Doc on Execution Model

2018-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

I've assigned the PR and issue to myself, as the proposed addition in the PR 
isn't quite right, but it isn't immediately obvious why not.

The gist of the problem is that the current docs are actually correct and 
complete: modules are the first thing listed as being code blocks, and whether 
you import them or execute them as __main__ doesn't change that.

However, I can also see why 2011-Eric thought it looked incomplete, so I'm 
thinking it may make sense to restructure that entire paragraph as a bulleted 
list, where it would be possible to mention both imported modules and modules 
executed as main, without giving the impression that those are inherently 
different things.

--
assignee: docs@python -> ncoghlan

___
Python tracker 

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



[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2018-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

The behaviour I'd expect to see:

"module:qual.name" -> "imports module, accesses module.qual.name"
"module.qual.name" -> "no implicit import, accesses module.qual.name"
"package.submodule:qual.name" -> "imports package.submodule, accesses 
package.submodule.qual.name"
"package.submodule.qual.name" -> "no implicit import, accesses 
package.submodule.qual.name"

So if you have ":" in the capsule path, you're requesting that the interpreter 
execute an import with the path up to that point before attempting to resolve 
the full name reference.

By contrast, if you omit the ":", you're telling the interpreter that you'll 
take care of ensuring that any required imports have taken place before 
attempting to resolve the capsule reference.

--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue33547] Relative imports do not replace local variables

2018-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

As David notes, the issue in the example is the fact that you're setting 
"__main__.a", so "a.py" never gets imported as a module - it gets a hit on the 
parent module attribute, and hence stops there.

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



[issue33518] Add PEP to glossary

2018-05-17 Thread Andrés Delfino

Change by Andrés Delfino :


--
pull_requests: +6604

___
Python tracker 

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



[issue33518] Add PEP to glossary

2018-05-17 Thread Andrés Delfino

Change by Andrés Delfino :


--
pull_requests: +6605

___
Python tracker 

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



[issue33499] Environment variable to set alternate location for pycache tree

2018-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

Regarding environment variables, note that they get used in two *very* 
different ways:

1. The "persistent shell setting" case that Raymond describes. While setting 
PYTHONBYTECODEPATH to always point to a RAM disk could make quite a bit of 
sense for some developers, it's more likely that this case would be associated 
with tools like `pipenv shell`.

2. The "inheritable process setting" case, where you prepend the environment 
variable setting to a shell command, or add it to the env dict in a Python 
subprocess call.

Anywhere that I used this setting, I'd want it to be passed along to child 
processes, so an environment variable would be a lot more useful than a command 
line option.

If we did add an option, then a named -X option would probably make the most 
sense.

Regarding the state caching: having this be read once at startup would help 
avoid a lot of potential for weird state inconsistencies where some modules 
were loaded from one cache directory, while later modules were loaded from a 
different one.

--

___
Python tracker 

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



[issue33555] No SyntaxError raised for `return` with argument inside generator

2018-05-17 Thread FHTMitchell

FHTMitchell  added the comment:

Apologies if I wasn't clear. I understand that

def f():
yield 1
return

is valid python. What I'm saying, if you follow the link, is that

def f():
yield 1
return 2  # not the argument

should not be considered valid python according to PEP 255. This is implemented 
in python 2 but not in python 3.

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

___
Python tracker 

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



[issue33555] No SyntaxError raised for `return` with argument inside generator

2018-05-17 Thread FHTMitchell

FHTMitchell  added the comment:

Whoops I understand. Reclosed.

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

___
Python tracker 

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



[issue33341] python3 fails to build if directory or sysroot contains "*icc*" string

2018-05-17 Thread Martin Panter

Martin Panter  added the comment:

Maybe this is the same as Issue 28584, about the ${CC} variable rather than 
“sysroot”. In any case, the patch looks unrelated.

--
nosy: +martin.panter

___
Python tracker 

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



[issue33257] Race conditions in Tkinter with non-threaded Tcl

2018-05-17 Thread Ivan Pozdeev

Ivan Pozdeev  added the comment:

2nd fix ready.

@devteam The issue is fixed completely now, the fix can be merged.
Pushed to the same PR, see 
https://github.com/python/cpython/pull/6444#issuecomment-389844872 why.


Used the option "Hold the Tcl lock for the entire duration of a PythonCmd. To 
allow "downstream" calls, make the Tcl lock reentrant." from 
https://bugs.python.org/issue33257#msg316087 as it's the cleanest fix.

@Scott M, you can help here by doing a code review.

--

___
Python tracker 

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



[issue33462] reversible dict

2018-05-17 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Serhiy Storchaka, I will update the PR to implement this functionality in 
the views too

--

___
Python tracker 

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



[issue33518] Add PEP to glossary

2018-05-17 Thread Andrés Delfino

Change by Andrés Delfino :


--
pull_requests: +6606

___
Python tracker 

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



[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This change would break virtually all existing usages of PyCapsule_Import(). 
And it would look very surprising taking into account the name of this function.

Currently "package.submodule.qual.name" imports package and accesses 
package.submodule.qual.name. You are out of luck if package.submodule was not 
imported before or if importing package doesn't import package.submodule.

--

___
Python tracker 

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



[issue33522] Enable CI builds on Visual Studio Team Services

2018-05-17 Thread Steve Dower

Steve Dower  added the comment:


New changeset 8965d75c90e80b6983b36f3ae9601d6a257d782b by Steve Dower (Miss 
Islington (bot)) in branch '3.7':
bpo-33522: Enable CI builds on Visual Studio Team Services (GH-6865) (GH-6926)
https://github.com/python/cpython/commit/8965d75c90e80b6983b36f3ae9601d6a257d782b


--

___
Python tracker 

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



[issue33499] Environment variable to set alternate location for pycache tree

2018-05-17 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On May 17, 2018, at 08:14, Nick Coghlan  wrote:
> 
> If we did add an option, then a named -X option would probably make the most 
> sense.

+1

--

___
Python tracker 

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



[issue33501] split existing optimization levels into granular options

2018-05-17 Thread Brett Cannon

Brett Cannon  added the comment:

I don't thnk they are quite the same. The other issue is about turning off the 
peepholer entirely while this one is about breaking up the optimizations that 
-O and -OO do so you can choose which ones you want (e.g. still drop docstrings 
but keep asserts).

--

___
Python tracker 

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



[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-05-17 Thread Eric Snow

Change by Eric Snow :


--
pull_requests: +6607

___
Python tracker 

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



[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2018-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

Ah, sorry, I misinterpreted Petr's comment, and then didn't look at the details 
of your PR before commenting.

Having fixed that mistake, I agree that making the naive approach "just work" 
is a good option.

--

___
Python tracker 

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



[issue2506] Add mechanism to disable optimizations

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

> If anyone has needed a workaround in the past 9 years and hasn't yet found 
> one:

This no longer works in 3.7 due to folding constants at the AST level. :-)

--
nosy: +serhiy.storchaka
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



[issue33522] Enable CI builds on Visual Studio Team Services

2018-05-17 Thread Steve Dower

Steve Dower  added the comment:


New changeset 0d8f83f59c8f4cc7fe125434ca4ecdcac111810f by Steve Dower in branch 
'3.6':
bpo-33522: Enable CI builds on Visual Studio Team Services (GH-6865) (GH-6925)
https://github.com/python/cpython/commit/0d8f83f59c8f4cc7fe125434ca4ecdcac111810f


--

___
Python tracker 

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



[issue2506] Add mechanism to disable optimizations

2018-05-17 Thread Ned Batchelder

Ned Batchelder  added the comment:

Folding constants won't affect control flow.  The important thing here is to 
disable optimizing away jumps to jumps.

--

___
Python tracker 

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



[issue33556] leftover thread crumb in threading.ident docstring

2018-05-17 Thread Skip Montanaro

New submission from Skip Montanaro :

There is a leftover reference to "thread.get_ident" in the docstring for 
threading.ident. I believe it needs a leading underscore.

Hopefully a PR isn't required for this. I'm not equipped to generate one at the 
moment, and this seems like a pretty trivial/obvious fix.

--
components: Library (Lib)
keywords: easy
messages: 316931
nosy: skip.montanaro
priority: normal
severity: normal
stage: needs patch
status: open
title: leftover thread crumb in threading.ident docstring
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



[issue31656] Bitwise operations for bytes-type

2018-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

Issue 19251 is still under consideration, so marking this as a duplicate, 
rather than as rejected.

--
nosy: +ncoghlan
resolution: rejected -> duplicate
superseder:  -> bitwise ops for bytes of equal length

___
Python tracker 

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



[issue33538] Remove useless check in subprocess

2018-05-17 Thread TaoQingyun

TaoQingyun <845767...@qq.com> added the comment:

I can't find the reset code, could you give me a link? Thanks.

--

___
Python tracker 

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



[issue33556] leftover thread crumb in threading.ident docstring

2018-05-17 Thread Zachary Ware

Zachary Ware  added the comment:

Rather than a leading underscore, I think `thread.` should just be removed.  
`get_ident` is now exposed by the threading module itself.

For a change this small, 
https://github.com/python/cpython/edit/master/Lib/threading.py can be used to 
create it, but every change requires a PR :)

--
nosy: +zach.ware

___
Python tracker 

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



[issue2506] Add mechanism to disable optimizations

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Few different optimizations work together here. Folding constants at the AST 
level allows to eliminate the constant expression statement in the code 
generation stage. This makes 'continue' a first statement in the 'if' body. 
Boolean expressions optimizations (performed in the code generation stage now) 
creates a conditional jump to the start of the 'if' body (which is 'continue' 
now). If 'continue' is not nested in 'try' or 'with' blocks, it is compiled to 
an unconditional jump. And finally the jump optimization in the peepholer 
retargets the conditional jump from the unconditional jump to the start of the 
loop.

--

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2018-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

I'm back in the embedded software world now, and hence working with the 
combination of:

- low level serial formats (including fixed length CAN packets)
- C firmware developers that are quite capable of writing supporting 
C-in-Python code using the standard library, but aren't the least bit 
interested in graduating from writing standalone stdlib-only Python scripts 
that live in repositories otherwise full of C code to writing full Python 
applications with PyPI backed dependency management (etc)

It's the kind of environment where having the struct module in the standard 
library is incredibly valuable, and the main things that better support for 
direct manipulation of binary data could potentially offer us is avoiding some 
"memory -> struct.unpack -> process -> struct.pack -> memory" round trips, as 
well as potentially reducing the overall amount of code we have to maintain.

So I'll keep an eye out for potential opportunities for code simplification - 
while crypto algorithms, file formats, network protocols, and hardware 
interfaces can all call for this kind of thing, I'm less sure how often we're 
encountering it in situations where having it available would have let us avoid 
invoking struct entirely.

--
nosy: +ncoghlan
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue33538] Remove useless check in subprocess

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It is in PyImport_Cleanup() in Python/import.c. Search 
PyObject_SetItem(modules, name, Py_None).

If you will run Python with the -v option you will see numerous messages "# 
cleanup[2] removing ..." emitted on stderr.

--

___
Python tracker 

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



[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-05-17 Thread Eric Snow

Eric Snow  added the comment:


New changeset 3ab0136ac5d6059ce96d4debca89c5f5ab0356f5 by Eric Snow in branch 
'master':
bpo-32604: Implement force-closing channels. (gh-6937)
https://github.com/python/cpython/commit/3ab0136ac5d6059ce96d4debca89c5f5ab0356f5


--

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2018-05-17 Thread Марк Коренберг

Марк Коренберг  added the comment:

@ncoghlan

Could you please create Pull-request on Github ?

--

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2018-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

This issue isn't at the stage where a PR would help - the core question is 
still "Should we add better native support for multi-byte bitwise operations?", 
not the specifics of what they API might look like or how we would implement it.

--
stage: needs patch -> 

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2018-05-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Nick, for your tasks you may be interested in PEP 3118 which still is not 
completely implemented (issue3132).

--

___
Python tracker 

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



[issue33051] IDLE: Create new tab for editor options in configdialog

2018-05-17 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Yes, I thought it would be good to have this before issue33046.

--

___
Python tracker 

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



[issue33516] unittest.mock: Add __round__ to supported magicmock methods

2018-05-17 Thread John Reese

Change by John Reese :


--
nosy: +jreese, lukasz.langa

___
Python tracker 

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



[issue19950] Document that unittest.TestCase.__init__ is called once per test

2018-05-17 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6609

___
Python tracker 

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



[issue19950] Document that unittest.TestCase.__init__ is called once per test

2018-05-17 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset dff46758f267ad6c13096c69c4e1dee17f9969aa by Gregory P. Smith in 
branch 'master':
bpo-19950: Clarify unittest TestCase instance use. (GH-6875)
https://github.com/python/cpython/commit/dff46758f267ad6c13096c69c4e1dee17f9969aa


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



[issue19950] Document that unittest.TestCase.__init__ is called once per test

2018-05-17 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6608

___
Python tracker 

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



[issue28584] ICC compiler check is too permissive

2018-05-17 Thread Gianfranco

Gianfranco  added the comment:

I'm attaching the patch that works also for parameters, e.g. when CC contains 
--sysroot=/home/icc or similar.
we can mark https://bugs.python.org/issue33341 duplicate to this one I think

--
nosy: +locutusofborg
versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6, Python 3.7
Added file: https://bugs.python.org/file47595/icc-find.patch

___
Python tracker 

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



[issue33341] python3 fails to build if directory or sysroot contains "*icc*" string

2018-05-17 Thread Gianfranco

Gianfranco  added the comment:

This was the patch I wanted to add, but I picked up a wrong one (a vbox one)

In any case, duplicate of issue28584

--
keywords: +patch
resolution:  -> duplicate
Added file: https://bugs.python.org/file47596/icc-find.patch

___
Python tracker 

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



[issue28584] ICC compiler check is too permissive

2018-05-17 Thread Gianfranco

Gianfranco  added the comment:

My first attempt was instead of
*gcc*
to just check for
*gcc

this avoids when "icc" is the last part of the string, I admit this is not too 
strong.
Another approach is to use basename with cut -d " " -f 1 to pick just the first 
parameter, but maybe the best way is to do something like this:
gcc|*/gcc|*-gcc

I confirm the "icc-find-v2.patch" works in this way

--
Added file: https://bugs.python.org/file47597/icc-find-v2.patch

___
Python tracker 

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



[issue33051] IDLE: Create new tab for editor options in configdialog

2018-05-17 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

A new option would (maybe) apply to saving the shell also.  (Something to 
discuss there.)

--

___
Python tracker 

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



[issue33341] python3 fails to build if directory or sysroot contains "*icc*" string

2018-05-17 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
stage: patch review -> resolved
status: open -> closed
superseder:  -> ICC compiler check is too permissive

___
Python tracker 

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



[issue33341] python3 fails to build if directory or sysroot contains "*icc*" string

2018-05-17 Thread Terry J. Reedy

Change by Terry J. Reedy :


Removed file: https://bugs.python.org/file47547/patch

___
Python tracker 

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



[issue33341] python3 fails to build if directory or sysroot contains "*icc*" string

2018-05-17 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

icc-find.patch (and a 2nd version) has been uploaded to #28584 also. I unlinked 
the erroneous upload 'patch'.

--

___
Python tracker 

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



[issue33557] Windows multiprocessing doesn't propagate tabcheck to children

2018-05-17 Thread Jakub Wilk

New submission from Jakub Wilk :

Multiprocessing on Windows is supposed to start child processes using
the same sys.flags as the current process (see issue 12098).
However, at least sys.flags.tabcheck is not propagated.

I've attached small test program that reproduces this bug.
On Linux, as expected, it fails with TabError if you use -tt:

  $ python -tt test-tabcheck.py 
  Process Process-1:
  Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in 
_bootstrap
  self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
  self._target(*self._args, **self._kwargs)
File "test-tabcheck.py", line 6, in test_ast_parse
  ast.parse('if 1:\n\t1\n' + '\x20' * 8 +'1')
File "/usr/lib/python2.7/ast.py", line 37, in parse
  return compile(source, filename, mode, PyCF_ONLY_AST)
File "", line 3
  1
  ^
  TabError: inconsistent use of tabs and spaces in indentation

But it doesn't on Windows:

  >python -tt test-tabcheck.py
  Process Process-1:
  Traceback (most recent call last):
File "C:\Python27\lib\multiprocessing\process.py", line 267, in _bootstrap
  self.run()
File "C:\Python27\lib\multiprocessing\process.py", line 114, in run
  self._target(*self._args, **self._kwargs)
File "...\test-tabcheck.py", line 7, in test_ast_parse
  assert sys.flags.tabcheck == expected_tabcheck, 'sys.flags.tabcheck == 
{0} != {1}'.format(sys.flags.tabcheck, expected_tabcheck)
  AssertionError: sys.flags.tabcheck == 0 != 2

This was tested with Python 2.7.15.

--
components: Library (Lib), Windows
files: test-tabcheck.py
messages: 316949
nosy: jwilk, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows multiprocessing doesn't propagate tabcheck to children
versions: Python 2.7
Added file: https://bugs.python.org/file47598/test-tabcheck.py

___
Python tracker 

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



[issue33522] Enable CI builds on Visual Studio Team Services

2018-05-17 Thread Steve Dower

Steve Dower  added the comment:

This is implemented and merged now. I'll leave it to core-workflow to decide 
whether and when to make the builds required and/or reduce use of 
Travis/AppVeyor.

--
resolution:  -> fixed
stage: patch review -> resolved

___
Python tracker 

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



[issue33537] Help on importlib.resources outputs the builtin open description

2018-05-17 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:


New changeset 0ed66df5242138fc599b4735749e55f953d9a1e4 by Barry Warsaw in 
branch 'master':
bpo-33537: Add an __all__ to importlib.resources (#6920)
https://github.com/python/cpython/commit/0ed66df5242138fc599b4735749e55f953d9a1e4


--

___
Python tracker 

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



[issue33537] Help on importlib.resources outputs the builtin open description

2018-05-17 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6610

___
Python tracker 

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



[issue33558] Python has no icon in taskbar and in start screen

2018-05-17 Thread Filip

New submission from Filip :

I've just downloaded the latest version of Python (3.6.5) from python.org. 
After installing, I launched it and I found out the app has no icon. Then I 
tried to download Python using different link, but it was the same as the first 
try.

--
files: bug.png
messages: 316952
nosy: e_l_e_c_t_r_i_f_y
priority: normal
severity: normal
status: open
title: Python has no icon in taskbar and in start screen
type: performance
versions: Python 3.5
Added file: https://bugs.python.org/file47599/bug.png

___
Python tracker 

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



[issue33559] Exception's repr change not documented

2018-05-17 Thread Miro Hrončok

New submission from Miro Hrončok :

Python 3.6.5 ...
>>> Exception('foo',)
Exception('foo',)

Python 3.7.0b4 ...
>>> Exception('foo',)
Exception('foo')

This is a change that might bit people who rely on doctesting.

It is not documented at https://docs.python.org/3.7/whatsnew/3.7.html

I'll send a PR.

--
assignee: docs@python
components: Documentation
messages: 316953
nosy: Elvis.Pranskevichus, docs@python, hroncok, ned.deily, yselivanov
priority: normal
severity: normal
status: open
title: Exception's repr change not documented
versions: 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



[issue33559] Exception's repr change not documented

2018-05-17 Thread Miro Hrončok

Change by Miro Hrončok :


--
type:  -> behavior

___
Python tracker 

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



[issue33499] Environment variable to set alternate location for pycache tree

2018-05-17 Thread Carl Meyer

Carl Meyer  added the comment:

Can we have a named -X option that also takes a parameter? I don't see any 
existing examples of that. This option needs to take the path where bytecode 
should be written.

Are there strong use-cases for having a CLI arg for this? I don't mind doing 
the implementation work if there are, but right now I'm struggling to think of 
any case where it would be better to run `python -C /tmp/bytecode` than 
`PYTHONBYTECODEPATH=/tmp/bytecode python`. Our existing "takes a path" env 
variables (`PYTHONHOME` and `PYTHONPATH`) do not have CLI equivalents.

--

___
Python tracker 

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



[issue33560] tuple.index() could return a more explicit error message

2018-05-17 Thread Cyril Roelandt

New submission from Cyril Roelandt :

The tuple.index() method returns an error message that does not allow users to 
know what element was being looked for inside the tuple:

>>> ().index(1)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: tuple.index(x): x not in tuple

The list.index() method has a much better error message:

>>> [].index(1)   
Traceback (most recent call last):
  File "", line 1, in 
ValueError: 1 is not in list

We could improve tuple.index() so that its behaviour becomes similar to that of 
list.index().

--
messages: 316955
nosy: Cyril Roelandt
priority: normal
severity: normal
status: open
title: tuple.index() could return a more explicit error message
type: enhancement
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



[issue19251] bitwise ops for bytes of equal length

2018-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

Thanks for the link Serhiy (I'd forgotten about the struct changes proposed in 
PEP 3118), but the existing struct formatting codes are fine for my purposes.

The question is whether we might be able to avoid some 
bytes->Python-objects->bytes cycles if there were a few more 
contiguous-binary-data-centric operations on bytes and/or memoryview (similar 
to the way the ASCII-centric operations on bytes and bytearray help to avoid 
bytes->text->bytes cycles).

--

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2018-05-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le 17/05/2018 à 18:20, Nick Coghlan a écrit :
> 
> The question is whether we might be able to avoid some 
> bytes->Python-objects->bytes cycles if there were a few more 
> contiguous-binary-data-centric operations on bytes and/or memoryview (similar 
> to the way the ASCII-centric operations on bytes and bytearray help to avoid 
> bytes->text->bytes cycles).

Can you elaborate on your question?

--

___
Python tracker 

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



[issue33559] Exception's repr change not documented

2018-05-17 Thread Miro Hrončok

Change by Miro Hrončok :


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

___
Python tracker 

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



[issue33499] Environment variable to set alternate location for pycache tree

2018-05-17 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Honestly, I don't think there's a strong argument for a CLI option.  I'm 
perfectly happy with just an environment variable.

--

___
Python tracker 

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



[issue33537] Help on importlib.resources outputs the builtin open description

2018-05-17 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:


New changeset 6417d33633a3979d996015e52e4ff6c7a88e93e5 by Barry Warsaw (Miss 
Islington (bot)) in branch '3.7':
bpo-33537: Add an __all__ to importlib.resources (GH-6920) (#6941)
https://github.com/python/cpython/commit/6417d33633a3979d996015e52e4ff6c7a88e93e5


--

___
Python tracker 

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



[issue33499] Environment variable to set alternate location for pycache tree

2018-05-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

I believe the main argument for -X options is the fact that cmd on Windows 
doesn't offer a nice way of setting environment variables as part of the 
command invocation (hence "-X utf8", for example).

As far as setting values for X options goes, `sys._xoptions` in CPython is a 
str:Union[bool,str] dict, with the command args split on "=":

$ python3 -X arg=value -c "import sys; print(sys._xoptions)"

  
{'arg': 'value'}

If no value is given for the arg, then it's just set to the boolean True.

The _xoptions entry shouldn't be the public API though - it's just a way of 
shuttling settings from the command line through to CPython-specific 
initialisation code.

--

___
Python tracker 

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



[issue33560] tuple.index() could return a more explicit error message

2018-05-17 Thread Roundup Robot

Change by Roundup Robot :


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

___
Python tracker 

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



[issue33403] asyncio.tasks.wait does not allow to set custom exception when return_when=FIRST_EXCEPTION

2018-05-17 Thread Yury Selivanov

Yury Selivanov  added the comment:

This isn't a priority now, so let's postpone the discussion on this until 3.7 
is released.

--

___
Python tracker 

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



[issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable

2018-05-17 Thread Yury Selivanov

Yury Selivanov  added the comment:

> Deprecating Event.wait would be incorrect because Event was designed to mimic 
> the threading.Event class which has a (blocking) wait() method[1].

This is rather important. I'd like to continue maintaining this similarity. 
Adding 'await event' would be similar (in a way) to making instances of 
threading.Event callable.  So deprecation of '.wait()' isn't something we will 
do.

Having *both* 'await event.wait()' and 'await event' worries me.  IMO the 
slight readability improvement isn't worth the added complexity.

--

___
Python tracker 

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



[issue33533] Provide an async-generator version of as_completed

2018-05-17 Thread Yury Selivanov

Yury Selivanov  added the comment:

I like the idea. Let's revisit it after Python 3.7 is released.

--

___
Python tracker 

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



  1   2   >