[issue32155] Fix flake8 warning F841: local variable ... is assigned to but never used

2017-11-28 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 696b501cd11dc429a0f661adeb598bfaf89e4112 by Victor Stinner in 
branch 'master':
bpo-32155: Bugfixes found by flake8 F841 warnings (#4608)
https://github.com/python/cpython/commit/696b501cd11dc429a0f661adeb598bfaf89e4112


--

___
Python tracker 

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



[issue32155] Fix flake8 warning F841: local variable ... is assigned to but never used

2017-11-28 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4526

___
Python tracker 

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



[issue32155] Fix flake8 warning F841: local variable ... is assigned to but never used

2017-11-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4532

___
Python tracker 

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



[issue32155] Fix flake8 warning F841: local variable ... is assigned to but never used

2017-11-28 Thread STINNER Victor

STINNER Victor  added the comment:

I proposed PR 4618 to revert the distutils.config changes.

--

___
Python tracker 

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



Re: Pros and cons of Python sources?

2017-11-28 Thread Cameron Simpson

On 28Nov2017 21:23, Martin Schöön  wrote:

Den 2017-11-27 skrev Cameron Simpson :
But if the package is mainstream you're probably ok? You could just live 
with it and do no more damage.


Otherwise, look to see what python packages are installed which you think you
may have pipped, and reinstall those. But also, pip tends not to install things
that are already present, so you might be fine.


The reason I think all is not well is the fact that pip list no only
results in a list of packages but at the end of the list (which does
not look complete) there is a bunch of error messages.


Please post them. Maybe someone has some insight. (Also post the pip command 
itself producing the messages.)



Running Python scripts has worked without issues so far.


Fingers crossed.

Cheers,
Cameron Simpson  (formerly c...@zip.com.au)

Real computer scientists don't comment their code.  The identifiers are so long 
they can't afford the disk space.

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


[issue32159] Remove tools for CVS and Subversion

2017-11-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Are you sure that these scripts are not used outside of CPython? They were here 
when CPython used Subversion, they were here when CPython used Mercurial, what 
is wrong with Git?

The support of the svn:eol property is a thing I really lacked in Mercurial.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32159] Remove tools for CVS and Subversion

2017-11-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Oh, you are VERY fast in committing Victor. Please restore these scripts.

--

___
Python tracker 

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



[issue32159] Remove tools for CVS and Subversion

2017-11-28 Thread STINNER Victor

STINNER Victor  added the comment:

> The PR was approved by Brett Cannon and Ned Deily.

Oh, and Mariatta after I added a NEWS entry.

--

___
Python tracker 

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



[issue32159] Remove tools for CVS and Subversion

2017-11-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Is svnmap.txt used for mapping Subversion references to Mercurial references on 
the tracker? r88752

--

___
Python tracker 

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



[issue32159] Remove tools for CVS and Subversion

2017-11-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

svnmap.txt was added in a single revision and was not changed anymore.

commit 533c79dc67824d95b0aff5a252f9415d3bc80716
Author: Antoine Pitrou 
Date:   Sat Mar 5 17:46:03 2011 +0100

Add the map of SVN revision numbers to changeset ids.
This is mostly to help history-digging, especially when
focussing on feature branches.
Note that not all changesets are in the main repository,
but they are all in the full history repository.

It is needed for history. Old commit messages and discussion on mailing lists 
refer to Subversion revisions. Without svnmap.txt you will lost these 
references unless you have a clone of Subversion repository. I hope you are not 
going to get rid of Misc/HISTORY?

It would be better to create a mapping from Subversion revisions to Git hashes.

--

___
Python tracker 

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



[issue32155] Fix flake8 warning F841: local variable ... is assigned to but never used

2017-11-28 Thread STINNER Victor

STINNER Victor  added the comment:

The main bugs have been fixed in Python 3.6 and 3.7 (master).

Python 2.7 only has the bug in Tools/scripts/treesync.py, but I don't think 
that it's worth it to fix this old script in the stable 2.7 branch. I just 
removed this script from the master branch (bpo-32159).

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



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

2017-11-28 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:


New changeset 23df2d1304ece169d7e0dfc843dfb8026b413d9f by Barry Warsaw in 
branch 'master':
bpo-32107 - Improve MAC address calculation and fix test_uuid.py (#4600)
https://github.com/python/cpython/commit/23df2d1304ece169d7e0dfc843dfb8026b413d9f


--

___
Python tracker 

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



[issue32137] Stack overflow in repr of deeply nested dicts

2017-11-28 Thread STINNER Victor

Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue32162] typing.Generic breaks __init_subclass__

2017-11-28 Thread Ilya Kulakov

Ilya Kulakov  added the comment:

Current workaround is

class X(typing.Generic[T] if typing.TYPE_CHECKING else object):

--

___
Python tracker 

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



[issue32161] Python 2.7.14 installation on Ubuntu 16.04/GCC 5.4 throws "internal compiler error" in "PyFloat_GetMax" function

2017-11-28 Thread Rahul

Rahul  added the comment:

Thanks for your response. I'll follow up with GCC.

On Nov 28, 2017 14:48, "STINNER Victor"  wrote:

