[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2018-02-11 Thread Christian Heigele

Christian Heigele  added the comment:

Confirmed. On my private machine I just got the 1709 update and also don't have 
the error. 

Any further ideas what I can do?

--

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

2018-02-11 Thread Michael F. Stemper

On 2018-02-09 13:37, Chris Green wrote:


Alternative approach, what I do:-

 Run a text mode (but very capable and mouse aware) newsreader on
 my home system, read news locally using that.

 Use ssh (is that available at worK?) to connect from work to home


Your ISP provides that capability? I'm surprised. I'm with Charter and
the only external IP address is for the cable modem (I think).
"icanhazip" shows the same one, no matter which computer I use.

--
Michael F. Stemper
Psalm 94:3-6
--
https://mail.python.org/mailman/listinfo/python-list


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

2018-02-11 Thread Chris Angelico
On Sun, Feb 11, 2018 at 8:52 AM, Chris Green  wrote:
> Michael F. Stemper  wrote:
>> On 2018-02-09 13:37, Chris Green wrote:
>>
>> > Alternative approach, what I do:-
>> >
>> >  Run a text mode (but very capable and mouse aware) newsreader on
>> >  my home system, read news locally using that.
>> >
>> >  Use ssh (is that available at worK?) to connect from work to home
>>
>> Your ISP provides that capability? I'm surprised. I'm with Charter and
>> the only external IP address is for the cable modem (I think).
>> "icanhazip" shows the same one, no matter which computer I use.
>>
> You use the same external IP address, just use the right port number
> (which you set up your router to allow in).
>

Exactly. The easiest way is to set up port forwarding in your cable
modem. Any device worth using should have at least SOME measure of
port forwarding. Of course, if your ISP offers an IPv6 netblock, it's
easy.

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


python desktop app making experience

2018-02-11 Thread Abdur-Rahmaan Janhangeer
Hi all,

Just can you provide your own experience of developing and shipping a
desktop app. Did you here about such a task before etc, until years after
story.

Abdur-Rahmaan Janhangeer
https://abdurrahmaanjanhangeer.wordpress.com
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32758] Stack overflow when parse long expression to AST

2018-02-11 Thread Brett Cannon

Brett Cannon  added the comment:

On Sun, Feb 11, 2018, 16:26 Serhiy Storchaka, 
wrote:

>
> Serhiy Storchaka  added the comment:
>
> > The other option is to simply not worry about it and acknowledge you can
> > crash the compiler with a crazy-sized expression.
>
> Agreed, this is the most practical option. Do you want to write such
> acknowledgement?
>

I think adding a test to test_crashers and an appropriate comment pointing
to this issue is sufficient.

> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue31562] snakebite.net is not available

2018-02-11 Thread Zachary Ware

Zachary Ware  added the comment:

Trent, any word on this?

--
nosy: +zach.ware

___
Python tracker 

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



