[issue32739] collections.deque rotate(n=1) default value not documented

2018-02-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Isn't there a missed "not"?

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

___
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-02-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

What about arg_name and element_index?

>>> '{}'.format(123)
'123'
>>> '{0}'.format(123)
'123'
>>> '{0x0}'.format(123)
Traceback (most recent call last):
  File "", line 1, in 
KeyError: '0x0'
>>> '{0_0}'.format(123)
Traceback (most recent call last):
  File "", line 1, in 
KeyError: '0_0'
>>> '{0[0]}'.format([123])
'123'
>>> '{0[0x0]}'.format([123])
Traceback (most recent call last):
  File "", line 1, in 
TypeError: list indices must be integers or slices, not str
>>> '{0[0_0]}'.format([123])
Traceback (most recent call last):
  File "", line 1, in 
TypeError: list indices must be integers or slices, not str

--
nosy: +serhiy.storchaka

___
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-02-03 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset 3bd749b2122c17b835dc438cdaef63bfdfd61344 by Mariatta (Miss 
Islington (bot)) in branch '3.6':
bpo-32720: Fixed the definition for width and precision in format mini-language 
doc (GH-5482) (GH-5525)
https://github.com/python/cpython/commit/3bd749b2122c17b835dc438cdaef63bfdfd61344


--

___
Python tracker 

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



[issue32759] multiprocessing.Array do not release shared memory

2018-02-03 Thread Steve Dower

Change by Steve Dower :


--
nosy: +davin, pitrou

___
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-02-03 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset 133514e9dcea9c8cc9d9dd459b1a7fb502747d7e by Mariatta (Miss 
Islington (bot)) in branch '3.7':
bpo-32720: Fixed the definition for width and precision in format mini-language 
doc (GH-5482) (GH-5524)
https://github.com/python/cpython/commit/133514e9dcea9c8cc9d9dd459b1a7fb502747d7e


--

___
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-02-03 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5354

___
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-02-03 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5353

___
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-02-03 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset 8b5fa289fdb04b6b919cf95fa99246aa872e47a8 by Mariatta 
(nathankerr96) in branch 'master':
bpo-32720: Fixed the definition for width and precision in format mini-language 
doc (GH-5482)
https://github.com/python/cpython/commit/8b5fa289fdb04b6b919cf95fa99246aa872e47a8


--
nosy: +Mariatta

___
Python tracker 

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



[issue32337] Dict order is now guaranteed, so add tests and doc for it

2018-02-03 Thread Raymond Hettinger

Change by Raymond Hettinger :


--
assignee: rhettinger -> 

___
Python tracker 

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



Re: Fwd: Syntax error

2018-02-03 Thread Cameron Simpson

On 03Feb2018 14:10, Kevin Doney  wrote:

*pip3 install --upgrade tensorflow-gpu*

When I try the above command I get
SyntaxError: invalid syntax

Please help.


It looks like you typed that command to the Python prompt, based on the 
distinctively Python "SyntaxError" response.


That command is supposed to be typed to a shell prompt. It is not Python code, 
it is a command line to install a package.


But as with the other responders, it is always helpful if you post the entire 
text, including the prompt you're using (which with show whether this was 
Python or a command shell etc) and if you've got a Python error, the full 
traceback. I suspect some people think this is noisy verbiage that would make 
their question hard to read, but it is usually vital context for the error 
message.


Cheers,
Cameron Simpson  (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list


[issue32337] Dict order is now guaranteed, so add tests and doc for it

2018-02-03 Thread shangdahao

shangdahao  added the comment:

Thanks zhang, I have updated it in the PR.

--

___
Python tracker 

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



[issue32216] Document PEP 557 Data Classes (dataclasses module)

2018-02-03 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

> I've already started on drafting these docs.  Would you like to work together?

Sure, Raymond. Let me know how I can help :)

--

___
Python tracker 

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



[issue32216] Document PEP 557 Data Classes (dataclasses module)

2018-02-03 Thread Christopher Barker

Christopher Barker  added the comment:

Thanks Raymond. Can a draft be put in a gitHub repo so we can all help out?

--

___
Python tracker 

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



[issue32695] tarfile.open() raises TypeError when using compresslevel parameter with LZMA

2018-02-03 Thread bbayles

bbayles  added the comment:

In working on a patch I convinced myself that a better change might just be to 
document that you can use the *preset* keyword for LZMA compression instead of 
*compresslevel*.

--

___
Python tracker 

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



[issue32746] More misspellings, mostly in source code.

2018-02-03 Thread Terry J. Reedy

Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue32746] More misspellings, mostly in source code.

2018-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset c90a5dec03fbef3a26479c800d5d6d15c44d5afb by Terry Jan Reedy in 
branch '3.6':
[3.6] bpo-32746: Fix multiple typos (GH-5144) (GH-5522)
https://github.com/python/cpython/commit/c90a5dec03fbef3a26479c800d5d6d15c44d5afb


--

___
Python tracker 

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



[issue32394] socket lib beahavior change in 3.6.4

2018-02-03 Thread Ma Lin

Ma Lin  added the comment:

I create a new one (PR 5523), I'm not a C & socket expert, so if you want to 
improve/polish the patch, feel free to create a new PR based on (or not) it.

--

___
Python tracker 

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



[issue32746] More misspellings, mostly in source code.

2018-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset e86db34dd3b43dc9c9beb21a82cd2c3b7c4c05df by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.7':
[3.7] bpo-32746: Fix multiple typos (GH-5144) (GH-5520)
https://github.com/python/cpython/commit/e86db34dd3b43dc9c9beb21a82cd2c3b7c4c05df


--

___
Python tracker 

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



[issue32394] socket lib beahavior change in 3.6.4

2018-02-03 Thread Ma Lin

Change by Ma Lin :


--
pull_requests: +5352

___
Python tracker 

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



[issue32746] More misspellings, mostly in source code.

2018-02-03 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +5351

___
Python tracker 

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



[issue27923] PEP 467 -- Minor API improvements for binary sequences

2018-02-03 Thread INADA Naoki

INADA Naoki  added the comment:

Hmm, can you read this instead?
https://github.com/python/devguide/blob/master/communication.rst