>
> STINNER Victor  added the comment:
>
> "internal compiler error" is a bug in GCC, not in Python. Please follow
> instructions in the error message:
>
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See  for instructions.
>
> See https://gcc.gnu.org/bugs/ and https://gcc.gnu.org/
>
> It would help if you can simplify the code to reproduce the bug without
> Python.
>
> I close the issue since it's a bug in GCC, not in Python.
>
> --
> nosy: +vstinner
> resolution:  -> third party
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue32124] Document functions safe to be called before Py_Initialize()

2017-11-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4536

___
Python tracker 

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



[issue32110] Make codecs.StreamReader.read() more compatible with read() of other files

2017-11-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 219c2de5ad0fdac825298bed1bb251f16956c04a by Serhiy Storchaka in 
branch 'master':
bpo-32110: codecs.StreamReader.read(n) now returns not more than n (#4499)
https://github.com/python/cpython/commit/219c2de5ad0fdac825298bed1bb251f16956c04a


--

___
Python tracker 

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



[issue32110] Make codecs.StreamReader.read() more compatible with read() of other files

2017-11-28 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4537

___
Python tracker 

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



[issue32155] Fix flake8 warning F841: local variable ... is assigned to but never used

2017-11-28 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 6979fcdc91114b1ccb16345e26734d6df4cccbc3 by Victor Stinner in 
branch '3.6':
bpo-32155: Bugfixes found by flake8 F841 warnings (#4619)
https://github.com/python/cpython/commit/6979fcdc91114b1ccb16345e26734d6df4cccbc3


--

___
Python tracker 

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



[issue32155] Fix flake8 warning F841: local variable ... is assigned to but never used

2017-11-28 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 71bd588646b282c9eebc390b31184a5bdb54e712 by Victor Stinner in 
branch 'master':
bpo-32155: Revert distutils.config change (#4618)
https://github.com/python/cpython/commit/71bd588646b282c9eebc390b31184a5bdb54e712


--

___
Python tracker 

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



[issue32159] Remove tools for CVS and Subversion

2017-11-28 Thread Ned Deily

Ned Deily  added the comment:

Sorry, I didn't see that the change included the deletion of svnmap.txt.  
However, I don't know where or by what that file might still be used, 
particularly by the lookup function used by the bug tracker.  Presumably 
someone (Ezio, RDM, or Brett) knows.

--
nosy: +ned.deily

___
Python tracker 

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



[issue32161] Python 2.7.14 installation on Ubuntu 16.04/GCC 5.4 throws "internal compiler error" in "PyFloat_GetMax" function

2017-11-28 Thread STINNER Victor

STINNER Victor  added the comment:

"internal compiler error" is a bug in GCC, not in Python. Please follow 
instructions in the error message:

Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

See https://gcc.gnu.org/bugs/ and https://gcc.gnu.org/

It would help if you can simplify the code to reproduce the bug without Python.

I close the issue since it's a bug in GCC, not in Python.

--
nosy: +vstinner
resolution:  -> third party
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



[issue31279] Squash new gcc warning (-Wstringop-overflow)

2017-11-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4535

___
Python tracker 

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



[issue30923] Add -Wimplicit-fallthrough=0 to Makefile ?

2017-11-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4534

___
Python tracker 

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2017-11-28 Thread Evan Driscoll

Change by Evan Driscoll :


--
nosy: +evaned

___
Python tracker 

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



[issue32122] Improve -x option documentation

2017-11-28 Thread STINNER Victor

STINNER Victor  added the comment:

I don't know if "@path\to\python -x %0 %* & exit /b" and "@py -3 -x %0 %* & 
exit /b" are correct and well supported on all recent Windows versions.

Apart of that, I like your new documentation :-)

--
nosy: +vstinner

___
Python tracker 

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



[issue32161] Python 2.7.14 installation on Ubuntu 16.04/GCC 5.4 throws "internal compiler error" in "PyFloat_GetMax" function

2017-11-28 Thread Rahul

New submission from Rahul :

Attempt to `make` Python 2.7.14 on Ubuntu 16.04/GCC 5.4 throws the following 
error:


Objects/floatobject.c: In function ‘PyFloat_GetMax’:
Objects/floatobject.c:59:5: internal compiler error: Illegal instruction
 return DBL_MAX;
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
Makefile:1359: recipe for target 'Objects/floatobject.o' failed
make: *** [Objects/floatobject.o] Error 1

--
components: Installation
files: python_2_7_14__configure_output
messages: 307176
nosy: rahulrajaram
priority: normal
severity: normal
status: open
title: Python 2.7.14 installation on Ubuntu 16.04/GCC 5.4 throws "internal 
compiler error" in "PyFloat_GetMax" function
versions: Python 2.7
Added file: https://bugs.python.org/file47301/python_2_7_14__configure_output

___
Python tracker 

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



[issue32162] typing.Generic breaks __init_subclass__

2017-11-28 Thread Ilya Kulakov

New submission from Ilya Kulakov :

When superclass inherits from Generic, attributes set for a subclass are 
incorrectly propagated to its superclass.

Without Generic attribute access raises an exception:

class X:
def __init_subclass__(cls, **kwargs):
super().__init_subclass__(**kwargs)
cls.attr = 42

class Y(X):
pass

Y.attr  # 42
X.attr  # AttributeError

With Generic it does not:

import typing

T = typing.TypeVar('T')

class X(typing.Generic[T]):
def __init_subclass__(cls, **kwargs):
super().__init_subclass__(**kwargs)
cls.attr = 42

class Y(X):
pass

Y.attr  # 42
X.attr  # 42

--
messages: 307182
nosy: Ilya.Kulakov
priority: normal
severity: normal
status: open
title: typing.Generic breaks __init_subclass__
type: behavior
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



[issue32162] typing.Generic breaks __init_subclass__

2017-11-28 Thread Ilya Kulakov

Ilya Kulakov  added the comment:

This issue is more server that I expected: it doesn't just propagate value to 
superclasses, but overrides them. The last subclass created by Python runtime 
will overwrite value for the whole chain.

--

___
Python tracker 

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



[issue32161] Python 2.7.14 installation on Ubuntu 16.04/GCC 5.4 throws "internal compiler error" in "PyFloat_GetMax" function

2017-11-28 Thread STINNER Victor

STINNER Victor  added the comment:

Once you reported the bug to GCC, please add a link to your bug report here, 
please ;-)

--

___
Python tracker 

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



[issue32162] typing.Generic breaks __init_subclass__

2017-11-28 Thread Ilya Kulakov

Ilya Kulakov  added the comment:

Nah, that's a bad one: you cannot use Generic classes as intended by specifying 
types.

It looks like it happens because cls._grog is not yet set properly by the time 
__init_subclass__ is called.

--

___
Python tracker 

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



[issue32110] Make codecs.StreamReader.read() more compatible with read() of other files

2017-11-28 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4538

___
Python tracker 

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



Re: Increasing the diversity of people who write Python

2017-11-28 Thread Gregory Ewing

Chris Angelico wrote:

Heh, you mean the term "Windows key"? It's not appropriate on
keyboards that don't have an actual Windows logo on it. There are
other names for it, but I figured the easiest way was to describe its
location :D


That doesn't work for all keyboards, though. The one I'm using
right now doesn't have any key between the left alt and left
control keys. (It does have another key just to the right of
the alt key that might have roughly analogous functionality in
some circumstances.)

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


[issue32164] IDLE: delete tabbedpages.py

2017-11-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 041efd292ebff46060fc1680b0608b1d4c876a48 by Terry Jan Reedy in 
branch 'master':
bpo-32164: Delete unused file idlelib/tabbedpages.py (#4628)
https://github.com/python/cpython/commit/041efd292ebff46060fc1680b0608b1d4c876a48


--

___
Python tracker 

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



Re: Increasing the diversity of people who write Python

2017-11-28 Thread Chris Angelico
On Wed, Nov 29, 2017 at 3:44 PM, Gregory Ewing
 wrote:
> Chris Angelico wrote:
>>
>> Heh, you mean the term "Windows key"? It's not appropriate on
>> keyboards that don't have an actual Windows logo on it. There are
>> other names for it, but I figured the easiest way was to describe its
>> location :D
>
>
> That doesn't work for all keyboards, though. The one I'm using
> right now doesn't have any key between the left alt and left
> control keys. (It does have another key just to the right of
> the alt key that might have roughly analogous functionality in
> some circumstances.)
>

Yeah, which is why it's completely configurable. I was just saying
which key *I* use, on my particular layout.

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


[issue30781] IDLE: configdialog -- switch to ttk widgets.

2017-11-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset a8de6964ec46cdadb12cf2d45ebf1473659c by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.6':
bpo-30781: Remove unused imports in idlelib.configdialog. (GH-4627) (#4630)
https://github.com/python/cpython/commit/a8de6964ec46cdadb12cf2d45ebf1473659c


--

___
Python tracker 

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



[issue32164] IDLE: delete tabbedpages.py

2017-11-28 Thread Terry J. Reedy

Change by Terry J. Reedy :


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



[issue32164] IDLE: delete tabbedpages.py

2017-11-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 957aef7c41ccae8a60d3dbbe8863401bd270dc86 by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.6':
bpo-32164: Delete unused file idlelib/tabbedpages.py (GH-4628) (#4631)
https://github.com/python/cpython/commit/957aef7c41ccae8a60d3dbbe8863401bd270dc86


--

___
Python tracker 

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



Re: Has anyone worked on docker with windows

2017-11-28 Thread Robert Clove
i was also of the same opinion , but docker is available on windows too
https://www.docker.com/docker-windows


On Wed, Nov 29, 2017 at 12:22 PM, Percival John Hackworth  wrote:

> On 28-Nov-2017, Robert Clove wrote
> (in article):
>
> > Hi,
> >
> > what am i trying to achieve is, container of windows with an application
> > like slack on it.
> > Does window container has an UI?
> >
> > Has anyone worked on it, is it feasible?
>
> AFAIK, docker is linux/CoreOS only. Ask docker.com this question. AFAIK,
> the
> only way to get docker to run on Windows is to run docker-machine with
> virtual box. That's a coreOS VM.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Increasing the diversity of people who write Python

2017-11-28 Thread Marko Rauhamaa
Christian Gollwitzer :
> Am 28.11.17 um 20:24 schrieb wxjmfa...@gmail.com:
>> 00FF LETTRE MINUSCULE LATINE Y TRÉMA
>
> WTF is this? The character is correctly called
> "LATIN SMALL LETTER Y WITH DIAERESIS". There is no non-ASCII character
> in this description. Of course, if I translated the Unicode mapping to
> Polish, there would be an even larger number of non-ASCII letters -
> but what good would that be for an IT standard, if the identifiers
> were written in different languages?

The ISO/IEC standards are issued in many languages. French and English
have the strongest footing; French is maybe slightly more primary than
English.

http://www.iec.ch/tcnews/restricted/2009june/Directives-IECSup-Ed5-1.pdf>


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


[issue32164] IDLE: delete tabbedpages.py

2017-11-28 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4547

___
Python tracker 

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



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2017-11-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Review of overview:
PR-2706 and PR-2613 fixed one line in test_configdialog for this issue.
PR-2046, #30617 and PR-3238, #30781 are merged cross-references.
PR-3222 was closed in favor of PR-3220, #31287, merged.

PR-3592 completes highlights and keys coverage and needs my review after 
getting lost in the flurry of PRs.

Dependency #31414 has merged PRs.  I should review, close, or indicate what is 
left to do.

Other dependencies are closed and I believe this should be after handling above 
2 items.

--

___
Python tracker 

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



Re: Increasing the diversity of people who write Python

2017-11-28 Thread Christian Gollwitzer

Am 28.11.17 um 20:24 schrieb wxjmfa...@gmail.com:

Le mardi 28 novembre 2017 04:44:51 UTC+1, Rustom Mody a écrit :

...

Unicode codepoint names are (evidently) ALLCAPS-ASCII



Are you sure ? ;-)


; Standard Unicode 10.0.0 ou
;   Norme internationale ISO/CEI 10646:2017

...

00FFLETTRE MINUSCULE LATINE Y TRÉMA


WTF is this? The character is correctly called
"LATIN SMALL LETTER Y WITH DIAERESIS". There is no non-ASCII character 
in this description. Of course, if I translated the Unicode mapping to 
Polish, there would be an even larger number of non-ASCII letters - but 
what good would that be for an IT standard, if the identifiers were 
written in different languages?


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


Re: Has anyone worked on docker with windows

2017-11-28 Thread Percival John Hackworth
On 28-Nov-2017, Robert Clove wrote
(in article):

> Hi,
>
> what am i trying to achieve is, container of windows with an application
> like slack on it.
> Does window container has an UI?
>
> Has anyone worked on it, is it feasible?

AFAIK, docker is linux/CoreOS only. Ask docker.com this question. AFAIK, the 
only way to get docker to run on Windows is to run docker-machine with 
virtual box. That's a coreOS VM.

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


[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2017-11-28 Thread Evan Driscoll

Evan Driscoll  added the comment:

> I also think that nargs=## could maybe be special-cased to just ignore 
> the A/O designation completely and only check there are enough, but I 
> haven't tried this out. Does this seem like a viable approach? Would a 
> patch that does that, subject to some flag, be of interest?

I can't leave well enough alone, so, with the following additional patch:

-def _match_argument(self, action, arg_strings_pattern):
+def _match_argument(self, action, arg_strings_pattern, arg_strings, 
start_index):
+import numbers
+nargs = action.nargs if action.nargs is not None else 1
+if isinstance(nargs, numbers.Number) and len(arg_strings_pattern) >= 
nargs:
+return nargs
+
 # match the pattern for this action to the arg strings
 nargs_pattern = self._get_nargs_pattern(action)
 match = _re.match(nargs_pattern, arg_strings_pattern)
 ...

Then I get this:

  >>> import argparse
  >>> parser = argparse.ArgumentParser(prog='a2x')
  >>> parser.add_argument('--asciidoc-opts',
  ... action='store', dest='asciidoc_opts', default='',
  ... metavar='ASCIIDOC_OPTS', help='asciidoc options')
  >>> parser.parse_args(['--asciidoc-opts', '--safe'])
  Namespace(asciidoc_opts='--safe')

Comments on this approach?

(Again, I haven't run tests, it'd need to be controlled by a flag per your 
desire to not change existing behavior, etc.)

--

___
Python tracker 

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2017-11-28 Thread Evan Driscoll

Evan Driscoll  added the comment:

One last comment for the time being.

I actually think *both* changes are valuable. Fixing the bug, well, fixes the 
bug if you can set the appropriate flag. The improved error message still helps 
for existing code and new code that *doesn't* set the flag.

--

___
Python tracker 

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



[issue32163] getattr() returns None even when default is given

2017-11-28 Thread darkdragon-001

New submission from darkdragon-001 :

# fail.py
def main():
patch = './a'
f = open(patch, 'r')
a = getattr(f,'encoding','ascii')
print(str(a))

if __name__ == "__main__":
main()

---

$ touch a
$ python fail.py

It still prints out 'None' instead of 'ascii'. This issue is fixed in python3.

--
messages: 307197
nosy: darkdragon-001
priority: normal
severity: normal
status: open
title: getattr() returns None even when default is given
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



[issue32100] IDLE: PathBrowser isn't working

2017-11-28 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +4541

___
Python tracker 

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



[issue32163] getattr() returns None even when default is given

2017-11-28 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

That's not a bug. That's because the file object does have an encoding 
attribute, which is set to None.

getattr only returns the default when the attribute doesn't exist, not if it 
exists but is None.

--
nosy: +steven.daprano
resolution:  -> not a bug
stage:  -> resolved

___
Python tracker 

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



[issue30781] IDLE: configdialog -- switch to ttk widgets.

2017-11-28 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +4542

___
Python tracker 

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



[issue32164] IDLE: delete tabbedpages.py

2017-11-28 Thread Terry J. Reedy

New submission from Terry J. Reedy :

idlelib.tabbedpages.TabbedPageSet is a custom widget only used for the tabbed 
config dialog.  #30781 converted to using tkinter.ttk.Notebook.  The latter has 
proven to be an improvement and the former has no other use, nor would I 
recommend its use.  Time to delete the file.

--
assignee: terry.reedy
components: IDLE
messages: 307199
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: delete tabbedpages.py
type: resource usage
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



[issue32164] IDLE: delete tabbedpages.py

2017-11-28 Thread Terry J. Reedy

Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue32100] IDLE: PathBrowser isn't working

2017-11-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset fd6f8c56b9a757210e8ceaea9edc50e502dc2085 by Terry Jan Reedy in 
branch 'master':
bpo-32100: Delete unneeded import in idlelib.pathbrowser. (#4626)
https://github.com/python/cpython/commit/fd6f8c56b9a757210e8ceaea9edc50e502dc2085


--

___
Python tracker 

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



[issue32100] IDLE: PathBrowser isn't working

2017-11-28 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4544

___
Python tracker 

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



[issue30781] IDLE: configdialog -- switch to ttk widgets.

2017-11-28 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4545

___
Python tracker 

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



[issue30781] IDLE: configdialog -- switch to ttk widgets.

2017-11-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset e8f7c78a868834bb53fa0ac903fc87785112f49e by Terry Jan Reedy in 
branch 'master':
bpo-30781: Remove unused imports in idlelib.configdialog. (#4627)
https://github.com/python/cpython/commit/e8f7c78a868834bb53fa0ac903fc87785112f49e


--

___
Python tracker 

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



[issue32165] PyEval_InitThreads is called before Py_Initialize in LoadPython in Modules/_ctypes/callbacks.c

2017-11-28 Thread Kenta Murata

New submission from Kenta Murata :

As described in Doc/c-api/init.rst, PyEval_InitThreads() cannot be called
before Py_Initialize() function.
But in Modules/_ctypes/callbacks.c, PyEval_InitThreds() is called before 
Py_Initialize() in LoadPython function.

--
components: ctypes
messages: 307202
nosy: mrkn
priority: normal
pull_requests: 4546
severity: normal
status: open
title: PyEval_InitThreads is called before Py_Initialize in LoadPython in 
Modules/_ctypes/callbacks.c
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



[issue32122] Improve -x option documentation

2017-11-28 Thread Steve Dower

Steve Dower  added the comment:

Those examples look fine to me

--

___
Python tracker 

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



[issue32100] IDLE: PathBrowser isn't working

2017-11-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 38ecf57306ef25874ef7c44a9875771e90faee97 by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.6':
bpo-32100: Delete unneeded import in idlelib.pathbrowser. (GH-4626) (#4629)
https://github.com/python/cpython/commit/38ecf57306ef25874ef7c44a9875771e90faee97


--

___
Python tracker 

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



[issue32156] Fix flake8 warning F401: ... imported but unused

2017-11-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Idlelib deletions done.
pathbrowser, #32100, PR-4626
configdialog, #30781, PR-4627

--
nosy: +terry.reedy

___
Python tracker 

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



[issue32160] lzma documentation: example to XZ compress file on disk

2017-11-28 Thread Daniel Himmelstein

Daniel Himmelstein  added the comment:

> we could consider an API addition

Just brainstorming here... perhaps an API addition would be most appropriate in 
the shutil module (https://docs.python.org/3.6/library/shutil.html) which 
already contains shutil.make_archive and shutil.unpack_archive. One could 
imagine shutil.compress and shutil.decompress that took a format argument to 
specify the compression type.

--

___
Python tracker 

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



[issue32155] Fix flake8 warning F841: local variable ... is assigned to but never used

2017-11-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4533

___
Python tracker 

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



Re: Pros and cons of Python sources?

2017-11-28 Thread Martin Schöön
Den 2017-11-27 skrev Cameron Simpson :
>
> But if the package is mainstream you're probably ok? You could just live with 
> it and do no more damage.
>
> Otherwise, look to see what python packages are installed which you think you 
> may have pipped, and reinstall those. But also, pip tends not to install 
> things 
> that are already present, so you might be fine.
>
The reason I think all is not well is the fact that pip list no only
results in a list of packages but at the end of the list (which does
not look complete) there is a bunch of error messages.

Running Python scripts has worked without issues so far.

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


Re: How do I send keystrokes to a console window in Windows XP?

2017-11-28 Thread jglobocnik37
On Saturday, July 16, 2005 at 2:46:34 PM UTC+2, Benji York wrote:
> googlegro...@garringer.net wrote:
> > How do I use Python to send keystrokes to a console window in Windows
> > XP?
> 
> import win32com.client
> 
> shell = win32com.client.Dispatch("WScript.Shell")
> shell.AppActivate("Command Prompt")
> 
> shell.SendKeys("cls{ENTER}")
> shell.SendKeys("dir{ENTER}")
> shell.SendKeys("echo Hi There{ENTER}")
> --
> Benji York

Hey! 
Do you have any idea on how to open 2 command panels at the same time and that 
every command would write to 1 command panel and other command to 2 command 
panel, when i tried to do something like this:
shell.run("cmd")
shell2.run("cmd")

shell.AppActivate("cmd")
time.sleep(5)
shell.SendKeys('ffmpeg -y -f dshow -i video="Logitech HD Webcam C270"  
kamera'+datestring+'.mp4')
shell2.SendKeys("xxxc{ENTER}")
time.sleep(1)
shell.SendKeys("{ENTER}")



time.sleep(2)
ffmpeg -y -f dshow -i ffmpeg -y -f dshow -i video="Logitech HD Webcam C270"  
kamera.mp4video="Logitech HD Webcam C270"  kamera.mp4
shell.SendKeys('^c')
time.sleep(2)
shell.SendKeys('exit')
time.sleep(1)
shell.SendKeys("{ENTER}")'''


everything gets in random places

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


Re: While, If, Count Statements

2017-11-28 Thread Frank Millman
"Cai Gengyang"  wrote in message 
news:c2dfc9c4-3e16-480c-aebf-553081775...@googlegroups.com...


Sure, so how would the code look like if I want the "if" statement to be 
nested inside the "while" loop


Have you tried putting the 'if' statement inside the 'while' loop?

If not, give it a shot and see what happens.

Frank Millman



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


pytest 3.3.0

2017-11-28 Thread Bruno Oliveira
The pytest team is proud to announce the 3.3.0 release!

pytest is a mature Python testing tool with more than a 1600 tests
against itself, passing on many different interpreters and platforms.

This release contains a number of bugs fixes and improvements, so users are
encouraged
to take a look at the CHANGELOG:

http://doc.pytest.org/en/latest/changelog.html

For complete documentation, please visit:

http://docs.pytest.org

As usual, you can upgrade from pypi via:

pip install -U pytest

Thanks to all who contributed to this release, among them:

* Anthony Sottile
* Bruno Oliveira
* Ceridwen
* Daniel Hahler
* Dirk Thomas
* Dmitry Malinovsky
* Florian Bruhin
* George Y. Kussumoto
* Hugo
* Jesús Espino
* Joan Massich
* Ofir
* OfirOshir
* Ronny Pfannschmidt
* Samuel Dion-Girardeau
* Srinivas Reddy Thatiparthy
* Sviatoslav Abakumov
* Tarcisio Fischer
* Thomas Hisch
* Tyler Goodlet
* hugovk
* je
* prokaktus


Happy testing,
The Pytest Development Team
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Re: While, If, Count Statements

2017-11-28 Thread Cai Gengyang
On Tuesday, November 28, 2017 at 6:09:17 AM UTC+8, Ned Batchelder wrote:
> On 11/27/17 7:54 AM, Cai Gengyang wrote:
> > Input :
> >
> > count = 0
> >
> > if count < 5:
> >print "Hello, I am an if statement and count is", count
> >
> > while count < 10:
> >print "Hello, I am a while and count is", count
> >count += 1
> >
> > Output :
> >
> > Hello, I am an if statement and count is 0
> > Hello, I am a while and count is 0
> > Hello, I am a while and count is 1
> > Hello, I am a while and count is 2
> > Hello, I am a while and count is 3
> > Hello, I am a while and count is 4
> > Hello, I am a while and count is 5
> > Hello, I am a while and count is 6
> > Hello, I am a while and count is 7
> > Hello, I am a while and count is 8
> > Hello, I am a while and count is 9
> >
> > The above input gives the output below. Why isn't the output instead :
> >
> > Hello, I am an if statement and count is 0
> > Hello, I am a while and count is 0
> > Hello, I am an if statement and count is 1
> > Hello, I am a while and count is 1
> > Hello, I am an if statement and count is 2
> > Hello, I am a while and count is 2
> > Hello, I am an if statement and count is 3
> > Hello, I am a while and count is 3
> > Hello, I am an if statement and count is 4
> > Hello, I am a while and count is 4
> > Hello, I am a while and count is 5
> > Hello, I am a while and count is 6
> > Hello, I am a while and count is 7
> > Hello, I am a while and count is 8
> > Hello, I am a while and count is 9
> 
> It's easy to imagine that this sets up a rule that remains in effect for the
> rest of the program:
> 
>  â â â  if count < 5:
>  â â â â â â â  print "Hello, I am an if statement and count is", count
> 
> But that's not how Python (and most other programming languages) works.â 
> Python
>  reads statements one after another, and executes them as it encounters 
> them.â 
>  When it finds the if-statement, it evaluates the condition, and if it is true
> *at that moment*, it executes the contained statements.â  Then it forgets all
> about that if-statement, and moves on to the next statement.
> 
> --Ned.



Sure, so how would the code look like if I want the "if" statement to be nested 
inside the "while" loop and give me the result :


Hello, I am an if statement and count is 0 
Hello, I am a while and count is 0 
Hello, I am an if statement and count is 1 
Hello, I am a while and count is 1 
Hello, I am an if statement and count is 2 
Hello, I am a while and count is 2 
Hello, I am an if statement and count is 3 
Hello, I am a while and count is 3 
Hello, I am an if statement and count is 4 
Hello, I am a while and count is 4 
Hello, I am a while and count is 5 
Hello, I am a while and count is 6 
Hello, I am a while and count is 7 
Hello, I am a while and count is 8 
Hello, I am a while and count is 9
-- 
https://mail.python.org/mailman/listinfo/python-list


TatSu v4.2.5 released

2017-11-28 Thread nospam . Juancarlo Añez
ç«£ TatSu (the successor to Grako) is a tool that takes grammars in a
variation of EBNF as input, and outputs memoizing (Packrat) PEG parsers in
Python.

ç«£ TatSu can compile a grammar stored in a string into a
tatsu.grammars.Grammar object that can be used to parse any given input, much
like the re module does with regular expressions, or it can generate a Python
module that implements the parser.

ç«£ TatSu fully supports left-recursive rules in PEG grammars using the
algorithm by Laurent and Mens. The generated AST has the expected left
associativity.

https://github.com/neogeny/TatSu
http://tatsu.readthedocs.io/en/stable/

v4.2.5


* #42  Rename vim files from
grako.vim to tatsu.vim (@fcoelho )
* #51  Fix inconsistent code
generation for whitespace (@fpom )
* #54  Only care about case of
first letter of rule name for determining advance over whitespace (@acw1251
)

 v4.2.4
-
* #40 Make the start rule default to the first rule defined in the grammar
(@hariedo)
* #43 Import re from tatsu.util to support optional regex-only features
(@azazel75)
* #47 Fix incorrect sample code in documentation

v4.2.3


* #37 Regression: The #include pragma works by using the EBNFBuffer from
grammars.py. Somehow the default EBNFBootstrapBuffer from bootstrap.py has been
 used instead (@gegenschall).
* #38 Documentation: Use of json.dumps() requires ast.asjson() (@davidchen).


--
Juancarlo *Aıez*

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

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-28 Thread Paul Moore
On 27 November 2017 at 19:05, Paul Moore  wrote:
> On 27 November 2017 at 18:13, Skip Montanaro  wrote:
>>> If you have a Windows key, you can assign it to be
>>> the Compose key.
>>
>> Would this be true on a machine running Windows? My work environment
>> has me developing on Linux, with a Windows desktop. It's not clear to
>> me that any sort of xmodmap shennanigans would work. Won't Windows
>> itself always gobble up that key?
>
> Programs can access the Windows key. IIRC, there is a utility that
> provides compose-key functionality on Windows. I can't recall the name
> right now and it's on my other PC, not this one, but I'll try to
> remember to post the name tomorrow...

WinCompose was the program - https://github.com/samhocevar/wincompose

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


[issue32152] Add pid to .cover filename in lib/trace.py

2017-11-28 Thread Nikhil Hegde

New submission from Nikhil Hegde :

Adding pid to filenames will avoid file write error when multiple processes 
(specifically, multiple tests) are writing to the same .cover file

--
components: Library (Lib)
messages: 307110
nosy: nikhilh
priority: normal
severity: normal
status: open
title: Add pid to .cover filename in lib/trace.py
type: enhancement
versions: Python 3.4

___
Python tracker 

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



[issue32120] python 3.6.0 is not importing sqlite3

2017-11-28 Thread Abinaya

Abinaya  added the comment:

*** WARNING: renaming "_sqlite3" since importing it failed: 
build/lib.linux-x86_64-3.6/_sqlite3.cpython-36m-x86_64-linux-gnu.so: undefined 
symbol: sqlite3_stmt_readonly

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_lzma
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.

The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
atexitpwd   time

Failed to build these modules:
_hashlib  _ssl


Following modules built successfully but were removed because they could not be 
imported:
_sqlite3


>> Above issue is the one which we could see while building the python 3.6.0.

--

___
Python tracker 

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



Re: Increasing the diversity of people who write Python

2017-11-28 Thread Tim Golden

On 28/11/2017 08:41, Paul Moore wrote:

On 27 November 2017 at 19:05, Paul Moore  wrote:

On 27 November 2017 at 18:13, Skip Montanaro  wrote:

If you have a Windows key, you can assign it to be
the Compose key.


Would this be true on a machine running Windows? My work environment
has me developing on Linux, with a Windows desktop. It's not clear to
me that any sort of xmodmap shennanigans would work. Won't Windows
itself always gobble up that key?


Programs can access the Windows key. IIRC, there is a utility that
provides compose-key functionality on Windows. I can't recall the name
right now and it's on my other PC, not this one, but I'll try to
remember to post the name tomorrow...


WinCompose was the program - https://github.com/samhocevar/wincompose


And, if you wanted a Python-y solution:

http://timgolden.me.uk/python/win32_how_do_i/catch_system_wide_hotkeys.html

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


[issue32152] Add pid to .cover filename in lib/trace.py

2017-11-28 Thread Nikhil Hegde

Nikhil Hegde  added the comment:

In the trace_generic.py file that I've attached, the changes are on line 331

--
Added file: https://bugs.python.org/file47300/trace_generic.py

___
Python tracker 

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



[issue32120] python 3.6.0 is not importing sqlite3

2017-11-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This issue already has been fixed. Try Python 3.6.3.

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

___
Python tracker 

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



python training in chennai & bangalore

2017-11-28 Thread rosebk1989
Besant Technologies Chennai & Bangalore you will be able to get vast experience 
by transforming your ideas into actual new application and software controls 
for the websites and the entire computing enterprise. To make it easier for you 
Besant Technologies at Chennai & Bangalore is visualizing all the materials you 
want.Start brightening your career with us

https://www.besanttechnologies.com/training-courses/python-training-institute-in-bangalore
https://www.besanttechnologies.com/training-courses/python-training-institute-in-chennai
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32162] typing.Generic breaks __init_subclass__

2017-11-28 Thread Ilya Kulakov

Ilya Kulakov  added the comment:

That's a better workaround:

class X(typing.Generic[T]):
def __init_subclass__(cls, **kwargs):
super(typing.GenericMeta, cls).__setattr__('_gorg', cls)
super().__init_subclass__(**kwargs)

--

___
Python tracker 

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2017-11-28 Thread Evan Driscoll

Evan Driscoll  added the comment:

I ran into this issue today. (Or rather a couple weeks ago, and I just 
diagnosed it today.)

Reading through the thread and from the bug's age it looks like a fix is 
probably not to promising, but Cherniavsky Beni's 2016-04-11 22:03 comment

> Can I additional suggest a change to the error message, e.g.:
> 
>   $ prog --foo -bar
>   prog: error: argument --foo: expected one argument
>   (tip: use --foo=-bar to force interpretation as argument of --foo)
> 
> This can be safely added in the current mode with no opt-in required,
> and will relieve the immediate "but what can I do?" confusions of 
> users.  The workaround is hard to discover otherwise, as `--foo=x` is 
> typically equivalent to `--foo x`.

and found it intriguing.

Messing around with the code, I was able to produce the attached patch, which, 
when run on the test case in the original comment, produces this output:

>>> import argparse
>>> parser = argparse.ArgumentParser(prog='a2x')
>>> parser.add_argument('--asciidoc-opts',
... action='store', dest='asciidoc_opts', default='',
... metavar='ASCIIDOC_OPTS', help='asciidoc options')
>>> parser.parse_args(['--asciidoc-opts', '--safe'])
usage: a2x [-h] [--asciidoc-opts ASCIIDOC_OPTS]
a2x: error: argument --asciidoc-opts: expected one argument (if you intended 
--safe to be the argument of --asciidoc-opts, pass --asciidoc-opts=--safe 
instead)


Would a cleaned-up version of this patch be of interest? (There are a couple 
obvious problems, like the out-of-bounds access to the list, PEP8, etc.) Is 
there some other way you could suggest to achieve this aim if you don't like 
that approach?

(I also think that nargs=## could maybe be special-cased to just ignore the A/O 
designation completely and only check there are enough, but I haven't tried 
this out. Does this seem like a viable approach? Would a patch that does that, 
subject to some flag, be of interest?)


The patch is relative to, I believe, the distribution version of 2.7.8. (Sorry, 
it's what I had handy as a custom build. :-) Updating it to .14 and to 
3.whatever would be part of the cleanup.)

--
Added file: https://bugs.python.org/file47302/python-argparse-error.patch

___
Python tracker 

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



[issue32110] Make codecs.StreamReader.read() more compatible with read() of other files

2017-11-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 230ffeae0a3961b1769806bd722c26227c84e8da by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
bpo-32110: codecs.StreamReader.read(n) now returns not more than n (GH-4499) 
(#4622)
https://github.com/python/cpython/commit/230ffeae0a3961b1769806bd722c26227c84e8da


--

___
Python tracker 

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



[issue32101] Add PYTHONDEVMODE=1 to enable the developer mode

2017-11-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4539

___
Python tracker 

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



[issue32110] Make codecs.StreamReader.read() more compatible with read() of other files

2017-11-28 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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



[issue32110] Make codecs.StreamReader.read() more compatible with read() of other files

2017-11-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset fc73c54dae46e6c47dcd4a535f7bc68a46b8e398 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '2.7':
bpo-32110: codecs.StreamReader.read(n) now returns not more than n (GH-4499) 
(#4623)
https://github.com/python/cpython/commit/fc73c54dae46e6c47dcd4a535f7bc68a46b8e398


--

___
Python tracker 

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



[issue32101] Add PYTHONDEVMODE=1 to enable the developer mode

2017-11-28 Thread STINNER Victor

STINNER Victor  added the comment:

While implementing a new PYTHONDEVMODE environment variable, I found that it 
would help to also add a new sys.flags.dev_mode flag. So I added it.

So for example, asyncio uses sys.flags.dev_mode rather than checking for 'dev' 
in sys._xoptions *and* check if the environment variable is set or not.

--

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-11-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4540

___
Python tracker 

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



<    1   2