[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2018-02-11 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the reminder.  Yes, the whole "Using Python on a Macintosh" section 
is very much out-of-date and needs a complete rewrite.  It has been on my To Do 
list for a long time; I'll see what I can do to expedite it.

--
assignee: docs@python -> ned.deily
nosy: +ned.deily
priority: normal -> high
stage:  -> needs patch
versions: +Python 2.7, 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



[issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers

2018-02-11 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I think at the time I was writing a Python version of the "openssl" tool. 
"openssl s_client" prints out what it says are the "Shared ciphers". So, yes, I 
agree the usecase is mostly debugging.

--

___
Python tracker 

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



[issue32820] Add bits method to ipaddress

2018-02-11 Thread Eric Osborne

Eric Osborne  added the comment:

Faster, too.
My way:
In [7]: %timeit bits(a)
1.67 µs ± 7.31 ns per loop (mean ± std. dev. of 7 runs, 100 loops each)

Your way:
In [11]: %timeit b2(a)
1.2 µs ± 5.93 ns per loop (mean ± std. dev. of 7 runs, 100 loops each)

I was a little worried about doing it all as a clever one-liner but this
seems worthwhile.  I'll change the code I submitted.
thanks!

eric

On Sun, Feb 11, 2018 at 6:21 PM Eric V. Smith 
wrote:

>
> Eric V. Smith  added the comment:
>
> Without commenting on how useful or desirable this would be, I'll point
> out the string can be computed as:
>
> return f'{int(self):#0{IPV4LENGTH+2}b}'
>
> --
> nosy: +eric.smith
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue20285] Improve object.__doc__ and help(object) output

2018-02-11 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Reponses on the pydev thread, which include 3 other coredevs:

"a base for all classes." object entry in lib ref, function
"the ultimate base class of all other classes."  Martin Panter

object is neither a base or superclass of itself, so the first of each pair 
above is not quite right.

"the base class of the class heirarchy ['hierarchy']"  Steven D'Aprano
"the root of the class heirarchy"  ditto
+ quotes from Java and Ruby

Jeff Allen and Barry Warsaw like either, with BW slightly referring the first.

I was thinking about 'tree' instead of 'hierachy', but 'class tree' is wrong 
and 'directed acyclic graph of classes' a bit wordy.  While hierarchies are 
often thought of as trees, it is possible for someone to report to more than 
one person.

No one supported the status quo.

Martin also suggested a continuation:  "When called, it accepts no
arguments and returns a new unique and featureless object."

Even though object, unlike any other class, is primarily used as a base class 
rather than instance source, the latter should be included.  For other built-in 
classes, the summary line describes instances. I would leave out 'unique' as 
that could be confused with 'singleton'.


I propose the following, which follows general docstring format, but describes 
the class instead of instances in the summary line.

"The base class of the class hierarchy.

When called, it accepts no arguments and returns a new featureless instance 
that has no instance attributes and cannot be given any."

Passing arguments to object and trying to add attributes to object instances 
are two common beginner mistakes.

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



[issue32801] Lib/_strptime.py: utilize all()

2018-02-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I don't know such reason.

I would not combine f-strings and regular expressions. Curly braces are 
syntactically meaningful in regular expressions, and regular expression which 
uses them for substituting look strange.

--

___
Python tracker 

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



[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2018-02-11 Thread Frank Griswold

New submission from Frank Griswold :

This chunk of docs has bad info in both Python2 and Python3 docs:

4.1.3. Configuration

Python on OS X honors all standard Unix environment variables such as 
PYTHONPATH, but setting these variables for programs started from the Finder is 
non-standard as the Finder does not read your .profile or .cshrc at startup. 
You need to create a file ~/.MacOSX/environment.plist. See Apple’s Technical 
Document QA1067 for details.

If you search for QA1067, you are informed that the document is legacy and 
unsupported, with a suggestion for where to look now. That suggested link leads 
to a 404.

Searching the apple site, I find that at least some thoughtful developers think 
that configuring the environment isn't even possible, generally; and isn't 
considered good form even if so. Here:
https://forums.developer.apple.com/message/217422

I have no problem setting things for my terminal, as a longtime (unix) user, 
but for others, this section probably needs a complete examination with an eye 
toward making it current. quite possibly by reorganizing it.

--
assignee: docs@python
components: Documentation
messages: 312023
nosy: docs@python, griswolf
priority: normal
severity: normal
status: open
title: Docs: Using Python on a Macintosh has bad info per Apple site
type: enhancement

___
Python tracker 

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



[issue32801] Lib/_strptime.py: utilize all()

2018-02-11 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

For me, on Windows, the tests for time, datetime, and _strptime have failures 
on the master branch, so I don't want to submit a PR just now.

--

___
Python tracker 

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



[issue32823] Regression in test -j behavior and time in 3.7.0b1

2018-02-11 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

For me, on Windows, the tests for time, datetime, and _strptime have failures 
on the master branch, so I don't want to submit a PR just now.

--

___
Python tracker 

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



[issue32823] Regression in test -j behavior and time in 3.7.0b1

2018-02-11 Thread Terry J. Reedy

Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue32823] Regression in test -j behavior and time in 3.7.0b1

2018-02-11 Thread Terry J. Reedy

New submission from Terry J. Reedy :

For me, on Windows, recent changes, since 3.7.0a4, have greatly reduced the 
benefit of j0 (= j14 on my system).  For 3.6.4 (installed), the times are 
around 13:30 and 2:20. The times for 3.7.0a4 (installed) are about the same 
parallel and would have been for serial if not for a crash.  For 3.7.0b1 and 
master, compiled with debug on, the times are around 24:00 and 11:10.  As shown 
by the increase for serial from 13:30 to 24:00, debug by itself slows tests 
down by nearly half.

For parallel, the slowdown from 2:20 to 11:40, is increased by an extra factor 
of more than 2.  The reason is that parallel tests are done in batches of n (at 
least on windows).  Before, a new test started in one of the 14 processes 
whenever the test in a process finished. All 12 cpus were kept busy until less 
than 12 tests remained. Now, 14 new tests are started when all the previous 14 
finish.  Therefore, cpus wait while the slowest test in a batch of 14 finishes.

Beginning of old log:
Run tests in parallel using 14 child processes
0:00:00 [  1/413] test__opcode passed
0:00:00 [  2/413] test__locale passed
0:00:00 [  3/413] test__osx_support passed
0:00:00 [  4/413] test_abc passed
0:00:01 [  5/413] test_abstract_numbers passed
0:00:01 [  6/413] test_aifc passed
0:00:02 [  7/413] test_array passed
0:00:02 [  8/413] test_asdl_parser skipped
test_asdl_parser skipped -- test irrelevant for an installed Python
0:00:03 [  9/413] test_argparse passed
0:00:04 [ 10/413] test_ast passed
0:00:04 [ 11/413] test_asyncgen passed
0:00:05 [ 12/413] test_unittest passed
0:00:06 [ 13/413] test_asynchat passed
0:00:06 [ 14/413] test_atexit passed
0:00:06 [ 15/413] test_audioop passed
0:00:06 [ 16/413] test_augassign passed
0:00:07 [ 17/413] test_asyncore passed
0:00:07 [ 18/413] test_baseexception passed
0:00:07 [ 19/413] test_base64 passed
...
0:00:29 [107/413] test_enum passed
0:00:30 [108/413] test_enumerate passed
0:00:30 [109/413] test_eof passed
0:00:30 [110/413] test_epoll skipped
test_epoll skipped -- test works only on Linux 2.6
0:00:30 [111/413] test_errno passed


Beginning of new log:
Run tests in parallel using 14 child processes
running: test_grammar (30 sec), test_opcodes (30 sec), test_dict (30 sec), 
test_builtin (30 sec), test_exceptions (30 sec), test_types (30 sec), 
test_unittest (30 sec), test_doctest (30 sec), test_doctest2 (30 sec), 
test_support (30 sec), test___all__ (30 sec), test___future__ (30 sec), 
test__locale (30 sec), test__opcode (30 sec)
0:00:41 [  1/414] test_support passed -- running: test_grammar (41 sec), 
test_opcodes (41 sec), test_dict (41 sec), test_builtin (41 sec), 
test_exceptions (41 sec), test_types (41 sec), test_doctest (41 sec), 
test___all__ (41 sec), test___future__ (41 sec), test__locale (41 sec), 
test__opcode (41 sec)
0:00:41 [  2/414] test_doctest2 passed -- running: test_grammar (41 sec), 
test___all__ (41 sec), test__locale (41 sec)
0:00:41 [  3/414] test_unittest passed -- running: test___all__ (41 sec), 
test__locale (41 sec)
0:00:41 [  4/414] test__opcode passed
0:00:41 [  5/414] test_dict passed
0:00:41 [  6/414] test_types passed
0:00:41 [  7/414] test___future__ passed
0:00:41 [  8/414] test_builtin passed
0:00:41 [  9/414] test_doctest passed
0:00:41 [ 10/414] test_opcodes passed
0:00:41 [ 11/414] test_exceptions passed
0:00:41 [ 12/414] test_grammar passed
0:00:41 [ 13/414] test___all__ passed (40 sec)
0:00:41 [ 14/414] test__locale passed

The slowest test took 40 sec, and the rest of the cpus waited.

[snip list of running tests]
0:01:25 [ 15/414] test_audioop passed
0:01:25 [ 17/414] test_abstract_numbers passed
0:01:25 [ 18/414] test_abc passed
0:01:25 [ 19/414] test_aifc passed
0:01:25 [ 20/414] test_asdl_parser passed
0:01:25 [ 21/414] test_asyncgen passed
0:01:25 [ 22/414] test_atexit passed
0:01:25 [ 23/414] test_asyncio passed (42 sec)
[snip output]
0:01:25 [ 25/414] test_ast passed
0:01:25 [ 26/414] test_asynchat passed
0:01:25 [ 27/414] test_array passed
0:01:25 [ 28/414] test__osx_support passed

28 tests done in 85 seconds versus 111 in 30 seconds.
I think whatever caused this should be reversed.

--
components: Tests
messages: 312020
nosy: ncoghlan, terry.reedy, vstinner
priority: normal
severity: normal
status: open
title: Regression in test -j behavior and time in 3.7.0b1
type: performance
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue32820] Add bits method to ipaddress