--

___
Python tracker 

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



[issue32746] More misspellings, mostly in source code.

2018-02-03 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5350

___
Python tracker 

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



[issue32746] More misspellings, mostly in source code.

2018-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset c3d9508ff22ece9a96892b628dd5813e2fb0cd80 by Terry Jan Reedy (Leo 
Arias) in branch 'master':
bpo-32746: Fix multiple typos (GH-5144)
https://github.com/python/cpython/commit/c3d9508ff22ece9a96892b628dd5813e2fb0cd80


--

___
Python tracker 

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



[issue32216] Document PEP 557 Data Classes (dataclasses module)

2018-02-03 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> I'd be interested to help write the PR for this.

I've already started on drafting these docs.  Would you like to work together?

--
nosy: +rhettinger

___
Python tracker 

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



[issue32739] collections.deque rotate(n=1) default value not documented

2018-02-03 Thread Raymond Hettinger

Change by Raymond Hettinger :


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

___
Python tracker 

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



Re: Fwd: Syntax error

2018-02-03 Thread Terry Reedy

On 2/3/2018 3:38 PM, bob gailer wrote:

On 2/3/2018 2:40 PM, Terry Reedy wrote:

On 2/3/2018 2:10 PM, Kevin Doney wrote:

Hi.

*pip3 install --upgrade tensorflow-gpu*

When I try the above command I get
SyntaxError: invalid syntax


Please help.


This group helps those who help the group -- by asking questions with 
sufficient information to answer.  Post the ENTIRE trackback.

It also helps us to know:
operating system (e.g., windows 10)
what does "when I try" mean? (e.g. at a windows command prompt I entered 
...)

What the *'s are for
best is to copy the entire session and paste it into your email. Example


I entirely agree.


Microsoft Windows [Version 10.0.16299.192]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\bgailer>pip install foo
Collecting foo
   Could not find a version that satisfies the requirement foo (from 
versions: )

No matching distribution found for foo

We could presume in your case that you tried to enter your pip command 
in a python interactive session.


This is a good guess, and I hope it is correct, because the alternative 
of a SyntaxError in some execution path in pip or dependency or python 
stdlib module or package being installed is worse.



For example:

C:\Users\bgailer>python
Python 3.3.5 (v3.3.5:62cf4e77f785, Mar  9 2014, 10:35:05) [MSC v.1600 64 
bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.
 >>> pip install foo
   File "", line 1
     pip install foo
   ^
SyntaxError: invalid syntax
 >>>

Why did you get that response? Because pip is not a python statement 
(python does not have commands); it is an executable program. So you 
need to use a command prompt or terminal.






--
Terry Jan Reedy


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


[issue32761] IDLE Keymap for Cntl-A

2018-02-03 Thread Raymond Hettinger

New submission from Raymond Hettinger :

The default keymap for Cntl-A should be , the same as 
Cntl-KeyLeft.   This is consistent with how Cntl-A behaves at the bash prompt 
and in Emacs.

>>> print('Hello World')
^--- Cntl-A should take you here
^--- Cntl-A currently takes you here (which is never helpful).

--
assignee: terry.reedy
components: IDLE
messages: 311575
nosy: rhettinger, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE Keymap for Cntl-A

___
Python tracker 

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



[issue32739] collections.deque rotate(n=1) default value not documented

2018-02-03 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset 42e8ea9f69c133a4bbb9e496f68a05926b99c2da by Raymond Hettinger in 
branch '2.7':
bpo-32739: Show default value for rotate() (GH-5517)
https://github.com/python/cpython/commit/42e8ea9f69c133a4bbb9e496f68a05926b99c2da


--

___
Python tracker 

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



[issue32759] multiprocessing.Array do not release shared memory

2018-02-03 Thread OO O

OO O  added the comment:

mp.heap.BufferWrapper._heap = mp.heap.Heap ()
gc.collect ()

This is working!! The memory is cleared.
Just delete the globe _heap and recreate a new one, but is the the correct 
way???

--

___
Python tracker 

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



[issue32759] multiprocessing.Array do not release shared memory

2018-02-03 Thread OO O

Change by OO O :


--
versions: +Python 3.5

___
Python tracker 

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



[issue32739] collections.deque rotate(n=1) default value not documented

2018-02-03 Thread Raymond Hettinger

Change by Raymond Hettinger :


--
pull_requests: +5349

___
Python tracker 

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



[issue32760] [Python Shell command issue]

2018-02-03 Thread JamesDinh

New submission from JamesDinh :

Hi Python dev. team,

I would like to report below error:
1) Tittle: Running Linux shell command from python file always leads to reset 
config error.

2) Environment:
+ Linux distro: Both Ubuntu 16.04 64b and Fedora 25 happen this issue
+ Python:
Python 2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609] on linux2

3) Reproduce route:
These commands can be run normally from Linux terminal:
[I use buildroot for my embedded project]
./configure O=output project_name debug initramfs nofirewall
make O=output

But when I tried to call them from Python file, the configure command always 
lead to Restart config... - and all the new configuration values are discarded.

For your information, I tried these options:
a) 
spkConfigureCmd = ["./configure","O=output", 
"project_name","debug","initramfs","nofirewall"]
subprocess.check_call(spkConfigureCmd)
spkBuildCmd = ["make","O=output"]
subprocess.check_call(spkBuildCmd)

b) os.system("./configure O=output project_name debug initramfs nofirewall && 
make O=output")

c)
fid = open('ax2spkbuild.sh','w')
fid.write('./configure O=output project_name debug initramfs nofirewall\n')
fid.write('make O=output\n')
fid.close()
os.system('chmod +x ax2spkbuild.sh')
os.system('./ax2spkbuild.sh')

Actually I tried with another simple command like 'pwd', 'cat', 'echo' and they 
are working well. I wonder how come Python executes the Linux shell commands, 
which are slightly different to the Terminal typed commands.

--
components: Build
messages: 311572
nosy: JamesDinhBugPython
priority: normal
severity: normal
status: open
title: [Python Shell command issue]
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue32759] multiprocessing.Array do not release shared memory

2018-02-03 Thread OO O

