[issue28134] socket.socket(fileno=fd) does not work as documented

2018-01-29 Thread Christian Heimes

Christian Heimes  added the comment:


New changeset 2e0ecde8d74f5fc0e3e3e39216975cc70efc4796 by Christian Heimes in 
branch 'master':
bpo-28134: Ignore proto in unknown socket test (GH-5435)
https://github.com/python/cpython/commit/2e0ecde8d74f5fc0e3e3e39216975cc70efc4796


--

___
Python tracker 

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



[issue32705] Current Android does not have posix_spawn

2018-01-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

likely.  i don't have an android build, please reopen if there are still 
android posix_spawn related build issues.

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



[issue20104] expose posix_spawn(p)

2018-01-29 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-01-29 Thread Gregory P. Smith

Change by Gregory P. Smith :


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

___
Python tracker 

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



[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-01-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Thanks for the PR!  I accepted it as this makes sense as a feature.

 pathlib all the things! 

I think the code be polished up a bit to not rely on catching TypeError but 
this gets the feature in before the 3.7 feature freeze (just).  If further 
changes are needed or bugs are found, they can be addressed during the 3.7 
betas. :)

--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Steven D'Aprano
On Mon, 29 Jan 2018 21:32:11 -0800, Rustom Mody wrote:

> On Sunday, January 28, 2018 at 8:37:11 PM UTC+5:30, Steven D'Aprano
> wrote:
>> I'm seeing this annoying practice more and more often. Even for trivial
>> pieces of text, a few lines, people post screenshots instead of copying
>> the code.
>> 
>> Where has this meme come from? It seems to be one which inconveniences
>> *everyone* involved:
> 
> Have you heard of the “Dutch Reach¨?
> http://www.telegraph.co.uk/travel/news/the-dutch-reach-how-opening-car-
door-like-the-dutch-could-save-lives-cycling/