2018-02-11 Thread Eric V. Smith

Eric V. Smith  added the comment:

Without commenting on how useful or desirable this would be, I'll point out the 
string can be computed as:

return f'{int(self):#0{IPV4LENGTH+2}b}'

--
nosy: +eric.smith

___
Python tracker 

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



[issue32815] Document text parameter to subprocess.Popen

2018-02-11 Thread Gregory P. Smith

Change by Gregory P. Smith :


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

___
Python tracker 

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



[issue32815] Document text parameter to subprocess.Popen

2018-02-11 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset ba4f218657efcba856d00eb320418355cce8309a by Gregory P. Smith 
(Miss Islington (bot)) in branch '3.7':
bpo-32815: Improve docs on the subprocess API *text* parameter (GH-5622) 
(GH-5631)
https://github.com/python/cpython/commit/ba4f218657efcba856d00eb320418355cce8309a


--

___
Python tracker 

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



[issue32822] finally block doesn't re-raise exception if return statement exists inside

2018-02-11 Thread David Rebbe

David Rebbe  added the comment:

Oops I didn't realize I referenced the tutorial documentation.

Maybe it would be better to mention this behavior in the tutorial documentation 
also.

I've always assumed exception raises take priority over any 
return/break/continues. Behavior is backwards from what I'd expect but makes 
sense.