New submission from OO O :

OS: Win10 / 8.1
Python: 3.5 / 3.6

My program use mp.Array to share huge data.
But suffer from out of memory after running for a while. 

But Windows task manager didn't show which process use that huge memory. And I 
use pympler to check my python memory usage. Still shows noting. So, I use 
RamMap to check, it shows a huge shared memory is used.

I can reproduce the case by the simple test code:
   #---
   import numpy as np
   import multiprocessing as mp
   import gc

   def F ():
   a = mp.Array ( 'I', 18, lock = False )

   #
   F ()
   gc.collect ()
   #---

No matter how hard I tried. the memory is not released.
I put what I tried in the attachment picture.

--
components: Windows
files: result.jpg
messages: 311571
nosy: OO O, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: multiprocessing.Array do not release shared memory
type: resource usage
versions: Python 3.6
Added file: https://bugs.python.org/file47424/result.jpg

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2018-02-03 Thread pmpp

Change by pmpp :


--
nosy: +pmpp

___
Python tracker 

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



Re: Fwd: Syntax error

2018-02-03 Thread bob gailer

On 2/3/2018 2:40 PM, Terry Reedy wrote:

On 2/3/2018 2:10 PM, Kevin Doney wrote:

Hi.

*pip3 install --upgrade tensorflow-gpu*

When I try the above command I get
SyntaxError: invalid syntax


Please help.


This group helps those who help the group -- by asking questions with 
sufficient information to answer.  Post the ENTIRE trackback.

It also helps us to know:
operating system (e.g., windows 10)
what does "when I try" mean? (e.g. at a windows command prompt I entered 
...)

What the *'s are for
best is to copy the entire session and paste it into your email. Example

Microsoft Windows [Version 10.0.16299.192]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\bgailer>pip install foo
Collecting foo
  Could not find a version that satisfies the requirement foo (from 
versions: )

No matching distribution found for foo

We could presume in your case that you tried to enter your pip command 
in a python interactive session. For example:


C:\Users\bgailer>python
Python 3.3.5 (v3.3.5:62cf4e77f785, Mar  9 2014, 10:35:05) [MSC v.1600 64 
bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.
>>> pip install foo
  File "", line 1
    pip install foo
  ^
SyntaxError: invalid syntax
>>>

Why did you get that response? Because pip is not a python statement 
(python does not have commands); it is an executable program. So you 
need to use a command prompt or terminal.



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


Re: This newsgroup (comp.lang.python) may soon be blocked by Google Groups

2018-02-03 Thread alister via Python-list
On Sun, 04 Feb 2018 06:49:57 +1100, Chris Angelico wrote:

> On Sun, Feb 4, 2018 at 6:34 AM, Mark Lawrence 
> wrote:
>> On 03/02/18 17:56, Peter J. Holzer wrote:
>>> You seem to confuse the mailing-list and the newsgroup. The
>>> mailing-list doesn't have a spam problem, and it is already (lightly)
>>> moderated.
>>>
>>> The newsgroup does have a spam problem (as well as a few other
>>> problems,
>>> like gmane mangling message-ids and breaking threads). Google groups
>>> is an interface to the newsgroup.
>>>
>>> There is a bi-directional gateway between them, but they aren't the
>>> same thing.
>>>
>>>  hp
>>>
>>>
>> No, they are one and the same thing, except that this is automatically
>> blocked by the numpty moderators, whereas some things that I state on
>> gg are passed, other things aren't.  It is quite clear that the
>> moderators are biased against people such as myself who are autistic
> 
> No, the moderators are biased against people who are constantly rude.
> Did you know that, autistic or not, you have the power to choose the
> tone of the words you type?
> 
> ChrisA

indeed my son is mildly autistic. I always explained to him that that 
diagnosis did not give him an excuse, it simply gave him an explanation 
of why things were harder for him.


-- 
If it's worth doing, it's worth doing for money.
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2018-02-03 Thread Zachary Ware

Change by Zachary Ware :


--
pull_requests: +5348

___
Python tracker 

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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Groups

2018-02-03 Thread Chris Angelico
On Sun, Feb 4, 2018 at 6:34 AM, Mark Lawrence  wrote:
> On 03/02/18 17:56, Peter J. Holzer wrote:
>> You seem to confuse the mailing-list and the newsgroup. The mailing-list
>> doesn't have a spam problem, and it is already (lightly) moderated.
>>
>> The newsgroup does have a spam problem (as well as a few other problems,
>> like gmane mangling message-ids and breaking threads). Google groups is
>> an interface to the newsgroup.
>>
>> There is a bi-directional gateway between them, but they aren't the same
>> thing.
>>
>>  hp
>>
>
> No, they are one and the same thing, except that this is automatically
> blocked by the numpty moderators, whereas some things that I state on gg are
> passed, other things aren't.  It is quite clear that the moderators are
> biased against people such as myself who are autistic

No, the moderators are biased against people who are constantly rude.
Did you know that, autistic or not, you have the power to choose the
tone of the words you type?

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


Re: Fwd: Syntax error

2018-02-03 Thread Terry Reedy

On 2/3/2018 2:10 PM, Kevin Doney wrote:

Hi.

*pip3 install --upgrade tensorflow-gpu*

When I try the above command I get
SyntaxError: invalid syntax


Please help.


This group helps those who help the group -- by asking questions with 
sufficient information to answer.  Post the ENTIRE trackback.



--
Terry Jan Reedy

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


Re: This newsgroup (comp.lang.python) may soon be blocked by Google Groups

2018-02-03 Thread Mark Lawrence

On 03/02/18 17:56, Peter J. Holzer wrote:

On 2018-02-03 04:33:36 -0800, breamore...@gmail.com wrote:

On Thursday, February 1, 2018 at 5:01:58 PM UTC, superchromix wrote:

Our own programming discussion newsgroup, located at
comp.lang.idl-pvwave, started receiving spam messages several months
ago.

Two weeks ago, access to comp.lang.idl-pvwave was blocked by Google
Groups.

[...]

Seeing the spam postings in this newsgroup, I expect something
similar may happen to comp.lang.python, soon.


That's no big deal as this list used to have a wonderful signal to
noise ratio, now it would be better to report the noise to signal
ratio.  I've just finished flagging up 45 consecutive messages on the
group as spam, all of them from today and all of them from the "Case
Solutions" crew.

The downside of this list being blocked is that you'd all no doubt
miss my wonderful contributions :)  Unless of course a new list is
opened, properly moderated, with a really original name like
python-users.