Ah, yes, the Dutch Reach. That would be like the French Pox (which isn't 
French), the Spanish Flu (that didn't start in Spain), the Jerusalem 
artichoke (which is neither an artichoke nor from Jerusalem), and the 
turkey (the bird, which has nothing to do with Turkey, the country).

This technique is neither taught nor commonly used used by the Dutch: 
apparently some Americans decided that because the Netherlands has a lot 
of cyclists, they'll say its Dutch.

https://en.wikipedia.org/wiki/Dooring

So let me see if I understand the logic... 

Rather than teach people to *explicitly* check their mirror to make sure 
it is safe before opening the car door, teach them a difficult, awkward 
maneuver which they're guaranteed to stop using the second the driving 
test is over, that merely points their head more-or-less vaguely in the 
right direction to *maybe* notice on-coming cyclists *if and only if* 
they're actually paying attention.

I can see this falls under the problem solving technique, "We must do 
something, this is something, therefore we must do it!"

The sorts of people who can't remember to check their mirror before 
opening the car door aren't the sort who will remember to use this 
awkward technique. And for those who can remember to do so, it is simpler 
and more effective to explicitly check your mirror (as the Dutch actually 
do).


> Presumably it goes beyond the 'inconvenience' of images-instead-of-text
> to the saving-of-lives…

I have no idea what connection you think is between this and emailing 
pictures of source code in place of source code.


-- 
Steve

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


[issue32705] Current Android does not have posix_spawn

2018-01-29 Thread Chih-Hsuan Yen

Chih-Hsuan Yen  added the comment:

With https://github.com/python/cpython/pull/5418 merged, I guess this issue can 
be closed?

--

___
Python tracker 

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



[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-01-29 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
versions:  -Python 3.6, Python 3.8

___
Python tracker 

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



[issue32723] codecs.open silently ignores argument errors

2018-01-29 Thread Josh Rosenberg

Josh Rosenberg  added the comment:

On both Py2 and Py3, calling codecs.open without passing an encoding argument 
is equivalent to adding 'b' to the mode string and calling the built-in open 
function directly; it returns a plain binary mode file object. The errors 
parameter is meaningless because no decoding is being performed (there will 
never be any errors to handle).

--
nosy: +josh.r

___
Python tracker 

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



[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-01-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset dd42cb71f2cb02f3a32f016137b12a146bc0d0e2 by Gregory P. Smith 
(Anders Lorentsen) in branch 'master':
bpo-31961: subprocess now accepts path-like args (GH-4329)
https://github.com/python/cpython/commit/dd42cb71f2cb02f3a32f016137b12a146bc0d0e2


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



[issue32441] os.dup2 should return the new fd

2018-01-29 Thread Benjamin Peterson

Change by Benjamin Peterson :


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

___
Python tracker 

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



[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2018-01-29 Thread Benjamin Peterson

Change by Benjamin Peterson :


--
pull_requests: +5275

___
Python tracker 

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



[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2018-01-29 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 14e976e00e65bf343ba0fca016c3c9132a843daf by Benjamin Peterson 
(Eric Appelt) in branch 'master':
closes bpo-30117: fix lib2to3 ParserIdempotency test (GH-1242)
https://github.com/python/cpython/commit/14e976e00e65bf343ba0fca016c3c9132a843daf


--
nosy: +benjamin.peterson
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



Re: New to Python and understanding problem

2018-01-29 Thread Michelle Konzack
Good morning,

Am 2018-01-30 hackte careenjosep...@gmail.com in die Tasten:
> One contributing factor to this problem is the artificial environment that
> online courses provide to students. Students are usually typing code into
> a web page that contains instructions and hints. This is not how real
> programming gets done. So when the course is over and it’s time to use a
> real programming environment, students feel lost without the environment
> that they are accustomed to.

I started coding in 1984 with ASM on a 8049 Microcontroller and since
then, I was always looking into other sourcecodes to understand how
something is working.

I have no clue about Python, but I feel very well/comfortable with it. I
think, it is not very complicate to learn, because python is very logic
structured.

This is why I just go the idea of bug-hunting in the blueman app.

Thanks in avance

-- 
Michelle KonzackMiila ITSystems @ TDnet
GNU/Linux Developer 00372-54541400

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


[issue32721] test_hashlib fails if _md5 is not built

2018-01-29 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 6b2bbcc4cca414f35f67caa4674f59f41ff638ea by Benjamin Peterson 
(Miss Islington (bot)) in branch '3.6':
closes bpo-32721: do not fail test_hashlib if _md5 isn't available (GH-5441) 
(GH-5442)
https://github.com/python/cpython/commit/6b2bbcc4cca414f35f67caa4674f59f41ff638ea


--

___
Python tracker 

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



Re: New to Python and understanding problem

2018-01-29 Thread careenjoseph36
One contributing factor to this problem is the artificial environment that 
online courses provide to students. Students are usually typing code into a web 
page that contains instructions and hints. This is not how real programming 
gets done. So when the course is over and it’s time to use a real programming 
environment, students feel lost without the environment that they are 
accustomed to.
https://www.besanttechnologies.com/training-courses/salesforce-training-institute-in-chennai
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue21417] Compression level for zipfile

2018-01-29 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed
versions: +Python 3.7 -Python 3.5

___
Python tracker 

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



[issue32102] Add "capture_output=True" option to subprocess.run

2018-01-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Thanks Bo.  I agree with Nick, this is a readability win for a common annoying 
to type otherwise case.

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

___
Python tracker 

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



[issue32102] Add "capture_output=True" option to subprocess.run

2018-01-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset ce0f33d04528fcafc673a8707871f8430d8f7ce8 by Gregory P. Smith (Bo 
Bayles) in branch 'master':
bpo-32102 Add "capture_output=True" to subprocess.run (GH-5149)
https://github.com/python/cpython/commit/ce0f33d04528fcafc673a8707871f8430d8f7ce8


--

___
Python tracker 

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



[issue28914] selectmodule build fails

2018-01-29 Thread Chih-Hsuan Yen

Chih-Hsuan Yen  added the comment:

As a side note, EPOLL_CLOEXEC is also missing on Android if *both* of the 
following conditions hold:

1. The build target is Android API < 21 (issue 32654)
2. Android NDK r15 or newer is used

The second condition is related to a workaround in NDK [1]. For now it's 
proposed to use NDK r14 to build CPython [2], so this issue can be left to the 
future. I've also asked if the relevant workaround in NDK can be reverted [3].

[1] https://android-review.googlesource.com/c/platform/bionic/+/401372
[2] https://github.com/python/cpython/pull/1629
[3] https://github.com/android-ndk/ndk/issues/302#issuecomment-361488327

--
components: +Build, Cross-Build
nosy: +Alex.Willmer, yan12125

___
Python tracker 

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



[issue32102] Add "capture_output=True" option to subprocess.run

2018-01-29 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue32721] test_hashlib fails if _md5 is not built

2018-01-29 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5274

___
Python tracker 

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



[issue32721] test_hashlib fails if _md5 is not built

2018-01-29 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 95441809ef77a8df5e14601ade6c054ef7114c02 by Benjamin Peterson in 
branch 'master':
closes bpo-32721: do not fail test_hashlib if _md5 isn't available (GH-5441)
https://github.com/python/cpython/commit/95441809ef77a8df5e14601ade6c054ef7114c02


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



[issue32723] codecs.open silently ignores argument errors

2018-01-29 Thread Xiang Zhang

Change by Xiang Zhang :


--
title: codecs.open -> codecs.open silently ignores argument errors
type:  -> behavior

___
Python tracker 

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



[issue32723] codecs.open

2018-01-29 Thread Xiang Zhang

New submission from Xiang Zhang :

>>> import codecs
>>> f = codecs.open('/tmp/a', 'w', errors='replace')
>>> f.errors
'strict'

Passing errors to codecs.open without encoding doesn't work. Can't get this 
from doc and I don't think it should silently ignore the passing argument.

--
components: Library (Lib)
messages: 311240
nosy: lemburg, vstinner, xiang.zhang
priority: normal
severity: normal
status: open
title: codecs.open
versions: Python 2.7, 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



[issue32681] Fix uninitialized variable in os_dup2_impl

2018-01-29 Thread Gregory P. Smith

Change by Gregory P. Smith :


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



[issue32441] os.dup2 should return the new fd

2018-01-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

https://github.com/python/cpython/pull/5346 (merged) should fix that warning.

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



[issue32681] Fix uninitialized variable in os_dup2_impl

2018-01-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset 3d86e484de6334fe16cbab512744597bd0de4e80 by Gregory P. Smith 
(Stéphane Wirtel) in branch 'master':
bpo-32681: Fix an uninitialized variable in the C implementation of os.dup2 
(GH-5346)
https://github.com/python/cpython/commit/3d86e484de6334fe16cbab512744597bd0de4e80


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



[issue21417] Compression level for zipfile

2018-01-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset ce237c7d58ba207575cdfb0195a58a6407fbf717 by Gregory P. Smith (Bo 
Bayles) in branch 'master':
bpo-21417: Add compresslevel= to the zipfile module (GH-5385)
https://github.com/python/cpython/commit/ce237c7d58ba207575cdfb0195a58a6407fbf717


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



[issue32722] Classes

2018-01-29 Thread Soothsayer

Soothsayer  added the comment:

Correction: it's a dictionary comprehension, and it did indeed used to be a 
call to dict() in the 2.7 documentation.

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



[issue32722] Classes

2018-01-29 Thread Soothsayer

Change by Soothsayer :


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

___
Python tracker 

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



[issue32722] Classes

2018-01-29 Thread Soothsayer

New submission from Soothsayer :

In the Python tutorial, in "9. Classes", in "9.10 Generator expression", a list 
of sample generator expressions used as arguments to functions is given. 
However, one of the examples isn't a generator expression, it's a set 
comprehension.

sine_table = {x: sin(x*pi/180) for x in range(0, 91)}

Perhaps this used to be a call to set() and was mistakenly converted?

--
assignee: docs@python
components: Documentation
messages: 311235
nosy: Soothsayer, docs@python
priority: normal
severity: normal
status: open
title: Classes
type: enhancement
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



Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Rustom Mody
On Sunday, January 28, 2018 at 8:37:11 PM UTC+5:30, Steven D'Aprano wrote:
> I'm seeing this annoying practice more and more often. Even for trivial 
> pieces of text, a few lines, people post screenshots instead of copying 
> the code.
> 
> Where has this meme come from? It seems to be one which inconveniences 
> *everyone* involved:

Have you heard of the “Dutch Reach¨?
http://www.telegraph.co.uk/travel/news/the-dutch-reach-how-opening-car-door-like-the-dutch-could-save-lives-cycling/

Presumably it goes beyond the 'inconvenience' of images-instead-of-text to the
saving-of-lives…
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32721] test_hashlib fails if _md5 is not built

2018-01-29 Thread Benjamin Peterson

Change by Benjamin Peterson :


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

___
Python tracker 

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



[issue25942] Do not immediately SIGKILL subprocess child processes upon ^C

2018-01-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

I went with my change to give the child process a small amount of time to 
cleanup by default.  Not perfect, but this should be more similar to the Python 
<=3.2 behavior.  Lets see if any issues crop up during the 3.7 betas.

--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed
title: Add a new optional cleanup_timeout parameter to subprocess.call() -> Do 
not immediately SIGKILL subprocess child processes upon ^C

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-29 Thread Nick Coghlan

Nick Coghlan  added the comment:

OK, this is back the way it was on the 3.6 branch now, while keeping the change 
on the 3.7 branch.

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

___
Python tracker 

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



[issue32721] test_hashlib fails if _md5 is not built

2018-01-29 Thread Benjamin Peterson

New submission from Benjamin Peterson :

$ make
$ rm build/lib.linux-x86_64-3.7/_md5.cpython-37m-x86_64-linux-gnu.so 
$ ./python -m test test_hashlib
Run tests sequentially
0:00:00 load avg: 1.11 [1/1] test_hashlib
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/home/benjamin/dev/python/cpython/Lib/hashlib.py", line 243, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/home/benjamin/dev/python/cpython/Lib/hashlib.py", line 113, in 
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
/home/benjamin/dev/python/cpython/Lib/test/test_hashlib.py:90: UserWarning: Did 
a C extension fail to compile? No module named '_md5'
  warnings.warn('Did a C extension fail to compile? %s' % error)
Warning -- logging._handlerList was modified by test_hashlib
  Before: (139817255081928, [, ], [])
  After:  (139817255081928, [, ], [, ]) 
test test_hashlib failed -- Traceback (most recent call last):
  File "/home/benjamin/dev/python/cpython/Lib/test/test_hashlib.py", line 209, 
in test_get_builtin_constructor
constructor = get_builtin_constructor('md5')
  File "/home/benjamin/dev/python/cpython/Lib/hashlib.py", line 113, in 
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5

test_hashlib failed

1 test failed:
test_hashlib

Total duration: 397 ms
Tests result: FAILURE

--
components: Build
messages: 311233
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: test_hashlib fails if _md5 is not built
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



[issue25942] Add a new optional cleanup_timeout parameter to subprocess.call()

2018-01-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset f4d644f36ffb6cb11b34bfcf533c14cfaebf709a by Gregory P. Smith in 
branch 'master':
bpo-25942: make subprocess more graceful on ^C (GH-5026)
https://github.com/python/cpython/commit/f4d644f36ffb6cb11b34bfcf533c14cfaebf709a


--

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-29 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 05f91a42cd9575ef338a67bd04855b44f6ac20c2 by Nick Coghlan in 
branch '3.6':
[3.6] Revert "bpo-32690: Preserve order of locals() (GH-5379) (#5390)"
https://github.com/python/cpython/commit/05f91a42cd9575ef338a67bd04855b44f6ac20c2


--

___
Python tracker 

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



[issue32720] Format mini-language integer definition is incorrect

2018-01-29 Thread Nick Coghlan

New submission from Nick Coghlan :

I just noticed that https://docs.python.org/3/library/string.html#formatspec 
links to the "integer" definition in the main Python grammar for the permitted 
format of numeric fields.

This isn't accurate:

```
>>> format(10e4, ",.2f")
'100,000.00'
>>> format(10e4, ",.0x2f")
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Invalid format specifier
>>> format(10e4, ",.2_2f")
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Invalid format specifier
```

Instead, the `width` and `precision` subfields should be defined as "digit+"

--
assignee: docs@python
components: Documentation
messages: 311229
nosy: docs@python, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Format mini-language integer definition is incorrect
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue32701] Typo in quopri documentation

2018-01-29 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

Thanks!

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



[issue32690] Return function locals() in order of creation?

2018-01-29 Thread Nick Coghlan

Nick Coghlan  added the comment:

Noting the git-fu required for non-master reverts:

- check out the branch of interest and ensure it's up to date
- `git checkout -b bpo-32690-revert-3.6-backport`
- `git revert 9105879bfd7133ecbac67f3e9c0bacf6e477de5a`
- edit commit message as appropriate
- create a PR targeting the branch of interest: 
https://github.com/python/cpython/pull/5439

Devguide issue here: https://github.com/python/devguide/issues/319

--

___
Python tracker 

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



[issue32701] Typo in quopri documentation

2018-01-29 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset 04f99ba9d7186278eaf072e9a62c03aa63a8a6bb by Mariatta (Miss 
Islington (bot)) in branch '3.6':
bpo-32701: Clarify the quotetabs flag in quopri documentation (GH-5401) 
(GH-5438)
https://github.com/python/cpython/commit/04f99ba9d7186278eaf072e9a62c03aa63a8a6bb


--

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-29 Thread Nick Coghlan

Change by Nick Coghlan :


--
pull_requests: +5272
stage: resolved -> patch review

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-29 Thread Ned Deily

Ned Deily  added the comment:

I'll make sure it's taken care of prior to 3.6.5rc1.

--

___
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-01-29 Thread Eric Snow

Eric Snow  added the comment:

The buildbots should be happier now.  I'll keep an eye on them.

--

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-29 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Ned, can you do the reversion?  I'm a little git/github challenged on how to 
revert this one.

--
assignee: ncoghlan -> ned.deily

___
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-01-29 Thread Eric Snow

Eric Snow  added the comment:


New changeset 83e64c8a544028ae677af2a0bc268dbe1c11cc3a by Eric Snow in branch 
'master':
bpo-32604: NULL-terminate kwlist in channel_drop_interpreter(). (gh-5437)
https://github.com/python/cpython/commit/83e64c8a544028ae677af2a0bc268dbe1c11cc3a


--

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-29 Thread Raymond Hettinger

Change by Raymond Hettinger :


--
Removed message: https://bugs.python.org/msg311214

___
Python tracker 

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



[issue32701] Typo in quopri documentation

2018-01-29 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5271

___
Python tracker 

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



[issue32701] Typo in quopri documentation

2018-01-29 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset 9424dcbb3e20a26dfdd81659303b989f7d3da044 by Mariatta (Julien 
Palard) in branch 'master':
bpo-32701: Clarify the quotetabs flag in quopri documentation (GH-5401)
https://github.com/python/cpython/commit/9424dcbb3e20a26dfdd81659303b989f7d3da044


--

___
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-01-29 Thread Eric Snow

Eric Snow  added the comment:

I just put up a PR that should fix the 4 buildbots.

--

___
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-01-29 Thread Eric Snow

Change by Eric Snow :


--
pull_requests: +5270

___
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-01-29 Thread Eric Snow

Eric Snow  added the comment:

On the PPC64 AIX 3.x buildbot:

==
FAIL: test_repr (test.test__xxsubinterpreters.ChannelIDTests)
--
Traceback (most recent call last):
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test__xxsubinterpreters.py",
 line 784, in test_repr
self.assertEqual(repr(cid), 'ChannelID(10)')
AssertionError: 'ChannelID(0)' != 'ChannelID(10)'
- ChannelID(0)
+ ChannelID(10)
?   +

--

___
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-01-29 Thread Eric Snow

Eric Snow  added the comment:

On 4 of the buildbots:


==
ERROR: test_drop_multiple_times (test.test__xxsubinterpreters.ChannelTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test__xxsubinterpreters.py",
 line 890, in test_drop_multiple_times
interpreters.channel_drop_interpreter(cid, send=True, recv=True)
SystemError: More keyword list entries (7) than format specifiers (3)
==
ERROR: test_drop_single_user (test.test__xxsubinterpreters.ChannelTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test__xxsubinterpreters.py",
 line 848, in test_drop_single_user
interpreters.channel_drop_interpreter(cid, send=True, recv=True)
SystemError: More keyword list entries (7) than format specifiers (3)
==
ERROR: test_drop_used_multiple_times_by_single_user 
(test.test__xxsubinterpreters.ChannelTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test__xxsubinterpreters.py",
 line 957, in test_drop_used_multiple_times_by_single_user
interpreters.channel_drop_interpreter(cid, send=True, recv=True)
SystemError: More keyword list entries (7) than format specifiers (3)
==
ERROR: test_drop_with_unused_items (test.test__xxsubinterpreters.ChannelTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test__xxsubinterpreters.py",
 line 899, in test_drop_with_unused_items
interpreters.channel_drop_interpreter(cid, send=True, recv=True)
SystemError: More keyword list entries (7) than format specifiers (3)

--

___
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-01-29 Thread Eric Snow

Eric Snow  added the comment:

Yeah, I'm looking into it.  Also, I noticed some refleaks that I'll be sorting 
out.

--

___
Python tracker 

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



[issue32719] fatal error raised when Ctrl-C print loop

2018-01-29 Thread Xiang Zhang

Xiang Zhang  added the comment:

It's 3.6 and 3.7. The dir name in traceback doesn't matter.

--

___
Python tracker 

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



Re: Variable scope in nested functions

2018-01-29 Thread Prahallad Achar
Thanks Chris,
Without using nonlocal any other options available?

On 30 Jan 2018 8:30 am, "Chris Angelico"  wrote:

> On Tue, Jan 30, 2018 at 1:48 PM, Prahallad Achar 
> wrote:
> > def a() :
> > Print (value)
> > def b() :
> >  Value = 100
> > Return b
> >
> > Its a nested function.  How can I use variable value just one function
> > above the parent function.
> > This is possible in tcl.. Is it possible in Python too?
>
> It is. What you have is a "nonlocal" variable. You will need to assign
> to the variable in the outer function though.
>
> def a():
> value = None
> def b():
> nonlocal value
> value = 100
> return b
>
> You can do this through any number of levels of nested functions.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Chris Angelico
On Tue, Jan 30, 2018 at 12:56 PM, Abdur-Rahmaan Janhangeer
 wrote:
>
> XD since we were elaborating on the reasons why users use screenshot, well i 
> was elaborating why users use screenshot, not me. those are some reasons i 
> came across being admin in some whatsapp groups and python lists (where the 
> user complains of his attachments not showing).
>

Sorry, I was using the generic "you", rather than pointing the finger
specifically at you. That was a bit unclear in my post - mea culpa.

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


Re: Variable scope in nested functions

2018-01-29 Thread Chris Angelico
On Tue, Jan 30, 2018 at 1:48 PM, Prahallad Achar  wrote:
> def a() :
> Print (value)
> def b() :
>  Value = 100
> Return b
>
> Its a nested function.  How can I use variable value just one function
> above the parent function.
> This is possible in tcl.. Is it possible in Python too?

It is. What you have is a "nonlocal" variable. You will need to assign
to the variable in the outer function though.

def a():
value = None
def b():
nonlocal value
value = 100
return b

You can do this through any number of levels of nested functions.

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


[issue32719] fatal error raised when Ctrl-C print loop

2018-01-29 Thread Xiang Zhang

New submission from Xiang Zhang :

A simple snippet:

import threading

def func():
while True:
print(1,2,3,4,5,6,7,8,9,10) 

t1 = threading.Thread(target=func)
t2 = threading.Thread(target=func)
t1.start()
t2.start()

Running this snippet and Ctrl-C raises FatalError:

^CException ignored in: 
Traceback (most recent call last):
1 2 3 4 5 6 7 8 9 10
  File "/root/Python-2.8.1/Lib/threading.py", line 1294, in _shutdown
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
t.join()
  File "/root/Python-2.8.1/Lib/threading.py", line 1056, in join
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
self._wait_for_tstate_lock()
  File "/root/Python-2.8.1/Lib/threading.py", line 1072, in 
_wait_for_tstate_lock
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
elif lock.acquire(block, timeout):
KeyboardInterrupt
Fatal Python error: could not acquire lock for <_io.BufferedWriter 
name=''> at interpreter shutdown, possibly due to daemon threads

Thread 0x7f7f6b22e700 (most recent call first):
  File "/tmp/test.py", line 5 in func
  File "/root/Python-2.8.1/Lib/threading.py", line 864 in run
  File "/root/Python-2.8.1/Lib/threading.py", line 916 in _bootstrap_inner
  File "/root/Python-2.8.1/Lib/threading.py", line 884 in _bootstrap

Thread 0x7f7f6ba2f700 (most recent call first):
  File "/tmp/test.py", line 5 in func
  File "/root/Python-2.8.1/Lib/threading.py", line 864 in run
  File "/root/Python-2.8.1/Lib/threading.py", line 916 in _bootstrap_inner
  File "/root/Python-2.8.1/Lib/threading.py", line 884 in _bootstrap

Current thread 0x7f7f73761740 (most recent call first):
已放弃(吐核) /* segfault(core dump) */

--
components: IO
messages: 311215
nosy: xiang.zhang
priority: normal
severity: normal
status: open
title: fatal error raised when Ctrl-C print loop
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



Variable scope in nested functions

2018-01-29 Thread Prahallad Achar
def a() :
Print (value)
def b() :
 Value = 100
Return b

Its a nested function.  How can I use variable value just one function
above the parent function.
This is possible in tcl.. Is it possible in Python too?
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32714] remove resourceLoader related code since it's deprecated

2018-01-29 Thread Jay Yin

Change by Jay Yin :


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



[issue32690] Return function locals() in order of creation?

2018-01-29 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> Can someone please revert the 3.6 change, as asked by Guido?

You have commit rights, so if you're impatient, go ahead.  Otherwise, I still 
need to figure-out out the github-foo needed to revert on something other than 
the master branch.  This isn't even my issue. I was trying to help out and 
didn't expect the Spanish Inquisition.

--

___
Python tracker 

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



[issue32694] Can no longer specify OpenSLL locations with CPPFLAGS / LDFLAGS ?

2018-01-29 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Can we also cover Brew?

Here's the dumb little configure wrapper I use:

```
#!/bin/sh

export CPPFLAGS="-I$(brew --prefix sqlite3)/include -I$(brew --prefix 
zlib)/include"
export LDFLAGS="-L$(brew --prefix sqlite3)/lib -L$(brew --prefix zlib)/lib"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

./configure
```

--

___
Python tracker 

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



Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Abdur-Rahmaan Janhangeer
XD since we were elaborating on the reasons why users use screenshot, well
i was elaborating why users use screenshot, not me. those are some reasons
i came across being admin in some whatsapp groups and python lists (where
the user complains of his attachments not showing).


Garanti
sans virus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Tue, Jan 30, 2018 at 5:13 AM, Chris Angelico  wrote:

> On Tue, Jan 30, 2018 at 11:40 AM, Abdur-Rahmaan Janhangeer
>  wrote:
> > well maybe screenshot of shell sessions to show varying formatted test
> > cases might be valid (like the increasingly popular practise of coding py
> > on android)
>
> Maybe, but that isn't code.
>
> > also, sreenshot sources tend to be syntax colored which might be easier
> to
> > read.
>
> No. The syntax highlighting comes from the code, so I should be able
> to paste your code into my editor and see it in colour. No benefit to
> seeing it in YOUR colours, which may not be helpful to me.
>
> > ease of access is the culprit !
>
> I find that hard to believe... you're saying it's actually easier to
> screenshot a text editor than to copy and paste?
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2018-01-29 Thread Ned Deily

Ned Deily  added the comment:

Eric, looks like some buildbots are unhappy, for instance:

http://buildbot.python.org/all/#builders/13/builds/648

--

___
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-01-29 Thread Eric Snow

Eric Snow  added the comment:

I've merged the patch without Windows support, which shouldn't be a problem 
given the purpose of the extension module.  I've also added a PR for get the 
module building under Windows.  I'd like to get that resolved ASAP.

--

___
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-01-29 Thread Eric Snow

Change by Eric Snow :


--
pull_requests: +5269

___
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-01-29 Thread Eric Snow

Eric Snow  added the comment:


New changeset 7f8bfc9b9a8381ddb768421b5dd5cbd970266190 by Eric Snow in branch 
'master':
bpo-32604: Expose the subinterpreters C-API in a "private" stdlib module. 
(gh-1748)
https://github.com/python/cpython/commit/7f8bfc9b9a8381ddb768421b5dd5cbd970266190


--

___
Python tracker 

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



[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-29 Thread Guido van Rossum

Guido van Rossum  added the comment:

W00t!

--

___
Python tracker 

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



Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Chris Angelico
On Tue, Jan 30, 2018 at 11:40 AM, Abdur-Rahmaan Janhangeer
 wrote:
> well maybe screenshot of shell sessions to show varying formatted test
> cases might be valid (like the increasingly popular practise of coding py
> on android)

Maybe, but that isn't code.

> also, sreenshot sources tend to be syntax colored which might be easier to
> read.

No. The syntax highlighting comes from the code, so I should be able
to paste your code into my editor and see it in colour. No benefit to
seeing it in YOUR colours, which may not be helpful to me.

> ease of access is the culprit !

I find that hard to believe... you're saying it's actually easier to
screenshot a text editor than to copy and paste?

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


[issue32690] Return function locals() in order of creation?

2018-01-29 Thread STINNER Victor

STINNER Victor  added the comment:

Can someone please revert the 3.6 change, as asked by Guido?

--
nosy: +vstinner
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue27931] Email parse IndexError <""@wiarcom.com>

2018-01-29 Thread Xiang Zhang

Change by Xiang Zhang :


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



[issue32714] remove resourceLoader related code since it's deprecated

2018-01-29 Thread Jay Yin

Jay Yin  added the comment:

Alright I see, so I guess I'll set this as "postponed" and close it?

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



[issue32718] Install PowerShell activation scripts for venv for all platforms

2018-01-29 Thread Brett Cannon

New submission from Brett Cannon :

Thanks to https://github.com/PowerShell/PowerShell, PowerShell Core is 
cross-platform. That suggests that the Activate.ps1 file for venv should be 
moved to the common/ directory instead of existing only in the nt/ directory.

--
components: Library (Lib)
messages: 311206
nosy: brett.cannon, vinay.sajip
priority: low
severity: normal
status: open
title: Install PowerShell activation scripts for venv for all platforms
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



[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-29 Thread Raymond Hettinger

Change by Raymond Hettinger :


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



Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Abdur-Rahmaan Janhangeer
well maybe screenshot of shell sessions to show varying formatted test
cases might be valid (like the increasingly popular practise of coding py
on android)

also, sreenshot sources tend to be syntax colored which might be easier to
read.

overall it is a bad idea as you won't have the full code if the code is
long unless you are on android with the scroll screenshot option.

ease of access is the culprit !

Abdur-Rahmaan Janhangeer
https://abdurrahmaanjanhangeer.wordpress.com

On 28 Jan 2018 19:08, "Steven D'Aprano" <
steve+comp.lang.pyt...@pearwood.info> wrote:

> I'm seeing this annoying practice more and more often. Even for trivial
> pieces of text, a few lines, people post screenshots instead of copying
> the code.
>
> Where has this meme come from? It seems to be one which inconveniences
> *everyone* involved:
>
> - for the sender, instead of a simple copy and paste, they have to take a
> screen shot, possibly trim the image to remove any bits of the screen
> they don't want to show, attach it to their email or upload it to an
> image hosting site;
>
> - for the receiver, you are reliant on a forum which doesn't strip
> attachments, or displays externally hosted images; the visually impaired
> are excluded from using a screen reader; and nobody can copy or edit the
> given text.
>
> It is as if people are deliberately inconveniencing themselves in order
> to inconvenience the people they are asking to help them.
>
> With the exception of one *exceedingly* overrated advantage, namely the
> ability to annotate the image with coloured lines and circles and
> squiggles or other graphics (which most people don't bother to do), this
> seems to me to be 100% counter-productive for everyone involved. Why has
> it spread and why do people keep doing it?
>
> I don't want to be the old man yelling "Get Of My Lawn!" to the cool
> kids, but is this just another sign of the downward spiral of programming
> talent? Convince me that there is *some* justification for this practice.
> Even a tiny one.
>
> (The day a programmer posts a WAV file of themselves reading their code
> out aloud, is the day I turn my modem off and leave the internet forever.)
>
>
>
> --
> Steve
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-29 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset 332cd5ee4ff42c9904c56e68a1028f383f7fc9a8 by Raymond Hettinger 
(Mark Shannon) in branch 'master':
bpo-32550. Remove the STORE_ANNOTATION bytecode. (GH-5181)
https://github.com/python/cpython/commit/332cd5ee4ff42c9904c56e68a1028f383f7fc9a8


--

___
Python tracker 

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



Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Ethan Furman

On 01/29/2018 02:41 PM, Steven D'Aprano wrote:

On Mon, 29 Jan 2018 11:43:36 -0800, John Ladasky wrote:

On Sunday, January 28, 2018 at 7:07:11 AM UTC-8, Steven D'Aprano wrote:



(The day a programmer posts a WAV file of themselves reading their code
out aloud, is the day I turn my modem off and leave the internet
forever.)


What's a... modem?


Its the component of the router that actually handles the
telecommunications side of things. Legend has it that once upon a time
they were a stand alone device.


Mine was never stand-alone.  I always had to prop it up with some books.

--
~Ethan~

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


[issue32218] add __iter__ to enum.Flag members

2018-01-29 Thread Ethan Furman

Ethan Furman  added the comment:

This functionality is now in the third-party aenum* library.

Are there any strong use-cases for this behavior such that it should be in the 
stdlib?


* as of version 2.0.10, available on PyPI, and I am its author

--
nosy: +barry, eli.bendersky, rhettinger
stage: needs patch -> 
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



[issue22374] Replace contextmanager example and improve explanation

2018-01-29 Thread cowlinator

cowlinator  added the comment:

I would like to second the improved explanation of contextlib.contextmanager, 
and additionally point out another problem:  
A very important piece of information is missing from the documentation:  how 
to return data from the contextmanager-wrapped function.  

I had to go look up the source code, which had a wonderful explanation in the 
comments: https://gist.github.com/enuomi/1385336#file-contextlib-py-L56 

In particular, note that 

@contextmanager
def some_generator():
  yield 

can be used to return  to the caller, via

with some_generator() as :
  print(return_data)

This information is wholly and completely missing from the 
contextlib.contextmanager documentation.

--
nosy: +cowlinator
versions: +Python 2.7, Python 3.4, Python 3.7

___
Python tracker 

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



[issue31851] test_subprocess hangs randomly on Windows with Python 3.x

2018-01-29 Thread Steve Dower

Steve Dower  added the comment:

It's an assert, so it only affects debug builds - releases are not impacted.

I'm guessing there's a test that spawns a subprocess and doesn't initialize it 
properly for tests (specifically the part where we disable assertions on 
Windows).

--

___
Python tracker 

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



[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-29 Thread Mark Shannon

Mark Shannon  added the comment:

Rebased, pushed and CI is green.

--

___
Python tracker 

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



[issue32717] Document PEP 560

2018-01-29 Thread Ivan Levkivskyi

New submission from Ivan Levkivskyi :

This should include:
* Short documentation PR for `__mro_entry__` and `__base_subclass__` methods.
* The `__class_getitem__` C API calling convention (with motivation, many 
classes are implemented in C but are generic in nature, like numpy.ndarray) in 
PEP 560.

--
assignee: levkivskyi
components: Documentation
messages: 311200
nosy: gvanrossum, levkivskyi, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Document PEP 560
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-29 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

OK, I will close this issue, and open separate issues for documentation, Union, 
etc.

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



[issue32715] Make create_unix_server for SOCK_DGRAM work

2018-01-29 Thread Yury Selivanov

Yury Selivanov  added the comment:

Hm, maybe I'm mistaken here, but I have no time right now to confirm.

I'll reopen the issue so that we can consider this (and especially SEQPACKET) 
for 3.8.  Sorry for insta-reject :)

--
resolution: rejected -> 
stage: resolved -> 
status: closed -> open
type: behavior -> enhancement

___
Python tracker 

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



Re: String matching based on sound?

2018-01-29 Thread Steven D'Aprano
On Mon, 29 Jan 2018 13:28:32 -0900, Israel Brewster wrote:

> In initial searching, I did find the "fuzzy" library, which at first
> glance appeared to be what I was looking for, but it, apparently,
> ignores numbers, with the result that "all 4 one" gave the same output
> as "all in", but NOT the same output as "all 4 1" - even though "all 4
> 1" sounds EXACTLY the same, while "all in" is only similar if you ignore
> the 4.

Before passing the string to the fuzzy matcher, do a simple text 
replacement of numbers to their spelled out version: "4" -> "four".

You may want to do other text replacements too, based on sound or visual 
design, for example to deal with Kei$ha a.k.a. Keisha, etc.


-- 
Steve

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


[issue32394] socket lib beahavior change in 3.6.4

2018-01-29 Thread Steve Dower

Steve Dower  added the comment:

I like Kamil's suggestion.

--

___
Python tracker 

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



[issue32715] Make create_unix_server for SOCK_DGRAM work

2018-01-29 Thread holger

holger  added the comment:

Could you please tell me which exact posix document and paragraph says that?

In Linux sending can fail but once sendmsg worked the message is enqueued on 
the other socket 
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/unix/af_unix.c?id=110af3acb8cfd79dcb5676a01e07cb2b6afa4c04#n1626).

In FreeBSD 
(http://fxr.watson.org/fxr/source/kern/uipc_usrreq.c?v=FREEBSD10#L911) it looks 
similar. If the mbuf can't be put into the recvq of the remote socket.. an 
error will be returned.

What about SEQPACKET support?

--

___
Python tracker 

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



Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Steven D'Aprano
On Mon, 29 Jan 2018 17:34:34 +, John Gordon wrote:

[...]
> The displayed filename in File Explorer was input.txt -- meaning that
> the real filename was actually input.txt.txt, because File Explorer
> shows file extensions as a separate column.
> 
> Without this screenshot, we would have had only the user's (incorrect)
> assertion that the file existed, and no way to diagnose the true issue.

No way to diagnose it -- apart from asking the programmer to run the DOS 
command `dir` in the directory and copy and paste the file listing.

Or os.listdir() in Python.


> Granted, this was an environment issue and not a code issue, but I can
> imagine situations where the same sort of thing could apply to code.

The only time a programmer MUST include a screen shot is when they are 
trying to diagnose a problem with graphical output that can't easily and 
accurately be described in words. And that's a screen shot of the 
*output*, not the code.

It MAY be useful to include a screen shot of system crashes where the 
error message is impossible to copy and too long and complex to 
transcribe.

Or possibly when trying to ask for help with your GUI IDE or editor, 
although even then most questions can be described in words.

So I don't quite rule out the possibility of programmers needing to take 
screen shots at all. I'm not a troglodyte :-)

But what I do rule out is the necessity and usefulness of programmers 
taking screen shots of their *code* to ask for help with program logic or 
solving errors (with the very rare possible exception of especially 
difficult to solve syntax errors).


-- 
Steve

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


[issue32716] setup.py register --repository is broken

2018-01-29 Thread Takayuki SHIMIZUKAWA

New submission from Takayuki SHIMIZUKAWA :

Although document 
https://docs.python.org/3.6/distutils/packageindex.html#package-cmdoptions says 
"The --repository or -r option lets you specify a PyPI server different from 
the default", if there is no URL specified in ``.pypirc`` it will display 
"ValueError:  not found in .pypirc".


::

  $ python3 setup.py register -r https://test.pypi.org/legacy/
  running register
  running egg_info
  writing dependency_links to test.egg-info/dependency_links.txt
  writing top-level names to test.egg-info/top_level.txt
  writing test.egg-info/PKG-INFO
  reading manifest file 'test.egg-info/SOURCES.txt'
  writing manifest file 'test.egg-info/SOURCES.txt'
  Traceback (most recent call last):
File "setup.py", line 4, in 
  setup(name='test')
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
  dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
  self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
  cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/register.py", line 
10, in run
  orig.register.run(self)
File "/usr/lib/python3.5/distutils/command/register.py", line 45, in run
  self._set_config()
File "/usr/lib/python3.5/distutils/command/register.py", line 80, in 
_set_config
  raise ValueError('%s not found in .pypirc' % self.repository)
  ValueError: https://test.pypi.org/legacy/ not found in .pypirc

  $ python3 -V
  Python 3.5.2

  $ lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:Ubuntu 16.04.3 LTS
  Release:16.04
  Codename:   xenial

This behavior could be confirmed on Windows.

I think there are two correction methods.
One is to fix it so that we can specify any URL regardless of the setting of 
.pypirc.
The other is to write in the document that "-r option can specify server name 
or URL in .pypirc".

--
components: Distutils
messages: 311195
nosy: dstufft, eric.araujo, shimizukawa
priority: normal
severity: normal
status: open
title: setup.py register --repository is broken
versions: Python 2.7, Python 3.4, Python 3.5, 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



String matching based on sound?

2018-01-29 Thread Israel Brewster
I am working on a python program that, at one step, takes an input (string), 
and matches it to songs/artists in a users library. I'm having some difficulty, 
however, figuring out how to match when the input/library contains 
numbers/special characters. For example, take the group "All-4-One". In my 
library it might be listed exactly like that. I need to match this to ANY of 
the following inputs:

• all-4-one (of course)
• all 4 one (no dashes)
• all 4 1 (all numbers)
• all four one (all spelled out)
• all for one

Or, really, any other combination that sounds the same. The reasoning for this 
is that the input comes from a speech recognition system, so the user speaking, 
for example, "4", could be recognized as "for", "four" or "4". I'd imagine that 
Alexa/Siri/Google all do things like this (since you can ask them to play 
songs/artists), but I want to implement this in Python.

In initial searching, I did find the "fuzzy" library, which at first glance 
appeared to be what I was looking for, but it, apparently, ignores numbers, 
with the result that "all 4 one" gave the same output as "all in", but NOT the 
same output as "all 4 1" - even though "all 4 1" sounds EXACTLY the same, while 
"all in" is only similar if you ignore the 4.

So is there something similar that works with strings containing numbers? And 
that would only give me a match if the two strings sound identical? That is, 
even ignoring the numbers, I should NOT get a match between "all one" and "all 
in" - they are similar, but not identical, while "all one" and "all 1" would be 
identical.





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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Steven D'Aprano
On Mon, 29 Jan 2018 11:43:36 -0800, John Ladasky wrote:

> On Sunday, January 28, 2018 at 7:07:11 AM UTC-8, Steven D'Aprano wrote:
>>
>> (The day a programmer posts a WAV file of themselves reading their code
>> out aloud, is the day I turn my modem off and leave the internet
>> forever.)
> 
> What's a... modem?


Its the component of the router that actually handles the 
telecommunications side of things. Legend has it that once upon a time 
they were a stand alone device.


-- 
Steve

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


[issue32714] remove resourceLoader related code since it's deprecated

2018-01-29 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

We can't remove the code because it might still be used by third parties.  
Deprecation generally means we inform users that they shouldn't use the code 
any more (possibly with a DeprecationWarning, although we decided not to do 
that in this case).  We definitely won't remove the code in 3.7.  We can think 
about it for 3.8

--
nosy: +barry, brett.cannon
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



[issue30697] segfault in PyErr_NormalizeException() after memory exhaustion

2018-01-29 Thread Brett Cannon

Brett Cannon  added the comment:

No opinion from me on how critical this is.

--

___
Python tracker 

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



[issue32715] Make create_unix_server for SOCK_DGRAM work

2018-01-29 Thread Yury Selivanov

Yury Selivanov  added the comment:

SOCK_DGRAM is never reliable, even for AF_UNIX.  It might appear reliable to 
your test code, but there's no guarantee for that under any OS in Posix 
standard AFAIK.

--
resolution:  -> rejected
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



[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-29 Thread Guido van Rossum

Guido van Rossum  added the comment:

Awesome!

--

___
Python tracker 

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



[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-29 Thread Ned Deily

Ned Deily  added the comment:

Mark, at the moment, you have at least another 14 hours until the announced 
code freeze deadline :)

--
nosy: +ned.deily

___
Python tracker 

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



[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-29 Thread Mark Shannon

Mark Shannon  added the comment:

If it can wait another hour, I will be at home and can do the rebase then.

--

___
Python tracker 

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



  1   2   3   >