--

___
Python tracker 

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



[issue32801] Lib/_strptime.py: utilize all()

2018-02-11 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Serhiy, Is there any reason to not combine last two lines in one?

-regex = '(?P<%s>%s' % (directive, regex)
-return '%s)' % regex
+return '(?P<%s>%s)' % (directive, regex)

or to use f-string to then get

+return f'(?P<{directive}>{regex})'

--

___
Python tracker 

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



[issue32822] finally block doesn't re-raise exception if return statement exists inside

2018-02-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This is intended and documented behavior.

https://docs.python.org/3/reference/compound_stmts.html#the-try-statement

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32822] finally block doesn't re-raise exception if return statement exists inside

2018-02-11 Thread David Rebbe

New submission from David Rebbe :

According to the docs:
"When an exception has occurred in the try clause and has not been handled by 
an except clause (or it has occurred in an except or else clause), it is 
re-raised after the finally clause has been executed."
https://docs.python.org/2/tutorial/errors.html#defining-clean-up-actions

This seems to not be the case if return inside a finally block, the exception 
needing to be thrown looks like its tossed out.

I'm not sure if this is intended behavior and the docs need to be updated or 
python isn't doing the correct behavior.



Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

--
components: Interpreter Core
files: finally_test.py
messages: 312014
nosy: David Rebbe
priority: normal
severity: normal
status: open
title: finally block doesn't re-raise exception if return statement exists 
inside
type: behavior
versions: Python 3.4
Added file: https://bugs.python.org/file47438/finally_test.py

___
Python tracker 

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



Re: Adding colormaps?

2018-02-11 Thread Martin Schöön
Den 2017-01-23 skrev Albert-Jan Roskam :
> (sorry for top-posting)
> I does not appear to be possible in matplolibrc (1). But you can
> use matplotlib.cm.register_cmap to register new cmaps (2) such
> as these (3).
>
> (Note: I did not try this)
>
> (1)http://matplotlib.org/1.4.0/users/customizing.html
> (2)http://matplotlib.org/api/cm_api.html
> (3)https://github.com/BIDS/colormap/blob/master/colormaps.py

More than a year later I think I can advice on the best workaround:
Use virtualenv and you can work with newer versions of Python packages
than those available in your Linux distro of base Python installation.

I am currently learning to use jupyter notebook, pandas and other
nice packages in much more recent versions than available in my Linux
distro.

I hope I can copy this onto my computer at work -- running another Linux
distro where virtualenv3 does not seem to be available.

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


[issue32815] Document text parameter to subprocess.Popen

2018-02-11 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset e14c01037877768a3fe766e50d14993bd5d8a67e by Gregory P. Smith 
(Pablo Galindo) in branch 'master':
bpo-32815: Improve docs on the subprocess API *text* parameter (GH-5622)
https://github.com/python/cpython/commit/e14c01037877768a3fe766e50d14993bd5d8a67e


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue32815] Document text parameter to subprocess.Popen

2018-02-11 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5435

___
Python tracker 

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



[issue32806] locally imported modules are unaccessible in lambdas in pdb

2018-02-11 Thread Nitish

Nitish  added the comment:

Sorry. I didn't finish my last message. Is the behaviour described in that 
message a bug? If yes, that would explain the original behaviour. If no, why 
not?

--

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

Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue11015] Bring test.support docs up to date

2018-02-11 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Since Nick already merged and backported, at least a new PR is needed.  Since 
this is an old issue with a long discussion and several inactives on the nosy 
list, I suggest a new issue starting from the merge result as a base: "More 
revisions to test.support docs".  Make a list of Serhiy's questions and 
comments.

TESTFN_NONASCII - How different from TESTFN_UNICODE?
PGO -  value? True/False?
TEST_SUPPORT_DIR - Not used.
...

Add Nick, Serhiy, and me as nosy.  We can discuss there how to handle the 
additional issues.

--
components: +Documentation, Tests
stage: backport needed -> resolved
status: open -> closed
versions: +Python 3.7

___
Python tracker 

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