You seem to confuse the mailing-list and the newsgroup. The mailing-list
doesn't have a spam problem, and it is already (lightly) moderated.

The newsgroup does have a spam problem (as well as a few other problems,
like gmane mangling message-ids and breaking threads). Google groups is
an interface to the newsgroup.

There is a bi-directional gateway between them, but they aren't the same
thing.

 hp



No, they are one and the same thing, except that this is automatically 
blocked by the numpty moderators, whereas some things that I state on gg 
are passed, other things aren't.  It is quite clear that the moderators 
are biased against people such as myself who are autistic


My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

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


Fwd: Syntax error

2018-02-03 Thread Kevin Doney
Hi.

*pip3 install --upgrade tensorflow-gpu*

When I try the above command I get
SyntaxError: invalid syntax


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


[issue32758] Stack overflow when parse long expression to AST

2018-02-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

There is also a regression in 3.7 when compile a long expression.

In 3.6:

>>> compile('+a'*100, '?', 'eval')
Traceback (most recent call last):
  File "", line 1, in 
RecursionError: maximum recursion depth exceeded during compilation

In 3.7:

>>> compile('+a'*100, '?', 'eval')
Segmentation fault (core dumped)

--

___
Python tracker 

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



[issue32739] collections.deque rotate(n=1) default value not documented

2018-02-03 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset 7eb3d1e7da42112ba879a5f8602891fa17963f9e by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.6':
bpo-32739: Show default value for rotate() (GH-5485) (GH-5515)
https://github.com/python/cpython/commit/7eb3d1e7da42112ba879a5f8602891fa17963f9e


--

___
Python tracker 

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



[issue32758] Stack overflow when parse long expression to AST

2018-02-03 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

Python 2 can crash when compile long expression. 

>>> x = eval('""' + '+chr(33)'*10)
Segmentation fault (core dumped)

This was fixed in Python 3. RecursionError is raised now.

>>> x = eval('""' + '+chr(33)'*10)
Traceback (most recent call last):
  File "", line 1, in 
RecursionError: maximum recursion depth exceeded during compilation
>>> x = eval('+chr(33)'*100)
Traceback (most recent call last):
  File "", line 1, in 
RecursionError: maximum recursion depth exceeded during compilation

But compiling to AST still can crash.

>>> import ast
>>> x = ast.parse('+chr(33)'*100)
Segmentation fault (core dumped)

--
components: Interpreter Core
messages: 311568
nosy: benjamin.peterson, brett.cannon, ncoghlan, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: Stack overflow when parse long expression to AST
type: crash
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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Groups

2018-02-03 Thread Peter J. Holzer
On 2018-02-03 04:33:36 -0800, breamore...@gmail.com wrote:
> On Thursday, February 1, 2018 at 5:01:58 PM UTC, superchromix wrote:
> > Our own programming discussion newsgroup, located at
> > comp.lang.idl-pvwave, started receiving spam messages several months
> > ago.
> > 
> > Two weeks ago, access to comp.lang.idl-pvwave was blocked by Google
> > Groups.  
[...]
> > Seeing the spam postings in this newsgroup, I expect something
> > similar may happen to comp.lang.python, soon.
> 
> That's no big deal as this list used to have a wonderful signal to
> noise ratio, now it would be better to report the noise to signal
> ratio.  I've just finished flagging up 45 consecutive messages on the
> group as spam, all of them from today and all of them from the "Case
> Solutions" crew.
> 
> The downside of this list being blocked is that you'd all no doubt
> miss my wonderful contributions :)  Unless of course a new list is
> opened, properly moderated, with a really original name like
> python-users.

You seem to confuse the mailing-list and the newsgroup. The mailing-list
doesn't have a spam problem, and it is already (lightly) moderated.

The newsgroup does have a spam problem (as well as a few other problems,
like gmane mangling message-ids and breaking threads). Google groups is
an interface to the newsgroup.

There is a bi-directional gateway between them, but they aren't the same
thing.

hp

-- 
   _  | Peter J. Holzer| we build much bigger, better disasters now
|_|_) || because we have much more sophisticated
| |   | h...@hjp.at | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson 


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue20632] Define a new __key__ protocol

2018-02-03 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I wonder if this would make sense as a parameter to dataclass now.

--
nosy: +csabella
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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Groups

2018-02-03 Thread breamoreboy
On Thursday, February 1, 2018 at 5:01:58 PM UTC, superchromix wrote:
> Our own programming discussion newsgroup, located at comp.lang.idl-pvwave, 
> started receiving spam messages several months ago.
> 
> Two weeks ago, access to comp.lang.idl-pvwave was blocked by Google Groups.  
> 
> When trying to access comp.lang.idl-pvwave, a message is now displayed, 
> stating that the group owner needs to remove the spam, and can then apply to 
> Google in order to have access reinstated.
> 
> However, old public Usenet groups like this have no owner.  The 
> comp.lang.idl-pvwave group is more than 20 years old.  Hence, there is no way 
> to unblock the group.
> 
> This is a serious problem, since the entire collection of postings going back 
> many years has been blocked, no just the spam.  This resource is frequently 
> used by IDL programmers.
> 
> Seeing the spam postings in this newsgroup, I expect something similar may 
> happen to comp.lang.python, soon.

That's no big deal as this list used to have a wonderful signal to noise ratio, 
now it would be better to report the noise to signal ratio.  I've just finished 
flagging up 45 consecutive messages on the group as spam, all of them from 
today and all of them from the "Case Solutions" crew.

The downside of this list being blocked is that you'd all no doubt miss my 
wonderful contributions :)  Unless of course a new list is opened, properly 
moderated, with a really original name like python-users.

--
Kindest regards.

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


[issue31356] Add context manager to temporarily disable GC

2018-02-03 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Nick and Raymond: do you remember what our original motivating use cases were 
for this idea during the sprint?

--

___
Python tracker 

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



[issue32227] singledispatch support for type annotations

2018-02-03 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Hello,

I believe this could be closed as resolved?  Do you think it should be added to 
the What's New? page for 3.7?

--
nosy: +csabella

___
Python tracker 

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



[issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function

2018-02-03 Thread hadimene

hadimene  added the comment:

the comments lines are not needed !

--

___
Python tracker 

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



[issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function

2018-02-03 Thread hadimene

hadimene  added the comment:

Hello !

Thanks for the fast response but I tested and print() appears to be vulnerable 
too using chr() characters and yes the junk comments are useless ...

--
Added file: https://bugs.python.org/file47423/poc-print.py

___
Python tracker 

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



[issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function

2018-02-03 Thread Josh Rosenberg

Josh Rosenberg  added the comment:

A server that exposes arbitrary exec's to user-submitted data can already be 
controlled. exec can do anything that Python can do, that's the whole point. 
Sure, crashing Python is bad, but it could also keep Python alive and start 
dumping the database to arbitrary people, deleting files, etc.

Also, your Proof of Concept code is cluttered with pointless garbage AFAICT. Do 
you really need all the unused multiline strings to trigger this?

--
nosy: +josh.r

___
Python tracker 

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



[issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function

2018-02-03 Thread hadimene

New submission from hadimene :

Hello !

Recently while debugging my python code I discovered an stack-based Buffer 
overflow Vulnerability in Python 2.7 and lower versions .
This vulnerability is caused by exec() builtin function when we create 
"recursive" function using exec() ...

Example :
We want to Print "hello World !" str and we encode print "hello world" ) using 
chr() or unichr()

print "hello World " 

becomes

exec(chr(112)+chr(114)+chr(105)+chr(110)+chr(116)+chr(40)+chr(39)+chr(104)+chr(101)+chr(108)+chr(108)+chr(111)+chr(32)+chr(119)+chr(111)+chr(114)+chr(108)+chr(100)+chr(32)+chr(33)+chr(32)+chr(39)+chr(41)+chr(10)+chr(35))

and if we re-encode the result : exec() the result would be

exec(chr(101)+chr(120)+chr(101)+chr(99)+chr(40)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(50)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(52)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(53)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(48)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(54)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(52)+chr(48)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(57)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(52)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(49)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(56)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(56)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(49)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(50)+chr(41)+chr(43)+chr(99)+chr(
 
104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(57)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(49)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(52)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(56)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(48)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(50)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(51)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(50)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(57)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(52)+chr(49)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(53)+chr(41)+chr(41)+chr(35))

If you do this manipulation 6-7 times and you run the encoded script then the 
Python Interpreter program will crash with a Segmentation Fault as error :
(https://lepetithacker.files.wordpress.com/2018/01/capture-dc3a9cran-2018-01-31-191359.png)

We can check the Segmentation Fault using gdb ( GNU Debugger ) 
https://lepetithacker.files.wordpress.com/2018/01/capture-dc3a9cran-2018-01-31-202241.png
 )

To get an Segmentation Fault error you can just run poc.py !

Conclusion

In my opinion , to patch this vulnerability developers need to give more 
memory/buffer to the exec() arguments , and verify if the buffer can contains 
exec() arguments in integrality without any overflow !
An attacker could control the memory of an server written in python if the 
builtin function exec() is used and python version i of the server is 2.7 or 
lower (every version of python2 could be vulnerable like Python 2.9 but I 
didn't tried yet )

--
components: Interpreter Core
files: poc.py
messages: 311561
nosy: hadimene
priority: normal
severity: normal
status: open
title: Python 2.7 : Buffer Overflow vulnerability in exec() function
type: security
versions: Python 2.7
Added file: https://bugs.python.org/file47422/poc.py

___
Python tracker 

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



[issue32739] collections.deque rotate(n=1) default value not documented

2018-02-03 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset 52f745852e49498d7dd86fd309ae57f6a7af568f by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.7':
bpo-32739: Show default value for rotate() (GH-5485) (GH-5514)
https://github.com/python/cpython/commit/52f745852e49498d7dd86fd309ae57f6a7af568f


--

___
Python tracker 

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



[issue32739] collections.deque rotate(n=1) default value not documented

2018-02-03 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5346

___
Python tracker 

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



[issue32739] collections.deque rotate(n=1) default value not documented

2018-02-03 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset 589c718a8e3bde017350f248f7f1c009240eb52b by Raymond Hettinger in 
branch 'master':
bpo-32739: Show default value for rotate() (GH-5485)
https://github.com/python/cpython/commit/589c718a8e3bde017350f248f7f1c009240eb52b


--

___
Python tracker 

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



Re: This newsgroup (comp.lang.python) may soon be blocked by Google Groups

2018-02-03 Thread pyotr filipivich
breamore...@gmail.com on Sat, 3 Feb 2018 04:33:36 -0800 (PST) typed in
comp.lang.python  the following:
>On Thursday, February 1, 2018 at 5:01:58 PM UTC, superchromix wrote:
>> Our own programming discussion newsgroup, located at comp.lang.idl-pvwave, 
>> started receiving spam messages several months ago.
>> 
>> Two weeks ago, access to comp.lang.idl-pvwave was blocked by Google Groups.  
>> 
>> When trying to access comp.lang.idl-pvwave, a message is now displayed, 
>> stating that the group owner needs to remove the spam, and can then apply to 
>> Google in order to have access reinstated.
>> 
>> However, old public Usenet groups like this have no owner.  The 
>> comp.lang.idl-pvwave group is more than 20 years old.  Hence, there is no 
>> way to unblock the group.
>> 
>> This is a serious problem, since the entire collection of postings going 
>> back many years has been blocked, no just the spam.  This resource is 
>> frequently used by IDL programmers.
>> 
>> Seeing the spam postings in this newsgroup, I expect something similar may 
>> happen to comp.lang.python, soon.
>
>That's no big deal as this list used to have a wonderful signal to noise 
>ratio, now it would be better to report the noise to signal ratio.  I've just 
>finished flagging up 45 consecutive messages on the group as spam, all of them 
>from today and all of them from the "Case Solutions" crew.

So you just indicated that of N postings, 45 different ones were
spam?   Rather than indicate that one poster of N is a spammer?

I know, Google doesn't let you filter posts on author, and make
specific authors or subjects to be ignored.   
And their search engine is a joke.


>The downside of this list being blocked is that you'd all no doubt miss my 
>wonderful contributions :)  Unless of course a new list is opened, properly 
>moderated, with a really original name like python-users.

Those of us who do not use google-groups may not notice the loss
of the google groupies.


-- 
pyotr filipivich
Next month's Panel: Graft - Boon or blessing?
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32739] collections.deque rotate(n=1) default value not documented

2018-02-03 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5347

___
Python tracker 

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



[issue30300] asyncio.Controller

2018-02-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

There doesn't seem to be much appetite for this in the stdlib, so closing.  
It'll just have to live in a third party module.

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



[issue32107] Improve MAC address calculation and fix test_uuid.py

2018-02-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

I think this issue is resolved, right?  Closing.  Please reopen if there's 
anything left to do.

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

___
Python tracker 

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



[issue27923] PEP 467 -- Minor API improvements for binary sequences

2018-02-03 Thread amirjn

amirjn  added the comment:

We got same problem at https://www.blogs.va.gov/ 
can any one help?

--

___
Python tracker 

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



[issue30109] make reindent failed.

2018-02-03 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

Thanks for the ping. Almost forgotten about this issue.

This can't be cherry-picked cleanly. I need to first backport the new testcase 
to 2.7, and see if it passes. If the test failed in 2.7 then I need to work on 
actually backporting the change.

I should have time to do it later tonight.

Thanks.

--

___
Python tracker 

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



[issue32680] smtplib SMTP instances missing a default sock attribute

2018-02-03 Thread amirjn

amirjn  added the comment:

apple.com

--

___
Python tracker 

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



[issue32680] smtplib SMTP instances missing a default sock attribute

2018-02-03 Thread amirjn

amirjn  added the comment:

same problem at apple.com

--
nosy: +amirjn

___
Python tracker 

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



[issue30109] make reindent failed.

2018-02-03 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Does this just need to be cherry-picked to 2.7 to be able to close it?

--
nosy: +csabella

___
Python tracker 

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



[issue3177] Add shutil.open

2018-02-03 Thread amirjn

amirjn  added the comment:

same problem here

--

___
Python tracker 

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



[issue27923] PEP 467 -- Minor API improvements for binary sequences

2018-02-03 Thread amirjn

amirjn  added the comment:

i didnt find anything at http://devguide.python.org/communication/

--
nosy: +amirjn

___
Python tracker 

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



[issue3177] Add shutil.open

2018-02-03 Thread amirjn

amirjn  added the comment:

same problem here

--
nosy: +amirjn

___
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-02-03 Thread Michelle Konzack
Hello peter and *,

Am 2018-02-03 hackte Peter J. Holzer in die Tasten:
> On 2018-01-29 19:14:57 +0100, Michelle Konzack wrote:
>> Am 2018-01-29 hackte Dan Stromberg in die Tasten:
>> > I don't see blueman on pypi, so this is probably part of the package
>> > you downloaded, and not something you need to "pip3 install".
>>
>> I have Python 2.7 and 3.5 from the Debian GNU/Linux repository installed
>> I use the Stable (Stretch) version.
>>
>> Installing blueman 2.0.4 (for Python 2.7) ended with a SEGFAULT.
>
> How did you install this? When I install blueman-2.0.4-1 from the Debian
> Stretch (i386) apt repository, it uses Python3:
>
> hjp  16620  2.0  0.5 110192 44316 pts/24   Sl+  11:40   0:00
> /usr/bin/python3 /usr/bin/blueman-applet
>
> And it seems to work (the icon shows up in the task bar and I can open
> the menu. I don't have any bluetooth hardware on my desktop, so I can't
> test that).
>
> A segfault is probably caused by a library, not by Python. If you got
> blueman from the Debian repository, report the problem at
> https://bugs.debian.org
>
>> Hence I downloaded the sources 2.1~alpha2 from the Experimantal Mirror,
>> comiled and packed it as Backport.
>>
>> Anything went fine, except, if I execute /usr/bin/blueman-applet it
>> does not find the path to blueman which is in
>>
>> /usr/lib/python-3.5/site-packages
>>
>> as subdirectory "bluman".
>
> This looks like a packaging error. AFAICS python3 packages on Debian are
> normally installed directly under /usr/lib/python3.5, not under
> /usr/lib/python-3.5/site-packages or /usr/lib/python-3.5/dist-packages
> (although the latter is on sys.path). Unless you have modified this
> yourself, please report it to Debian.

I do not know what was in the experimental sources, but it seems a
make clean has removed something and when I recompiled the package,
it was correctly working.

However, I use xorg, fvwm, trayer, blueman-applet like pasystray and
was searchin the whole internet to solv this problem. Had installed
and deinstalled packages and now it is magicaly working.

Now I have to figure out, which of the packages pulled a missing
dependency into the system.

It is sad, that only monsters like KGE (it would install 1,8GByte
on my system) and GNOME have all the right dependencies.

But if you install something like

debian base
alsa
xorg
wdm
fvwm
vlc
trayer
blueman
pasystray

nothing is working!  I think the above packages should install a
working system!

Now I have to figure out, WHY ALSA is working (pasystray show it)
but there is no sound coming out of the speakers.

I say only:  "Welcome to the dependeny hell!"

Thanks in avance

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

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


[issue32756] argparse: parse_known_args: raising exception on unknown arg following known one

2018-02-03 Thread Yauhen

Yauhen  added the comment:

It was a mistake in expected result, should be:

$ python arparse_test.py -ab -c
Namespace(a=True)
['-b', '-c']

--

___
Python tracker 

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



[issue32493] UUID Module - FreeBSD build failure

2018-02-03 Thread David CARLIER

David CARLIER  added the comment:

Probably. Seems workable under Apple otherwise.

--

___
Python tracker 

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



[issue32756] argparse: parse_known_args: raising exception on unknown arg following known one

2018-02-03 Thread Yauhen

New submission from Yauhen :

steps to reproduce:

import argparse
import sys

parser = argparse.ArgumentParser(prog=sys.argv[0], add_help=False)
parser.add_argument('-a', action='store_true')
parsed_args, unknown_args = parser.parse_known_args(sys.argv[1:])
print(parsed_args)
print(unknown_args)


Expected result:

$ python arparse_test.py -ab
Namespace(a=True)
['b']


Actual result:

$ python arparse_test.py -ab
usage: arparse_test.py [-a]
arparse_test.py: error: argument -a: ignored explicit argument 'b'

--
components: Library (Lib)
messages: 311546
nosy: actionless
priority: normal
pull_requests: 5345
severity: normal
status: open
title: argparse: parse_known_args: raising exception on unknown arg following 
known one
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



Re: auto-correct a speech-to-text output and relate to of the words based on syllables

2018-02-03 Thread Peter J. Holzer
On 2018-02-03 09:34:57 +0100, dieter wrote:
> Steven D'Aprano  writes:
> > On Fri, 02 Feb 2018 08:14:03 +0100, dieter wrote:
> >>> The user speaks "Light". The system translates it as "Bright" The user
> >>> speaks "White" The system translates it as "Bright"
> >> 
> >> As those words are phonetically quite apart (they have very different
> >> first consonants), some step in your processing chain does something
> >> seriously wrong.
> >
> > I disagree: Light, Bright and White sound very similar. They're identical 
> > except for the first consonant:
> 
> We have here an example that the first consonant can significantly
> influence the meaning.
> As a consequence, it will in general be spoken and affect the sound.

It will affect the sound, but not the same for every speaker. Since you
have a German mail address, consider how differently "Chemie" is
pronounced in German depending on which part of Germany you are from.
Now consider someone speaking with a French or Indian or Chinese
accent. Different languages have different phonemes, and humans
generally learn to distinguish between them (and to disregard variances)
in the first years.

> And obviously, I should not be ignored when one is interested in
> a narrow match.

The difficulty is to *recognise* it correctly. Was that tangle of sound
waves an "l" or an "r"? This not as unambiguous as you seem to think.
So a speech-to-text program may hear "right" when the speaker was really
saying "light". If you have only the output from that program you must
determine whether "right" is correct or must be corrected to "light".

hp

-- 
   _  | Peter J. Holzer| we build much bigger, better disasters now
|_|_) || because we have much more sophisticated
| |   | h...@hjp.at | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson 


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: 2.6.7: Does socket.gethostbyaddr truncate?

2018-02-03 Thread Peter J. Holzer
On 2018-01-30 08:56:16 -0800, Dan Stromberg wrote:
> dig -x should return a single PTR in all cases, shouldn't it?

No. dig -x should return *all* PTR records. There is usually at most one
of them, but there may be several. (46 seems a bit much, but there
really isn't any limit).

> What IP are you using?

Yup. I want to see an address with 46 PTR records, too ;-).

> On Tue, Jan 30, 2018 at 4:05 AM, Antoon Pardon  wrote:
> > I am using python 2.6.7 to do a little network programming, but it seems I 
> > don't
> > get all the results.
> >
> > When I call socket.gethostbyaddr(IP) entry [1] of the result is a list of 
> > 34 addresses.

gethostbyaddr just calls the underlying C library function. It is
possibly that this has a limit (either on the number of names or more
likely on the packet size).

hp

-- 
   _  | Peter J. Holzer| we build much bigger, better disasters now
|_|_) || because we have much more sophisticated
| |   | h...@hjp.at | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson 


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2018-02-03 Thread eryk sun
On Fri, Feb 2, 2018 at 6:28 PM, Gilmeh Serda
 wrote:
>
> M$'s excuse for a real Terminal, "Power" Shell (sigh), is _slightly_
> better but still lacking lots of features. Like a decent scripting
> language. I loath VBS. ¦þ,,, /puke

PowerShell is a .NET scripting language that's available in Windows,
Linux, and MacOS. VBScript is an unrelated scripting language that was
more commonly used on Windows before PowerShell came along. On
Windows, powershell.exe either allocates a console or inherits one
from its parent.

The Windows console adapts the message-based desktop environment to
support command-line applications. It provides an input stream with
keyboard and mouse records, and screen buffers that support UCS-2 and
a 16-color palette. In Windows 10, it also functions as a virtual
terminal with 24-bit color.

In Windows 7 and up, each console is hosted by a separate instance of
conhost.exe. Previously, NT systems hosted consoles in the system
process, csrss.exe.

In Windows 8 and up, the console API uses the ConDrv device for IPC
with an attached console. Previously, NT systems used LPC ports and
shared memory for this.

In Windows 9x, the console window was hosted by conagent.exe, and the
API used the VCOND device for IPC.

Despite the ever-changing implementation details, the console API
itself has been relatively stable for about 25 years.

> It does have mouse selection (but still treats the text as a block of
> characters, like a DOS box, and not lines of text, like Terminal)

In Windows 10, the console uses line-wrapping selection by default,
and rectangle selection requires holding ALT.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: New to Python and understanding problem

2018-02-03 Thread Peter J. Holzer
On 2018-01-29 19:14:57 +0100, Michelle Konzack wrote:
> Am 2018-01-29 hackte Dan Stromberg in die Tasten:
> > I don't see blueman on pypi, so this is probably part of the package
> > you downloaded, and not something you need to "pip3 install".
> 
> I have Python 2.7 and 3.5 from the Debian GNU/Linux repository installed
> I use the Stable (Stretch) version.
> 
> Installing blueman 2.0.4 (for Python 2.7) ended with a SEGFAULT.

How did you install this? When I install blueman-2.0.4-1 from the Debian
Stretch (i386) apt repository, it uses Python3:

hjp  16620  2.0  0.5 110192 44316 pts/24   Sl+  11:40   0:00 
/usr/bin/python3 /usr/bin/blueman-applet

And it seems to work (the icon shows up in the task bar and I can open
the menu. I don't have any bluetooth hardware on my desktop, so I can't
test that).

A segfault is probably caused by a library, not by Python. If you got
blueman from the Debian repository, report the problem at
https://bugs.debian.org

> Hence I downloaded the sources 2.1~alpha2 from the Experimantal Mirror,
> comiled and packed it as Backport.
> 
> Anything went fine, except, if I execute /usr/bin/blueman-applet it
> does not find the path to blueman which is in
> 
> /usr/lib/python-3.5/site-packages
> 
> as subdirectory "bluman".

This looks like a packaging error. AFAICS python3 packages on Debian are
normally installed directly under /usr/lib/python3.5, not under
/usr/lib/python-3.5/site-packages or /usr/lib/python-3.5/dist-packages
(although the latter is on sys.path). Unless you have modified this
yourself, please report it to Debian.

hp

-- 
   _  | Peter J. Holzer| we build much bigger, better disasters now
|_|_) || because we have much more sophisticated
| |   | h...@hjp.at | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson 


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32729] socket error handling needed