[issue32806] locally imported modules are unaccessible in lambdas in pdb

2018-02-11 Thread Nitish

Nitish  added the comment:

This can be traced back to the following issue:

>>> c = compile("(lambda: re.findall('a', 'aaa'))()", "", "single")
>>> import re as rea
>>> exec(c, None, {'re': rea})
NameError: name 're' is not defined.

Seeing disassembly of the compiled code, it used LOAD_GLOBAL to get re. This 
seems to be the problem.

--

___
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-11 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

If ast_parse returns, a correct tree (A) rather than a buggy tree is a hard 
requirement.  If ast_parse does not return,  an exception (B) rather than a 
crash is strongly desired.  We should not risk A to get B.  I presume that 
Serhiy is suggesting that option 1 either has such a risk or would consume 
developer resources that might be better spent on other improvements.

For Python, option 2, seems pretty useless for real code because there are much 
better ways to sum a long sequence: sum(iterable_of_numbers),  seq.append, 
''.join(iterable_of_string).

Possible addition to the ast.parse entry.
"Syntactically correct but extremely long or complex source strings may result 
in a RecursionError or program crash."

--

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

Mariatta Wijaya  added the comment:

make reindent is still failing on 2.7 branch, but I haven't had chance to look 
into the fix. Not really sure if we want to bother?
Anyways, I've unassigned myself so if someone else want to look into it, they 
can. Not sure if it's worth the effort. (not a lot of people use it?)

--
assignee: Mariatta -> 

___
Python tracker 

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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2018-02-11 Thread Matt Ripley

Matt Ripley  added the comment:

Hi Steve,
Finally sorted this out. I tried all the workarounds that I could find on the 
web for similar issues. In the end I needed to re-image windows 10. This was 
the only thinkg that sorted it out. So looked like the windows had ccorrupted 
preventing the msi installers.
Thanks for your help.
Best regards
Matt

  From: Steve Dower 
 To: matt.rip...@yahoo.co.uk 
 Sent: Sunday, 28 January 2018, 12:05
 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 
0x80070643: Failed to install MSI package.

Steve Dower  added the comment:

>From the log file, all I can tell is that it failed to open the file 
>containing information about ongoing installs. At a guess, another install was 
>running (maybe failed?) and didn't clean up properly.

Rebooting should generally resolve that. If it doesn't, you're either looking 
at serious OS corruption (worth testing if any other MSI installers work - 
Anaconda does not use MSI) or disk corruption.

--

___
Python tracker 

___

--

___
Python tracker 

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



[issue21060] Better error message for setup.py upload command without sdist/bdist

2018-02-11 Thread Jeff Ramnani

Jeff Ramnani  added the comment:

I think the error message you suggested is better than the one in the current 
patch.  I've added a new patch with your improved message.

I haven't submitted or updated a patch since the migration to GitHub.  I can 
open a PR over on GitHub if that would make it easier for you.

--
Added file: https://bugs.python.org/file47437/issue21060-py38.patch

___
Python tracker 

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



[issue32820] Add bits method to ipaddress

2018-02-11 Thread Eric Osborne

Change by Eric Osborne :


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

___
Python tracker 

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



[issue32820] Add bits method to ipaddress

2018-02-11 Thread Eric Osborne

Eric Osborne  added the comment:

redoing with a bits() property method to return a string, a la:

def bits(self):
fstr = '0' + str(IPV4LENGTH) + 'b'
return '0b' + format(int(self), fstr)


Works thusly:

import ipaddress as ip
a = ip.IPv4Address('0.0.0.42')
a.bits == '0b00101010'

--
resolution: rejected -> 
title: Add binary methods to ipaddress -> Add bits method to ipaddress

___
Python tracker 

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



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

2018-02-11 Thread Zachary Ware

Zachary Ware  added the comment:


New changeset fe61e8d8c7cd1f6fb0ce7e9b8f0460b47b5f29a5 by Zachary Ware (Miss 
Islington (bot)) in branch '3.7':
bpo-32604: Make _xxsubinterpreters build on Windows (GH-5624)
https://github.com/python/cpython/commit/fe61e8d8c7cd1f6fb0ce7e9b8f0460b47b5f29a5


--

___
Python tracker 

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



[issue32821] Add snippet on how to configure a "split" stream for console

2018-02-11 Thread Mario Corchero

Change by Mario Corchero :


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

___
Python tracker 

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



[issue32821] Add snippet on how to configure a "split" stream for console

2018-02-11 Thread Mario Corchero

New submission from Mario Corchero :

As discussed in python-ideas, it would be good to have a recipe on how to 
configure the logging stack to be able to log ``ERROR`` and above to stderr and 
``INFO`` and below to stdout.

It was proposed to add it into the cookbook rather than on the standard 
library. An alternative proposal was a "ConsoleHandler" that would do this by 
default. 
(https://github.com/mariocj89/cpython/commit/501cfcd0f4cad1e04d87b89784988c52a77a80ad)

--
assignee: docs@python
components: Documentation
messages: 312003
nosy: docs@python, mariocj89
priority: normal
severity: normal
status: open
title: Add snippet on how to configure a "split" stream for console
versions: Python 3.8

___
Python tracker 

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



[issue11015] Bring test.support docs up to date

2018-02-11 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Thanks Nick for merging.  Should I open a new PR to address Serhiy's review or 
fix them on the original PR?

--

___
Python tracker 

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



[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2018-02-11 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
keywords: +easy
stage:  -> needs patch
type: behavior -> enhancement
versions: +Python 3.8 -Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



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

2018-02-11 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5432

___
Python tracker 

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



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

2018-02-11 Thread Zachary Ware

Zachary Ware  added the comment:


New changeset 310b05289b5d9550040f469e60b5e8e77f1022b6 by Zachary Ware in 
branch 'master':
bpo-32604: Make _xxsubinterpreters build on Windows (GH-5516)
https://github.com/python/cpython/commit/310b05289b5d9550040f469e60b5e8e77f1022b6


--
nosy: +zach.ware

___
Python tracker 

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



[issue11015] Bring test.support docs up to date

2018-02-11 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset a0b998df314370f00502efe7ad84206f5bb782ff by Nick Coghlan (Miss 
Islington (bot)) in branch '3.7':
bpo-11015: Update test.support documentation (GH-5619)
https://github.com/python/cpython/commit/a0b998df314370f00502efe7ad84206f5bb782ff


--

___
Python tracker 

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



Re: python desktop app making experience

2018-02-11 Thread Abdur-Rahmaan Janhangeer
my bad *hear

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

On 11 Feb 2018 17:05, "Abdur-Rahmaan Janhangeer" 
wrote:

> Hi all,
>
> Just can you provide your own experience of developing and shipping a
> desktop app. Did you here about such a task before etc, until years after
> story.
>
> Abdur-Rahmaan Janhangeer
> https://abdurrahmaanjanhangeer.wordpress.com
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue11015] Bring test.support docs up to date

2018-02-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I have left comments to PR.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32820] Add binary methods to ipaddress

2018-02-11 Thread Eric Osborne

Eric Osborne  added the comment:

test_not_an_index_issue15559() disallows __index__, so nevermind.  Will 
resubmit without __index__ to get the full binary string, though.

--
resolution:  -> rejected

___
Python tracker 

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



[issue32820] Add binary methods to ipaddress

2018-02-11 Thread Eric Osborne

New submission from Eric Osborne :

This issue adds two things to the ipaddress lib:

* an __index__ method to allow bin(), oct(), hex() to work
* a property method to get the fully padded (32-bit or 128-bit) address as a 
string

--
components: Library (Lib)
messages: 311997
nosy: ewosborne
priority: normal
severity: normal
status: open
title: Add binary methods to ipaddress
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue32815] Document text parameter to subprocess.Popen

2018-02-11 Thread Pablo Galindo Salgado

Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-11 Thread Pablo Galindo Salgado

Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue32819] match_hostname() error reporting bug

2018-02-11 Thread Christian Heimes

Change by Christian Heimes :


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

___
Python tracker 

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



Re: What is more Pythonic: subclass or adding functionality to base class?

2018-02-11 Thread Paul Moore
On 11 February 2018 at 12:55, D'Arcy Cain  wrote:
> On 02/11/18 06:30, Victor Porton wrote:
>> What is more pythonic?
>>
>> 1. Create its subclass PredicateParserWithError and add the additional field
>> on_error to this class.
>>
>> 2. Add on_error field to the base class, setting it to None by default, if
>> the class's user does not need this field.
>
> Personally I would go with #1.  It just seems cleaner.  Not sure what
> the Python gods would do.

I don't know about "Python Gods" or even what's more Pythonic, but it
might be worth commenting that if this were Java, adding a new field
to the base class would need every file that used the class to be
recompiled. So there's a tendency to subclass just to minimise the
impact of a change like this. In Python, that's not necessary, as
classes are created at runtime, and there's no compile-time layout
that code needs to depend on, so if you add an extra field to a class,
only those parts of your codebase that need the new field have to
care.

Of course, if this is a public API, backward compatibility and
versioning of the API become issues, that may affect your decision.
Paul
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32819] match_hostname() error reporting bug

2018-02-11 Thread Christian Heimes

New submission from Christian Heimes :