2018-02-03 Thread yang

yang  added the comment:

Oh.. you are right. 
I think it's my bug. here is code
```
import urllib3
import certifi
from functools import wraps
import signal
from urllib3 import Timeout


def timeoutdec(sec):
def decorator(func):
def _timeout(signum, frame):
raise TimeoutError()

@wraps(func)
def wrapper(*args, **kwargs):
signal.signal(signal.SIGALRM, _timeout)
signal.alarm(sec)
try:
result = func(*args, **kwargs)
finally:
signal.alarm(0)
return result
return wrapper
return decorator


@timeoutdec(2)
def for_test():
timeout = Timeout(connect=10.0, read=2.0)
url = 'http://httpbin.org/delay/7'
method = 'GET'
body = None
headers = None
http = urllib3.PoolManager(timeout=timeout,
   cert_reqs='CERT_REQUIRED',
   ca_certs=certifi.where())
while True:
response = http.urlopen(method, url,
body=body,
headers=headers,
preload_content=True)

print(response.data)


for_test()

```

here is the code that i got same traceback.

maybe the TimeoutError is raised from my code, timeoutdec().

I thought it was python bug. sorry for bothering you.


and I will close my PR-32729.

--

___
Python tracker 

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



Re: What is django-hotsauce?

2018-02-03 Thread Etienne Robillard
Django-hotsauce is a Python-powered library for pragmatic hackers 
looking to exploit django with JIT.


A commercial edition is also available for pre-order: 
https://www.livestore.ca/product/django-hotsauce/



Cheers,

Etienne


Le 2018-02-02 à 10:02, Alexandre Brault a écrit :

So it's a buzzword generator?

Alex


On 2018-02-02 04:17 AM, Etienne Robillard wrote:

About Django-hotsauce:

Scalable and high-performance WSGI microframework on top of Django and
others: Django-hotsauce is the ultimate web development toolkit for
rogue Python hackers and chronic weed users looking to build porn web
sites in your mama basement! :)

Typically used for advanced training of slackers, hackers, and
unemployed people bored with life and looking to learn Schevo DBMS on
PyPy. :)

I think django-hotsauce is a great Python library for
research/educational and experimental purpose.

In specific, it is interesting to break Django ORM and use ZODB to
develop your own models api...

Anyways, have fun hacking django-hotsauce with PyPy.

Hacking life is essential to happiness... :)

Pragmatic hackers love to learn rogue ways to exploit Django api with
JIT and PyPy. ;)

cheers,

Etienne






--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

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


[issue32755] Several cookies with the same name get intermixed

2018-02-03 Thread Юрий Пухальский

New submission from Юрий Пухальский :

I'm using python 3.5.4.
The site gives me two headers:

I'm using aiohttp that iterates the headers and if it's set-cookie, calls 
SimpleCookie.load(). The latter maintains a dict inside by the cookie name.