Since bpo #23033, ssl.match_hostname() no longer supports partial wildcard 
matching, e.g. "www*.example.org". In case of a partial match, _dnsname_match() 
fails with a confusing/wrong error message:

>>> import ssl
>>> ssl._dnsname_match('www*.example.com', 'www1.example.com')
Traceback (most recent call last):
  File "", line 1, in 
  File ".../cpython/Lib/ssl.py", line 198, in _dnsname_match
"wildcard can only be present in the leftmost segment: " + repr(dn))
ssl.SSLCertVerificationError: ("wildcard can only be present in the leftmost 
segment: 'www*.example.com'",)

The wildcard *is* in the leftmost segment. But it's not a full match but a 
partial match.

The error message applies to a SAN dNSName like "*.*.example.org" or 
"www.*.example.com",  however the function does not raise an error for multiple 
or non left-most wildcards:

# multiple wildcards return None
>>> ssl._dnsname_match('*.*.example.com', 'www.sub.example.com')
# single wildcard in another label returns False
>>> ssl._dnsname_match('www.*.example.com', 'www.sub.example.com')
False

--
assignee: christian.heimes
components: SSL
messages: 311996
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: match_hostname() error reporting bug
type: behavior

___
Python tracker 

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



[issue11015] Bring test.support docs up to date

2018-02-11 Thread Nick Coghlan

Nick Coghlan  added the comment:

I merged Cheryl's PR to the dev branch, and triggered the backport to 3.7. If 
nobody beats me to it, I'll merge the latter tomorrow :)

--
assignee: docs@python -> ncoghlan
resolution:  -> fixed
stage: patch review -> backport needed

___
Python tracker 

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



[issue11015] Bring test.support docs up to date

2018-02-11 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5428

___
Python tracker 

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



[issue11015] Bring test.support docs up to date

2018-02-11 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 988fb28431d3a3fc5dc6eb657c8a4baacc04d9ce by Nick Coghlan (Cheryl 
Sabella) in branch 'master':
bpo-11015: Update test.support documentation (GH-5610)
https://github.com/python/cpython/commit/988fb28431d3a3fc5dc6eb657c8a4baacc04d9ce


--

___
Python tracker 

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



Re: What is more Pythonic: subclass or adding functionality to base class?

2018-02-11 Thread D'Arcy Cain
On 02/11/18 06:30, Victor Porton wrote:
> What is more pythonic?
> 
> 1. Create its subclass PredicateParserWithError and add the additional field 
> on_error to this class.
> 
> 2. Add on_error field to the base class, setting it to None by default, if 
> the class's user does not need this field.

Personally I would go with #1.  It just seems cleaner.  Not sure what
the Python gods would do.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com
-- 
https://mail.python.org/mailman/listinfo/python-list


What is more Pythonic: subclass or adding functionality to base class?

2018-02-11 Thread Victor Porton
The following is a real code fragment:

##
class PredicateParser(object, metaclass=ABCMeta):
"""
Parses a given predicate (which may participate in several 
relationships)
of a given RDF node.
"""

def __init__(self, predicate):
self.predicate = predicate

@abstractmethod
def parse(self, parse_context, graph, node):
pass
##

Now I need to add new field on_error (taking one of three enumerated values) 
to some objects of this class.

What is more pythonic?

1. Create its subclass PredicateParserWithError and add the additional field 
on_error to this class.

2. Add on_error field to the base class, setting it to None by default, if 
the class's user does not need this field.

-- 
Victor Porton - http://portonvictor.org
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2018-02-11 Thread alister via Python-list
On Sat, 10 Feb 2018 17:12:54 +1200, mm0fmf wrote:

> On 09/02/2018 21:05, codewiz...@gmail.com wrote:
>> On Friday, February 9, 2018 at 2:48:17 PM UTC-5, Chris Green wrote:
>>> codew...@gmail.com wrote:
 On Saturday, February 3, 2018 at 7:15:16 PM UTC-5, pyotr filipivich
 wrote:
> [snip]
>  Those of us who do not use google-groups may not notice the
>  loss
> of the google groupies.

 I use GG to read comp.lang.python because of the following
 combination of factors. I would definitely be happier if there was
 another way to do this, so that I wouldn't have to wade through lots
 of spam.

- I read it from both home and work.

- I can't install any additional software at work.

- There is no newsgroup reader software available at work.

- GG tracks read/unread status of every post. This is shared
  between work and home through my Google account.

- When I (very rarely) post from work, I can't
  do it by email, since outgoing email is blocked.

>>> Alternative approach, what I do:-
>>>
>>>  Run a text mode (but very capable and mouse aware) newsreader on
>>>  my home system, read news locally using that.
>>>
>>>  Use ssh (is that available at worK?) to connect from work to home
>>>  and run the same newsreader in the same environment. If you can't
>>>  even ssh from work then you can always use an 'ssh from the web'
>>>  app from your wenb browser.
>>>
>>> The newsreader I use is tin by the way.
>>>
>>> --
>>> Chris Green â·
>>
>> ssh would be even a bigger problem here. As I mentioned, I can't even
>> email from work to the outside! All web sites that provide remote
>> connectivity tools are blocked.
>>
>> Regards,
>> Igor.
>>
> If they take such restrictive practices then maybe should consider
> *just* doing your job when at work and leave the browsing to your own
> time?


I would also suggest that you consider the above statement ha snot been 
made out of malice but is trying to protect you.  if the restrictions are 
as strict as you say and you get seen you will probably loose your job.



-- 
Xerox does it again and again and again and ...
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32758] Stack overflow when parse long expression to AST