So that's what happens, first we add a dict entry with LOGIN_SESSION=deleted 
and phony expiration date. Next cookie, the valid one, gets into the same dict 
entry, updates the value to the right one, but expiration date remains in the 
past. The result is that this cookie is not used.

I don't know the good way of handling it. Maybe clear the cookie fields before 
updating the dict? Or this behaviour is intended? I think the situation itself 
is wrong, the site shouldn't be sending this, but how to cope with it?

--
components: Extension Modules
messages: 311544
nosy: Юрий Пухальский
priority: normal
severity: normal
status: open
title: Several cookies with the same name get intermixed
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue32729] socket error handling needed

2018-02-03 Thread INADA Naoki

INADA Naoki  added the comment:

And your screenshot doesn't contain "full" traceback chain.
It can be very important hint about who creates invalid TimeoutError.

--

___
Python tracker 

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



[issue32729] socket error handling needed

2018-02-03 Thread INADA Naoki

INADA Naoki  added the comment:

It may be bug of raising TimeoutError, not catching.
That's why I want example code to reproduce.

--

___
Python tracker 

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



Re: auto-correct a speech-to-text output and relate to of the words based on syllables

2018-02-03 Thread dieter
Steven D'Aprano  writes:

> On Fri, 02 Feb 2018 08:14:03 +0100, dieter wrote:
>
>>> The user speaks "Light". The system translates it as "Bright" The user
>>> speaks "White" The system translates it as "Bright"
>> 
>> As those words are phonetically quite apart (they have very different
>> first consonants), some step in your processing chain does something
>> seriously wrong.
>
> I disagree: Light, Bright and White sound very similar. They're identical 
> except for the first consonant:

We have here an example that the first consonant can significantly
influence the meaning.
As a consequence, it will in general be spoken and affect the sound.
And obviously, I should not be ignored when one is interested in
a narrow match.

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


[issue32729] socket error handling needed

2018-02-03 Thread yang

yang  added the comment:

When timeout error occurred in urllib3.Poolmanager.urlopen(), the built-in 
TimeoutError raised which is not caught in existing timeout exception clause.

Thus, It is caught by 'error' except and it is not checking Nonetype so that 
raising IndexError

It patched that error and detailed in PR-5458

https://github.com/python/cpython/pull/5458

Thank you and sorry for not good at english.

--

___
Python tracker 

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