2018-02-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

> The other option is to simply not worry about it and acknowledge you can
> crash the compiler with a crazy-sized expression.

Agreed, this is the most practical option. Do you want to write such 
acknowledgement?

--

___
Python tracker 

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



[issue32370] Wrong ANSI encoding used by subprocess for some locales

2018-02-11 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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



[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-02-11 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
nosy:  -pitrou

___
Python tracker 

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



[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-02-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This should remain everyone that backporting performance improvements is not a 
no-brainer.

--
nosy: +pitrou

___
Python tracker 

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



[issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers

2018-02-11 Thread Christian Heimes

Christian Heimes  added the comment:

I don't see the issue as critical. For me, the method is just a debugging tool. 
Benjamin, for which purpose did you add the method?

--

___
Python tracker 

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



[issue32397] textwrap output may change if you wrap a paragraph twice

2018-02-11 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
type:  -> behavior
versions: +Python 3.6, Python 3.8

___
Python tracker 

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



[issue32792] ChainMap should preserve order of underlying mappings

2018-02-11 Thread Raymond Hettinger

Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue32792] ChainMap should preserve order of underlying mappings

2018-02-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I referred to msg311969, not msg311822.

--

___
Python tracker 

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



[issue32792] ChainMap should preserve order of underlying mappings

2018-02-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> The code in msg311969 doesn't reuse hash values.

That doesn't make sense.  The dict.update() method reuses the hashes of the 
input mappings when possible.

>>> from collections import ChainMap
>>> class Int(int):
def __hash__(self):
print(f'Hashing {self}', file=sys.stderr)
return int.__hash__(self)


>>> import sys
>>> d = { Int(1): 'f1', Int(2): 'f2' }
Hashing 1
Hashing 2
>>> e = { Int(1): 's1', Int(3): 's3' }
Hashing 1
Hashing 3
>>> c = ChainMap(d, e)
>>> list(c) # Note, no calls to hash() were made
[1, 3, 2]

--

___
Python tracker 

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



[issue32792] ChainMap should preserve order of underlying mappings

2018-02-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset 170b3f79506480f78275a801822c9ff1283e16f2 by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.7':
bpo-32792: Preserve mapping order in ChainMap() (GH-5586) (#GH-5617)
https://github.com/python/cpython/commit/170b3f79506480f78275a801822c9ff1283e16f2


--

___
Python tracker 

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



[issue32792] ChainMap should preserve order of underlying mappings

2018-02-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The code in msg311969 doesn't reuse hash values. The following implementations 
do this:

return iter({**m for m in reversed(self.maps)})

or, without keeping reverences to values:

return iter(list({**m for m in reversed(self.maps)}))

--

___
Python tracker 

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



[issue32642] add support for path-like objects in sys.path

2018-02-11 Thread Jay Yin

Jay Yin  added the comment:

Thanks for the reply

--

___
Python tracker 

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



[issue32792] ChainMap should preserve order of underlying mappings

2018-02-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

On PR 5586 we discussed reverting the order of the iteration by mappings. There 
are reasons of doing this. But this adds a subtle behavior change. Currently 
list(ChainMap({1: int}, {1.0: float})) returns [1]. With reversed() it will 
return [1.0]. This change LGTM.

--

___
Python tracker 

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



[issue32792] ChainMap should preserve order of underlying mappings

2018-02-11 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5427

___
Python tracker 

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



[issue32792] ChainMap should preserve order of underlying mappings

2018-02-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset 3793f95f98c3112ce447288a5bf9899eb9e35423 by Raymond Hettinger in 
branch 'master':
bpo-32792: Preserve mapping order in ChainMap() (GH-5586)
https://github.com/python/cpython/commit/3793f95f98c3112ce447288a5bf9899eb9e35423


--

___
Python tracker 

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