[issue37673] Tkinter won't create 5000 check boxes, stops at 1309.

2019-07-26 Thread Lou Perazzoli

Lou Perazzoli  added the comment:

Thanks for the reply. I’ll make it simpler 

Regards
Lou

> On Jul 26, 2019, at 9:26 PM, Terry J. Reedy  wrote:
> 
> 
> Terry J. Reedy  added the comment:
> 
> It stopped at 1309 for me too, running with IDLE, then added 4999 and the 
> quit button, which did not work.  If you can, try to make the code simpler.  
> Here is one guide.
> https://stackoverflow.com/help/minimal-reproducible-example
> 
> However, limitations in tcl/tk are out of our control.  So we may close this 
> as 3rd party.  Python also has undocumented limitations, which we close as 
> "won't fix".
> 
> --
> nosy: +serhiy.storchaka, terry.reedy
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue37691] Let math.dist() accept coordinates as sequences

2019-07-26 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
keywords: +patch
pull_requests: +14744
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14975

___
Python tracker 

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



[issue37691] Let math.dist() accept coordinates as sequences

2019-07-26 Thread Raymond Hettinger


New submission from Raymond Hettinger :

I did some user testing with Python 3.8 and found that math.dist() was a little 
restrictive in only accepting coordinates as tuples.  Mostly it worked out fine 
except but was a little inconvenient with generalized unpacking:

   label, *coordinates = cursor.fetchone()  # coordinates is a list

Also, it would be nice to allow numpy arrays as arguments.

--
assignee: rhettinger
components: Library (Lib)
messages: 348541
nosy: mark.dickinson, rhettinger, tim.peters
priority: normal
severity: normal
status: open
title: Let math.dist() accept coordinates as sequences
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue37673] Tkinter won't create 5000 check boxes, stops at 1309.

2019-07-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

It stopped at 1309 for me too, running with IDLE, then added 4999 and the quit 
button, which did not work.  If you can, try to make the code simpler.  Here is 
one guide.
https://stackoverflow.com/help/minimal-reproducible-example

However, limitations in tcl/tk are out of our control.  So we may close this as 
3rd party.  Python also has undocumented limitations, which we close as "won't 
fix".

--
nosy: +serhiy.storchaka, terry.reedy

___
Python tracker 

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



[issue17535] IDLE editor line numbers

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset f6ab188323444fe0dd916ed3860cc5c8806caa16 by Miss Islington (bot) 
in branch '3.8':
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
https://github.com/python/cpython/commit/f6ab188323444fe0dd916ed3860cc5c8806caa16


--

___
Python tracker 

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



[issue17535] IDLE editor line numbers

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset 9e7697b3c55e0bd8663cf0641d4718e853af2d9c by Miss Islington (bot) 
in branch '3.7':
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
https://github.com/python/cpython/commit/9e7697b3c55e0bd8663cf0641d4718e853af2d9c


--

___
Python tracker 

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



[issue17535] IDLE editor line numbers

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14743
pull_request: https://github.com/python/cpython/pull/14974

___
Python tracker 

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



[issue17535] IDLE editor line numbers

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14742
pull_request: https://github.com/python/cpython/pull/14973

___
Python tracker 

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



[issue17535] IDLE editor line numbers

2019-07-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 46ebd4a6a22431ce9676546d2bbe5a6dcd1cc1c1 by Terry Jan Reedy (Tal 
Einat) in branch 'master':
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
https://github.com/python/cpython/commit/46ebd4a6a22431ce9676546d2bbe5a6dcd1cc1c1


--

___
Python tracker 

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



[issue37652] Multiprocessing shared_memory ValueError on race with ShareableList

2019-07-26 Thread mental


mental  added the comment:

> The root of the error is that struct.pack_into starts by memsetting the 
> underlying memory area with NULL bytes before filling the data with memcpy.

I've had a fix spinning for about a day now, it introduced a 
`multiprocessing.Lock` and it was simply wrapped around any struct packing and 
unpacking calls.

I've been reluctant to submit anything due to a suspicious resource warning I 
kept seeing about leaked shared_memory objects appearing spuriously and I 
wanted to rule out the possibility that other tests were causing a side effect.

Also I wanted to hear an expert from the noisy list share their thoughts.

> I'm not sure this should be done internally

I agree, even with my patch not reproducing the issue I didn't like placing a 
lock around various components in the class.

> +1 For a documentation addition.

If there are no objections, I'll submit a PR with a doc update :)

@Pierre mind if I cc' you for a review?

--

___
Python tracker 

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



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread David Edelsohn


David Edelsohn  added the comment:

Runtime linking allows a dynamically loaded library to interpose symbols. The 
classic example is allowing a program or dynamic library to overload C++ 
operator new. A library or program overrides the symbol by name.

Python does not require this. Python does not need to allow an extension module 
to override a function in Python.

If one needs to add AIX ld -G and runtime linking, 99% of the time one is 
covering up a problem.

The downside of -G is that it forces all global functions to be called through 
the AIX glink code (equivalent to SVR4 PLT) and not inlined.  This allows every 
global function call to be overriden, but forces every call to go through a 
function pointer. This is expensive.

Calling functions through the "PLT" requires that the function pointers for 
each global function be placed in the AIX TOC (equivalent to SVR4 GOT).  If the 
program or shared library is large enough, this can overflow the "GOT", which 
then requires even more expensive fixup code.

The mistaken use of this option leads down a path with bad performance and 
potentially requiring more and more effort to recover from problems introduced 
by the choice.

I don't know exactly the symptoms that you observed, but one possibility is 
that the shared object you are building is not being linked against all of the 
dependent libraries.

Separate from runtime linking, SVR4 allows unresolved symbols when a shared 
library is created and used to export all global symbols by default (before the 
efforts on symbol visibility). A simplistic way of describing this is that a 
process into which an executable and shared libraries are loaded sort of has 
this soup of all global symbols floating around and available to the runtime 
loader.  When a new shared library is loaded, the dynamic linker can resolve 
the symbols from any definitions available in the process.  Allowing the 
unresolved symbols at shared library link time is a promise that the symbols 
will be provided by someone at runtime. At runtime, all of the symbol needs and 
definitions are thrown in the air and hopefully match up correctly when first 
referenced at runtime.

AIX requires that all shared objects be fully resolved at link-edit time.  It 
requires that the shared object refer to all dependent libraries at link time, 
even if those libraries also will be present and provided by other shared 
libraries or executable at runtime.

In other words, on AIX, one must link all C++ shared objects against the C++ 
standard library, even if the main executable is linked against the library.

So, again, one possible explanation for the error of missing symbols is that 
one or more dependent libraries are missing from the link command building the 
shared object and that omission coincidentally happens to work on SVR4/Linux 
because of its semantics, but it doesn't work in the more strict environment of 
AIX.

This type of error should not be solved through runtime linking to borrow the 
missing symbols from the running process, which is a very expensive solution.

--

___
Python tracker 

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



[issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently

2019-07-26 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

I'll take a crack at adding support for Path('.').name == '.'.

--

___
Python tracker 

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



[issue11953] Missing WSA* error codes

2019-07-26 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue11602] python-config code should be in sysconfig

2019-07-26 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue33439] python-config.py should be part of the stdlib

2019-07-26 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



TypeError: 'top_block_22' object is not callable

2019-07-26 Thread nice guy4
Hi,

This is AJAX to flask server project.
For more info about this project I have a couple postings about it here,
please see link-1

 link-2



When I run the python code in the terminal I get the TypeError:
'top_block_22' object is not callable error. The program starts running
without problems, but once I start moving the slider the program will give
that error.

More details:

This is AJAX to flask server project. I created a 'Slider' folder inside
Flask directory : /home/fit-pc/my_flask_app/virtualenv/Slider. In this
folder I have Templates and Static folders. Inside Templates folder I have
my index.html file (see below). This index.html file had the script for the
roundSlider widget that I am trying to use to control some variable value
inside my python code 'top_block_22.py'. My main python code is in the main
Slider folder. Static folder is just empty. Please, I need your help to
solve this problem.



error log:

fit-pc@fitpc-fitlet2:~$ python /home/fit-pc/my_flask_app/virtualenv/Slider/
top_block_22.py
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 269-962-008
127.0.0.1 - - [26/Jul/2019 11:20:11] "GET / HTTP/1.1" 200 -
gr::log :INFO: audio source - Audio sink arch: alsa
127.0.0.1 - - [26/Jul/2019 11:20:15] "GET /valueofslider?slide_val=903
HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1997, in
__call__
return self.wsgi_app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1985, in
wsgi_app
response = self.handle_exception(e)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1540, in
handle_exception
reraise(exc_type, exc_value, tb)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1982, in
wsgi_app
response = self.full_dispatch_request()
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1615, in
full_dispatch_request
return self.finalize_request(rv)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1630, in
finalize_request
response = self.make_response(rv)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1740, in
make_response
rv = self.response_class.force_type(rv, request.environ)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wrappers.py", line 921, in
force_type
response = BaseResponse(*_run_wsgi_app(response, environ))
  File "/usr/lib/python2.7/dist-packages/werkzeug/wrappers.py", line 59, in
_run_wsgi_app
return _run_wsgi_app(*args)
  File "/usr/lib/python2.7/dist-packages/werkzeug/test.py", line 923, in
run_wsgi_app
app_rv = app(environ, start_response)
TypeError: 'top_block_22' object is not callable


And here is the Python code:

from gnuradio import analog
   from gnuradio import audio
   from gnuradio import blocks
   from gnuradio import eng_notation
   from gnuradio import gr
   from gnuradio.eng_option import eng_option
   from gnuradio.filter import firdes
   from optparse import OptionParser
   from flask import Flask, render_template, jsonify, request, redirect,
url_for
   from random import randint


   class top_block_22(gr.top_block):


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

   gr.top_block.__init__(self, "Top Block 22")

   ##
   # Variables
   ##
   self.samp_rate = samp_rate = 32000

   ##
   # Blocks
   ##
   self.blocks_add_xx = blocks.add_vff(1)
   self.audio_sink = audio.sink(32000, '', True)
   self.analog_sig_source_x_1 = analog.sig_source_f(samp_rate,
analog.GR_COS_WAVE, 440, 0.4, 0)
   self.analog_sig_source_x_0 = analog.sig_source_f(samp_rate,
analog.GR_COS_WAVE, 350, 0.4, 0)
   self.analog_noise_source_x_0 =
analog.noise_source_f(analog.GR_GAUSSIAN,
0.005, -42)

   ##
   # Connections
   ##
   self.connect((self.analog_noise_source_x_0, 0), (self.blocks_add_xx,
2))
   self.connect((self.analog_sig_source_x_0, 0), (self.blocks_add_xx,
0))
   self.connect((self.analog_sig_source_x_1, 0), (self.blocks_add_xx,
1))
   self.connect((self.blocks_add_xx, 0), (self.audio_sink, 0))

   app = Flask(__name__)
   @app.route('/')
   def hex_color():
   return render_template("index.html")
   @app.route('/valueofslider')
   def slide():
   slide_val = request.args.get('slide_val')
   return top_block_22(slide_val)


   def 

[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset 06e8fc95d138775e942c18c8e47e72cdcc32f95c by Miss Islington (bot) 
in branch '3.8':
bpo-32910: Remove implementation detail in venv documentation. (GH-14968)
https://github.com/python/cpython/commit/06e8fc95d138775e942c18c8e47e72cdcc32f95c


--

___
Python tracker 

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



[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset 4b6421c61e9335253ea7004f2878317b88096c30 by Miss Islington (bot) 
in branch '3.7':
bpo-32910: Remove implementation detail in venv documentation. (GH-14968)
https://github.com/python/cpython/commit/4b6421c61e9335253ea7004f2878317b88096c30


--
nosy: +miss-islington

___
Python tracker 

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



[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:


New changeset 91e49575095ca16d1b67dd8822deeb7885e421da by Steve Dower (Derek 
Keeler) in branch 'master':
bpo-32910: Remove implementation detail in venv documentation. (GH-14968)
https://github.com/python/cpython/commit/91e49575095ca16d1b67dd8822deeb7885e421da


--

___
Python tracker 

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



[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14741
pull_request: https://github.com/python/cpython/pull/14972

___
Python tracker 

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



Re: Why am I getting duplicate values in my output?

2019-07-26 Thread Richard Damon
On 7/26/19 5:19 PM, DT wrote:
> On Thursday, July 25, 2019 at 9:57:38 PM UTC-5, Chris Angelico wrote:
>> On Fri, Jul 26, 2019 at 12:46 PM DT  wrote:
>>> def main():
>>> ap_list = []
>>> ap_dict = {}
>>>
>>> for row in csv_reader:
>>> ap_dict['ap_name'] = ap.name
>>> ap_dict['ap_ipv4'] = ap.ipv4
>>> ap_dict['ap_model'] = ap.model
>>> ap_dict['ap_location'] = ap.location
>>>
>>> ap_list.append(ap_dict)
>>>
>>> print(ap_list)
>>>
>>>
>>> When I execute print(ap_list) I get the very last row in the CSV repeated 
>>> once for every row in the file. I would expect to see a list of ap_dicts, 
>>> but I do not. When I add print(ap_dict) directly after the 
>>> ap_list.append(ap_dict) inside the loop I see the correct values. Why is it 
>>> that the print(ap_list) that happens outside of the for loop is only 
>>> printing the last item on repeat?
>>>
>> You create one dictionary, and then reuse it every time. Appending it
>> to a list doesn't change it, which means you keep overwriting the same
>> dictionary every time you go through the loop.
>>
>> Try creating a new dictionary for each row; in fact, you can simplify
>> things significantly by using a dict literal (or, more technically,
>> "dict display") to create a new dictionary with the four fields
>> already set. You could even do that in the same operation as appending
>> to the list.
>>
>> ChrisA
> That is interesting to know. I guess I was confused because when I put in a 
> print(ap_dict) in the for loop, it printed out the contents of the dict 
> correctly for each pass. I assumed that when I then added that dict into the 
> list that the list would be appended with that iterations values. I guess I 
> have a bit to learn about how things are referenced in Python.
>
> Thanks for the hint. I updated my code and it works correctly now.

dictionaries are mutable.

appending the dictionary to the list adds a reference to that dictionary
to the list, if you change the dictionary latter on, the list is still
refering to that now changed dictionary.

Either you need to copy the dictionary, and add the new copy, or create
a new copy with each iteration of the loop.

At the end of the loop, ap_list is a list of all the same dictionary,
the same one that ap_dict is bound to, you just kept changing it every
time through the loop.

if ap_dict was set to a new empty dictionary in the loop, then all the
copies would be distinct.

-- 
Richard Damon

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


[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14740
pull_request: https://github.com/python/cpython/pull/14971

___
Python tracker 

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



[issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently

2019-07-26 Thread Brett Cannon


Brett Cannon  added the comment:

Anyone up for doing a PR that makes Path('.').name == '.'? It would be good to 
see if that would break the stdlib as a proxy as to how many people might be 
relying on these semantics. My hope is nothing breaks in which case we can make 
the change in 3.9 and notify people in What's New of the new, consistent 
semantics.

--

___
Python tracker 

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



[issue35712] Make NotImplemented unusable in boolean context

2019-07-26 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Moving to 3.9 target, per Serhiy's request. PR has been rebased against master, 
including updating the What's New info to be in the 3.9 version, not 3.8.

--
versions: +Python 3.9 -Python 3.8

___
Python tracker 

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



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Kirill Balunov

Kirill Balunov  added the comment:

I am reading "equivalence" too strictly (like "as a substitute"), because this 
is part of the documentation :) and I agree that in ordinary speech I would use 
it rather in the sense of “similar”.

In order to make sure, that everyone agrees only on that this requires only a 
documentation change? Because as for me, I think that it will better for 
`os.path.isdir` to raise `ValueError` or `DeprecationWarning` - `False` on 
empty string is not well defined behavior. But I'm fine to be alone with the 
last one.

--

___
Python tracker 

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



Re: Why am I getting duplicate values in my output?

2019-07-26 Thread DT
On Thursday, July 25, 2019 at 9:57:38 PM UTC-5, Chris Angelico wrote:
> On Fri, Jul 26, 2019 at 12:46 PM DT  wrote:
> > def main():
> > ap_list = []
> > ap_dict = {}
> >
> > for row in csv_reader:
> > ap_dict['ap_name'] = ap.name
> > ap_dict['ap_ipv4'] = ap.ipv4
> > ap_dict['ap_model'] = ap.model
> > ap_dict['ap_location'] = ap.location
> >
> > ap_list.append(ap_dict)
> >
> > print(ap_list)
> >
> >
> > When I execute print(ap_list) I get the very last row in the CSV repeated 
> > once for every row in the file. I would expect to see a list of ap_dicts, 
> > but I do not. When I add print(ap_dict) directly after the 
> > ap_list.append(ap_dict) inside the loop I see the correct values. Why is it 
> > that the print(ap_list) that happens outside of the for loop is only 
> > printing the last item on repeat?
> >
> 
> You create one dictionary, and then reuse it every time. Appending it
> to a list doesn't change it, which means you keep overwriting the same
> dictionary every time you go through the loop.
> 
> Try creating a new dictionary for each row; in fact, you can simplify
> things significantly by using a dict literal (or, more technically,
> "dict display") to create a new dictionary with the four fields
> already set. You could even do that in the same operation as appending
> to the list.
> 
> ChrisA

That is interesting to know. I guess I was confused because when I put in a 
print(ap_dict) in the for loop, it printed out the contents of the dict 
correctly for each pass. I assumed that when I then added that dict into the 
list that the list would be appended with that iterations values. I guess I 
have a bit to learn about how things are referenced in Python.

Thanks for the hint. I updated my code and it works correctly now.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31652] make install fails: no module _ctypes

2019-07-26 Thread Thomas Dybdahl Ahle


Thomas Dybdahl Ahle  added the comment:

Installing libffi-dev worked for me.

--
nosy: +thomasahle

___
Python tracker 

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



[issue15987] Provide a way to compare AST nodes for equality recursively

2019-07-26 Thread Flavian Hautbois


Change by Flavian Hautbois :


--
keywords: +patch
pull_requests: +14739
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/14970

___
Python tracker 

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



[issue37684] list.extend docs inaccurate

2019-07-26 Thread Kyle Stanley


Kyle Stanley  added the comment:

Upon further consideration, I think the code example suggestion I made using 
the interpreter could be in a separate PR or issue and doesn't have to replace 
the the current "Equivalent to ..." portion. I'll open a separate PR for that 
(which isn't attached to this issue). Apologies if that at all derailed this 
conversation, as it might not be directly relevant (even if it's within the 
same section).

--

___
Python tracker 

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



[issue35524] using/windows launcher image might be deprecated

2019-07-26 Thread Steve Dower


Change by Steve Dower :


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



[issue35524] using/windows launcher image might be deprecated

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:


New changeset 886e66d111b6b865e582d8cc7974d5c0b398da99 by Steve Dower in branch 
'3.8':
bpo-35524: Update Windows installer image in docs (GH-14966)
https://github.com/python/cpython/commit/886e66d111b6b865e582d8cc7974d5c0b398da99


--

___
Python tracker 

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



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread Eric N. Vander Weele


Eric N. Vander Weele  added the comment:

> This is horrible and completely wrong.

I'm not an expert in AIX and xlc, by any means.  I would greatly appreciate 
your help to better understand so I can see the problem in the way you are to 
figure the best approach I can take.

My primary motivation was to simplify/homogenize the mechanism by which Python 
C/C++ extensions are built.  For background, I have Python applications and 
libraries that need to run on Linux, Solaris, and AIX.  One of the challenges 
we ran into was how and when symbol resolution occurs, which is fundamentally 
different in AIX.

> Python does not require dynamic linking.

I understand Python does not require dynamic linking.  However, the problem I 
am running into is how this should work/behave for Python C/C++ extensions, 
which are imported (loaded) at runtime of a Python application.  Maybe this is 
where I have a fundamental misunderstanding, but it led me to believe that in 
AIX this should behave similarly to SVR4/Linux.  When scouring how Python 
interplays with AIX for building Python C/C++ extensions, this problem piqued 
my interest.

When conducting my self-research, I came across 
http://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf, which 
helped me in understanding the differences between dynamic loading run-time 
linking.  Thus, I went down the path of run-time linking with the '-G' flag, 
which appeared similar to what was done in Python for other operating systems.

> This simply is masking a symptom in a naive and incorrect manner.

This is leading up to my misunderstanding of what I was observing during my 
initial investigation of what was going on.

I'll need to revisit the symptom being observed, but I vaguely recall missing 
symbols when building Python C/C++ extensions when the interpreter is 
configured with '--enable-shared'.  Let me go back, undo the patch I have, and 
recreate the symptom/issue that was observed.

> Use of runtime linking causes many internal changes to the behavior of AIX 
> applications, severely affecting performance and potentially causing overflow 
> of data structures.

I'm really curious about this one.  What internal changes, performance 
concerns, and overflow of data structures could occur?  Luckily, I have 
observed nor experienced anything egregiously negative, thus far.  
Understanding these concerns will help bolster my understanding.

> I absolutely will not allow Python to go down this path and introduce this 
> type of mistake.

No worries.  I'm trying to solve a problem and appeared to have gone down an 
incorrect path.  Being able to better understand what the desired expectation 
is for Python and associated C/C++ extensions, will help guide me to focus 
where the misunderstanding is and to redirect focus on where the problem is 
that needs to be addressed.

--

___
Python tracker 

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



[issue35524] using/windows launcher image might be deprecated

2019-07-26 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +14738
pull_request: https://github.com/python/cpython/pull/14969

___
Python tracker 

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



[issue35524] using/windows launcher image might be deprecated

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:


New changeset 9d9893a1c85e07f7369c848acb0aed3b8fe6c3af by Steve Dower in branch 
'master':
bpo-35524: Update Windows installer image in docs (GH-14966)
https://github.com/python/cpython/commit/9d9893a1c85e07f7369c848acb0aed3b8fe6c3af


--

___
Python tracker 

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



[issue37685] Fix equality checks for some types

2019-07-26 Thread Vedran Čačić

Vedran Čačić  added the comment:

Thanks for the clarification. Yes, now I see how it really works, but I saw 
some comment about not wanting to backport it to 3.7, because it changes the 
semantics. Now that I understand the implementation, it seems to me that it 
really doesn't change the semantics, except in some weird cases like the 
objects "accidentally" having the sought attributes. But nevermind, I'm fine 
with that -- I'm just saying that's the reason I thought the change is much 
greater than it really is.

--

___
Python tracker 

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



[issue37635] Using constant for whence arg in seek()

2019-07-26 Thread Kyle Stanley


Kyle Stanley  added the comment:

> I don't know. "whence" is the official name of the argument in the POSIX API

> Perhaps "from_what" is assumed to be more understandable by the average 
> reader?

>From looking at the blame on GitHub, it looks like the use of the "from_what" 
>argument in the tutorial has been there for more than 12 years, since the last 
>commit was a massive move of the doc tree.  The documentation for the IO 
>module was added exactly 12 years (which included the usage of the *whence* 
>argument rather than *from_what*) ago by birkenfield. Based on that 
>information, I think the most likely answer is that the argument used to be 
>*from_what* in a much older version of Python. To conform to the posix 
>standard, it was changed to *whence*, but the tutorial was never updated.

If it was simply never updated, I think that it would be better to change it to 
*whence*. The difference would be more likely to confuse new users of the 
language, if they were to start with the tutorial and later refer to the IO 
module documentation. 

Also the tutorial provides a fairly in-depth explanation of the purpose of the 
argument within seek(), so I don't think using "from_what" as the name makes 
its purpose any more clear to the users.

--

___
Python tracker 

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



[issue37635] Using constant for whence arg in seek()

2019-07-26 Thread Kyle Stanley


Kyle Stanley  added the comment:

Clarification: By "latest commit" should be "oldest commit" with regards to the 
oldest commit in GitHub's history of the section of the "inputouput" tutorial 
that used the *from_what* argument for seek().

--

___
Python tracker 

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



Re: bool(Enum) should raise ValueError

2019-07-26 Thread Chris Angelico
On Sat, Jul 27, 2019 at 5:16 AM Erik Aronesty  wrote:
>
> I just spend a while tracking down and killing all "if Enum" and "if not
> Enum" bugs in my code.   I was frankly shocked that this didn't raise a
> ValueError to begin with.
>
> Apparently all enums are true/false depending on whether the underlying
> value is truthy or falsy.
>
> Which breaks the abstraction Enum's are trying to achieve because now the
> user of an Enum has to know "stuff" about the underlying value and how it
> behaves.

If you want to abstract away the underlying value, just don't have one?

>>> from enum import Enum, auto
>>> class Color(Enum):
... red = auto()
... green = auto()
... blue = auto()
...
>>> bool(Color.red)
True
>>> bool(Color.green)
True
>>> bool(Color.blue)
True

They happen to have the values 1, 2, and 3, but that doesn't matter.

When an enum has to correspond to a real underlying value, it behaves
as similarly to that value as possible:

>>> http.HTTPStatus.METHOD_NOT_ALLOWED == 405
True

Thus it should also inherit its truthiness from that value.

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


Re: bool(Enum) should raise ValueError

2019-07-26 Thread Ethan Furman

On 07/26/2019 11:56 AM, Erik Aronesty wrote:


I just spend a while tracking down and killing all "if Enum" and "if not
Enum" bugs in my code.   I was frankly shocked that this didn't raise a
ValueError to begin with.


Very few items, if any, raise a ValueError when asked for its True/False 
equivalence.


Apparently all enums are true/false depending on whether the underlying
value is truthy or falsy.


That is the default.  You can, of course, change that:

  class AlwaysFalse(Enum):
  def __bool__(self):
  return False

  class AlwaysTrue(Enum):
  def __bool__(self):
  return True


Which breaks the abstraction Enum's are trying to achieve because now the
user of an Enum has to know "stuff" about the underlying value and how it
behaves.


You can make it always fail:

  class OnTheFence(Enum):
  def __bool__(self):
  raise ValueError('%s members are neither True nor False' % 
self.__class__.__name__)

The default Enum always returns True because the default Enum starts counting 
at 1.

Perhaps you could share your Enum definition and what you expected to happen 
when you used it in a boolean context?

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


bool(Enum) should raise ValueError

2019-07-26 Thread Erik Aronesty
I just spend a while tracking down and killing all "if Enum" and "if not
Enum" bugs in my code.   I was frankly shocked that this didn't raise a
ValueError to begin with.

Apparently all enums are true/false depending on whether the underlying
value is truthy or falsy.

Which breaks the abstraction Enum's are trying to achieve because now the
user of an Enum has to know "stuff" about the underlying value and how it
behaves.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread David Edelsohn


David Edelsohn  added the comment:

Absolutely, positively no.  This is horrible and completely wrong.

Applications on AIX should not be compiled to allow dynamic linking to make 
them operate more like SVR4/Linux.  Python does not require dynamic linking. 
This simply is masking a symptom in a naive and incorrect manner. Use of 
runtime linking causes many internal changes to the behavior of AIX 
applications, severely affecting performance and potentially causing overflow 
of data structures.

We currently are going through the process of removing this brain damage from 
CMake.  I absolutely will not allow Python to go down this path and introduce 
this type of mistake.

--

___
Python tracker 

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



[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2019-07-26 Thread Derek Keeler


Change by Derek Keeler :


--
keywords: +patch
pull_requests: +14737
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14968

___
Python tracker 

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



[issue35667] activate for venv containing apostrophe doesn't work in powershell

2019-07-26 Thread Derek Keeler


Change by Derek Keeler :


--
keywords: +patch
pull_requests: +14736
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14967

___
Python tracker 

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



NumPy 1.17.0 released

2019-07-26 Thread Charles R Harris
Hi All,

On behalf of the NumPy team I am pleased to announce the release of NumPy
1.17.0. The 1.17.0 release contains a number of new features that should
substantially improve its performance and usefulness. The Python versions
supported are 3.5-3.7, note that Python 2.7 has been dropped. Python 3.8b2
should work with the released source packages, but there are no guarantees
about future releases. Highlights of this release are:

   - A new extensible random module along with four selectable random
   number generators and improved seeding designed for use in parallel
   processes has been added. The currently available bit generators are
   MT19937, PCG64, Philox, and SFC64.
   - NumPy's FFT implementation was changed from fftpack to pocketfft,
   resulting in faster, more accurate transforms and better handling of
   datasets of prime length.
   - New radix sort and timsort sorting methods. It is currently not
   possible to choose which will be used, but they are hardwired to the
   datatype and used when either ``stable`` or ``mergesort`` is passed as the
   method.
   - Overriding numpy functions is now possible by default

Downstream developers should use Cython >= 0.29.10 for Python 3.8 support
and OpenBLAS >= 3.7 (not currently out) to avoid problems on the Skylake
architecture. The NumPy wheels on PyPI are built from the OpenBLAS
development branch in order to avoid those problems. Wheels for this
release can be downloaded from PyPI ,
source archives and release notes are available from Github
.

*Contributors*

A total of 150 people contributed to this release.  People with a "+" by
their
names contributed a patch for the first time.


   - Aaron Voelker +
   - Abdur Rehman +
   - Abdur-Rahmaan Janhangeer +
   - Abhinav Sagar +
   - Adam J. Stewart +
   - Adam Orr +
   - Albert Thomas +
   - Alex Watt +
   - Alexander Blinne +
   - Alexander Shadchin
   - Allan Haldane
   - Ander Ustarroz +
   - Andras Deak
   - Andrea Pattori +
   - Andreas Schwab
   - Andrew Naguib +
   - Andy Scholand +
   - Ankit Shukla +
   - Anthony Sottile
   - Antoine Pitrou
   - Antony Lee
   - Arcesio Castaneda Medina +
   - Assem +
   - Bernardt Duvenhage +
   - Bharat Raghunathan +
   - Bharat123rox +
   - Bran +
   - Bruce Merry +
   - Charles Harris
   - Chirag Nighut +
   - Christoph Gohlke
   - Christopher Whelan +
   - Chuanzhu Xu +
   - Colin Snyder +
   - Dan Allan +
   - Daniel Hrisca
   - Daniel Lawrence +
   - Debsankha Manik +
   - Dennis Zollo +
   - Dieter Werthmüller +
   - Dominic Jack +
   - EelcoPeacs +
   - Eric Larson
   - Eric Wieser
   - Fabrice Fontaine +
   - Gary Gurlaskie +
   - Gregory Lee +
   - Gregory R. Lee
   - Guillaume Horel +
   - Hameer Abbasi
   - Haoyu Sun +
   - Harmon +
   - He Jia +
   - Hunter Damron +
   - Ian Sanders +
   - Ilja +
   - Isaac Virshup +
   - Isaiah Norton +
   - Jackie Leng +
   - Jaime Fernandez
   - Jakub Wilk
   - Jan S. (Milania1) +
   - Jarrod Millman
   - Javier Dehesa +
   - Jeremy Lay +
   - Jim Turner +
   - Jingbei Li +
   - Joachim Hereth +
   - Johannes Hampp +
   - John Belmonte +
   - John Kirkham
   - John Law +
   - Jonas Jensen
   - Joseph Fox-Rabinovitz
   - Joseph Martinot-Lagarde
   - Josh Wilson
   - Juan Luis Cano Rodríguez
   - Julian Taylor
   - Jérémie du Boisberranger +
   - Kai Striega +
   - Katharine Hyatt +
   - Kevin Sheppard
   - Kexuan Sun
   - Kiko Correoso +
   - Kriti Singh +
   - Lars Grueter +
   - Luis Pedro Coelho
   - Maksim Shabunin +
   - Manvi07 +
   - Mark Harfouche
   - Marten van Kerkwijk
   - Martin Reinecke +
   - Matthew Brett
   - Matthias Bussonnier
   - Matti Picus
   - Michel Fruchart +
   - Mike Lui +
   - Mike Taves +
   - Min ho Kim +
   - Mircea Akos Bruma
   - Nick Minkyu Lee
   - Nick Papior
   - Nick R. Papior +
   - Nicola Soranzo +
   - Nimish Telang +
   - OBATA Akio +
   - Oleksandr Pavlyk
   - Ori Broda +
   - Paul Ivanov
   - Pauli Virtanen
   - Peter Andreas Entschev +
   - Peter Bell +
   - Pierre de Buyl
   - Piyush Jaipuriayar +
   - Prithvi MK +
   - Raghuveer Devulapalli +
   - Ralf Gommers
   - Richard Harris +
   - Rishabh Chakrabarti +
   - Riya Sharma +
   - Robert Kern
   - Roman Yurchak
   - Ryan Levy +
   - Sebastian Berg
   - Sergei Lebedev +
   - Shekhar Prasad Rajak +
   - Stefan van der Walt
   - Stephan Hoyer
   - Steve Stagg +
   - SuryaChand P +
   - Søren Rasmussen +
   - Thibault Hallouin +
   - Thomas A Caswell
   - Tobias Uelwer +
   - Tony LaTorre +
   - Toshiki Kataoka
   - Tyler Moncur +
   - Tyler Reddy
   - Valentin Haenel
   - Vrinda Narayan +
   - Warren Weckesser
   - Weitang Li
   - Wojtek Ruszczewski
   - Yu Feng
   - Yu Kobayashi +
   - Yury Kirienko +
   - @aashuli +
   - @luzpaz
   - @parul +
   - @spacescientist +

Cheers,

Charles Harris
--
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to 

[issue37685] Fix equality checks for some types

2019-07-26 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Serhiy: Is there a reason not to use the functools.total_ordering decorator on 
TimerHandle, so you can get rid of __le__/__ge__/__gt__ rather than fixing them 
individually? I notice at least one behavioral difference (total_ordering's 
le/ge methods use ==/!= for the fallback comparison, where TimerHandle 
explicitly calls __eq__) which this would eliminate, along with reducing the 
code to maintain.

Specifically, the total_ordering fallbacks work if the provided operator (e.g. 
__lt__) works and either side provides a functional __eq__/__ne__, as 
appropriate (even if the other side *can't* provide the complementary 
inequality operator, e.g. __gt__). TimerHandle's behavior differs; it's all or 
nothing (so if __lt__ works, but __eq__ fails, then the success of __lt__ 
doesn't matter, the other side has to do everything).

I'm not saying total_ordering is necessarily correct (it does seem a bit odd 
that A <= B can return True based on a mix of results, one from A.__lt__, one 
from B.__eq__), but constantly reimplementing these fallback operations has 
been a source of subtle bugs so often, that I'd rather depend on a single 
common implementation, and debate tweaks to it there, rather than having it 
reimplemented slightly differently in a million different places.

I don't think import times for functools should be a problem; looks like at 
least four asyncio submodules import it, including asyncio.format_helpers 
(which asyncio.events takes a direct dependency on), so if you're using 
asyncio.events, you're already importing functools anyway.

--

___
Python tracker 

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



[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-07-26 Thread Derek Keeler


Change by Derek Keeler :


--
keywords: +patch
pull_requests: +14735
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14967

___
Python tracker 

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



[issue37685] Fix equality checks for some types

2019-07-26 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

@p-ganssle: Yup. If both sides return NotImplemented, __eq__ and __ne__ return 
a result based on an identity comparison; all other rich comparisons raise 
TypeError in that case. Code is here: 
https://github.com/python/cpython/blob/3.7/Objects/object.c#L679

As you said, NotImplemented is never actually returned from syntax based 
comparisons; you only see it if you explicitly call __eq__ (and related __XX__ 
rich comparison methods) directly (usually because you're implementing one 
method in terms of another).

AFAICT, about the only time you should ever be returning False rather than 
NotImplemented is when the other operand is an instance of the same class as 
you (or a subclass), allowing you to say with certainty that you know how to do 
the comparison (Python already handles the edge case of subclasses for you, by 
calling the comparison method on the subclass first, even if it's on the right 
hand side). In any other case, you return NotImplemented, and let the other 
side determine if they know how to do the comparison.

--
nosy: +josh.r

___
Python tracker 

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



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue37685] Fix equality checks for some types

2019-07-26 Thread Paul Ganssle


Paul Ganssle  added the comment:

@veky I can't be sure, but I think you may not understand what returning 
`NotImplemented` does - this makes comparisons *more* versatile, not less.

The way it works is that when Python does, for example, x == y, it will first 
call x.__eq__(y) and check the return value of that. If that's True or False, 
it will return the value, but if it's NotImplemented, it will call y.__eq__(x) 
and return that value, unless the value is NotImplemented. If both comparisons 
return NotImplemented, it falls back on the default implementation for __eq__, 
which I think is "x is y". For __lt__ it's different fallback behavior, but the 
same general idea.

Most of these changes are going from a situation where __lt__ or __eq__ was 
raising an exception or returning False for comparisons where the operation is 
not defined. This makes the distinction between "I don't know how to compare 
myself to that object" and "I know how to compare myself to that object and I 
am not equal to it".

--
nosy: +p-ganssle

___
Python tracker 

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



[issue18748] io.IOBase destructor silence I/O error on close() by default

2019-07-26 Thread Yhojann Aguilera


Yhojann Aguilera  added the comment:

I hope that when an error occurs, python tells me what the problem is. The 
abort core error is a problem at a lower level than python because python is 
not able to recognize or handle the error.

The main problem is that I exceeded the maximum number of process threads 
supported by the kernel.

What I hope is that python throws an exception when it exceeds this limit or 
when it cannot access the pointer in memory of the process thread.

The problem is not if the script is right or wrong, but that Python is not able 
to recognize and handle the problem. A generic message saying that an error 
occurred without indicating where and how it occurred is a python bug.

--

___
Python tracker 

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



[issue37685] Fix equality checks for some types

2019-07-26 Thread Vedran Čačić

Vedran Čačić  added the comment:

Wat?? Are we heading towards the world where 3.2 == 'something' is 
NotImplemented? I understand `__lt__`, of course, but in my opinion Python has 
always defined equality comparisons between different types. I think this is a 
huge regression.

--
nosy: +veky

___
Python tracker 

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



[issue35524] using/windows launcher image might be deprecated

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

I made a fake 3.8.0 installer and made the screenshot, so we'll only backport 
it to 3.8. I think 3.7 is fine with what it has.

--
versions: +Python 3.8, Python 3.9 -Python 3.7

___
Python tracker 

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



[issue35524] using/windows launcher image might be deprecated

2019-07-26 Thread Steve Dower


Change by Steve Dower :


--
keywords: +patch
pull_requests: +14734
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14966

___
Python tracker 

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



[issue37312] Remove deprecated _dummy_thread and dummy_threading modules

2019-07-26 Thread Eric Snow


Eric Snow  added the comment:

FTR, Antoine originally removed in b43c4caf81b10e5c7ebaeb3a712c6db584f60bbd and 
added back (but deprecated) a few days later in 
b43c4caf81b10e5c7ebaeb3a712c6db584f60bbd. [1]  That happened in September 2017 
for Python 3.7.


[1] https://bugs.python.org/issue31370#msg302476

--
nosy: +eric.snow, pitrou

___
Python tracker 

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



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +Michael.Felt, pablogsal

___
Python tracker 

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



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread Eric N. Vander Weele


New submission from Eric N. Vander Weele :

Have the approach of building shared libraries on the AIX operating
system be similar to that of a System V system.  The primary benefit of
this change is the elimination of custom AIX paths and reducing the
changes at `./configure` to affect just the `LDSHARED` environment
variable.

For background context, AIX sees shared libraries as fully linked and
resolved, where symbol references are resolved at link-time and cannot
be rebound at load-time.  System V resolves all global symbols by the
run-time linker.  Thus, conventional shared libraries in AIX cannot have
undefined symbols, while System V can.

However, AIX does allow for run-time linking in allowing symbols to be
undefined until load-time.

Therefore, this change affects how linking of shared libraries are
performed on AIX to behave similarly to that of System V.

Given that symbols are now going to be allowed to be undefined for AIX,
all the code paths for generating exported symbols and the related
wrapper scripts go away.

The real magic is in the `-G` flag for `LDSHARED`.  Effectively, `-G`
is equivalent to specifying the following:

* -berok: Suppress errors even if there are unresolved symbols
* -brtl: Enable run-time linking
* -bnortllib: Do not include a reference to the run-time linker
* -bnosymbolic: Assigns 'nosymbolic' attribute to most symbols (i.e.,
can be rebound)
* -bnoautoexp: Prevent auto exportation of any symbols
* -bM:SRE: Set the module type to reusable (i.e., require a private copy
   of the data area for each process).

I have been using this patch for Python 3.7, 3.6, and 2.7 (with appropriate 
backporting adaptations) without issue for being able to build and use Python 
C/C++ extensions on AIX for about 6 months now.  Given that we haven't had any 
issues, I felt it was appropriate to see if this would be accepted upstream.

--
components: Build, Extension Modules
files: aix-extension-simplify.patch
keywords: patch
messages: 348511
nosy: ericvw
priority: normal
severity: normal
status: open
title: Simplify linking of shared libraries on the AIX OS
type: enhancement
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48508/aix-extension-simplify.patch

___
Python tracker 

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



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread Eric N. Vander Weele


Change by Eric N. Vander Weele :


--
pull_requests: +14732
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14965

___
Python tracker 

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



Multiple Interpreters?

2019-07-26 Thread Andrew Bell
Hi,

I'm trying to understand what might be going on with loading one Python
interpreter on top of a second.  I'm running on OSX with a conda python
installation.  I understand that python is now statically linked on conda.

I'm running python, which invokes an extension module.  This extension
module calls some C++ code that is trying to start a second interpreter --
it loads a shared object that's linked against libpython.dylib.  When I try
to initialize python (Py_Initialize) in the shared object loaded by the
extension module, it fails (see below).  I'm not mixing anything from the
original python invocation to the one I'm trying run and I'm sure that
Py_Initialize in the shared library invocation are from libpython.dylib,
rather than from the python interpreter (python3).  Is there some reason
why I can't run a second interpreter using libpython.dylib when my process
is already running python3?

(I know that I can solve this by not linking libpython.dylib and deferring
symbol resolution to runtime, which will force resolution to symbols in
python3, but I don't know at build time if I'm using a statically-linked
interpreter or not.  I'd like to understand why this fails when I'm not
sharing context with the original interpreter.)

Fatal Python error: initsite: Failed to import the site module
Traceback (most recent call last):
  File "/Users/acbell/miniconda3/envs/pdal/lib/python3.7/site.py", line
168, in addpackage
exec(line)
  File "", line 1, in 
  File
"/Users/acbell/miniconda3/envs/pdal/lib/python3.7/importlib/util.py", line
14, in 
from contextlib import contextmanager
  File "/Users/acbell/miniconda3/envs/pdal/lib/python3.7/contextlib.py",
line 5, in 
from collections import deque
  File
"/Users/acbell/miniconda3/envs/pdal/lib/python3.7/collections/__init__.py",
line 24, in 
import heapq as _heapq
  File "/Users/acbell/miniconda3/envs/pdal/lib/python3.7/heapq.py", line
587, in 
from _heapq import *

Thanks,

-- 
Andrew Bell
andrew.bell...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue37664] Update bundled pip and setuptools

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset ea0f7aa47c5d2e58dc99314508172f0523e144c6 by Miss Islington (bot) 
in branch '3.7':
bpo-37664: Update bundled pip to 19.2.1 and setuptools to 41.0.1 (GH-14934)
https://github.com/python/cpython/commit/ea0f7aa47c5d2e58dc99314508172f0523e144c6


--

___
Python tracker 

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



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset 0225d58cc8b786caec12f45e9245f90497610a2d by Miss Islington (bot) 
in branch '3.7':
bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)
https://github.com/python/cpython/commit/0225d58cc8b786caec12f45e9245f90497610a2d


--

___
Python tracker 

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



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14731
pull_request: https://github.com/python/cpython/pull/14964

___
Python tracker 

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



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14730
pull_request: https://github.com/python/cpython/pull/14963

___
Python tracker 

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



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread Ned Deily

Ned Deily  added the comment:

Yeah, we should update 3.7, too, so people don’t keep getting the upgrade 
warning.

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



[issue34011] Default preference not given to venv DLL's

2019-07-26 Thread Steve Dower


Change by Steve Dower :


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



[issue12989] Consistently handle path separator in Py_GetPath on Windows

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

This code has been significantly rewritten since this bug, and I believe it's 
no longer an issue.

--
resolution:  -> out of date
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



[issue37287] picke cannot dump Exception subclasses with different super() args

2019-07-26 Thread Fabian Raab


Fabian Raab  added the comment:

It seems to that this problem is affecting __new__ methods independent of 
exceptions:

>>> class NewBreaker:
... def __new__(cls, arg):
... return super().__new__(cls)
...
>>> nb = NewBreaker(42)
>>> import pickle
>>> dumped = pickle.dumps(nb)
>>> pickle.loads(dumped)
Traceback (most recent call last):
File "", line 1, in 
TypeError: __new__() missing 1 required positional argument: 'arg'

--

___
Python tracker 

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



[issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

This appears to be completely resolved now, but if it's not, please ping with 
the details and we'll reopen.

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



[issue37689] Add Path.is_relative_to()

2019-07-26 Thread hai shi


hai shi  added the comment:

antoine, let me try it;)

--
nosy: +shihai1991

___
Python tracker 

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



[issue36529] Python from WindowsStore: can't install package using "-m pip"

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

Resolved by issue37672 (because I didn't find this issue when I was looking for 
it, so I created a new one)

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Switch Windows Store package to use pip.ini for user mode

___
Python tracker 

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



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

Hey Ned, would you like a bundled pip update for 3.7? We haven't gone that far 
back.

--
nosy: +ned.deily

___
Python tracker 

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



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset c5033901263d64a533ee47a84c6d286a223540c9 by Miss Islington (bot) 
in branch '3.8':
bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)
https://github.com/python/cpython/commit/c5033901263d64a533ee47a84c6d286a223540c9


--

___
Python tracker 

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



[issue37684] list.extend docs inaccurate

2019-07-26 Thread wim glenn


wim glenn  added the comment:

Raymond,

I understand that consecutive appends could potentially trigger multiple 
resizes behind the scenes, and so it's not really showing that extend is more 
like a bulk update as you mentioned. That's a good point!

However I think it's a more important consideration to make sure the equivalent 
actually gives a correct *result*. Can you suggest an alternative code snippet 
to use which is correct, or perhaps soften the language claiming that the code 
is equivalent?

For what it's worth, the stdtypes.html docs writes that extend is "for the most 
part the same as" the slice assignment:

https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types

--

___
Python tracker 

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



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:


New changeset b1eb20e68e30c8ab128f9d63d622f0a8b49dcf34 by Steve Dower in branch 
'master':
bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)
https://github.com/python/cpython/commit/b1eb20e68e30c8ab128f9d63d622f0a8b49dcf34


--

___
Python tracker 

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



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14729
pull_request: https://github.com/python/cpython/pull/14961

___
Python tracker 

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



[issue37689] Add Path.is_relative_to()

2019-07-26 Thread Antoine Pitrou


New submission from Antoine Pitrou :

Right now, to know whether a Path is relative to another one, you have to call 
Path.relative_to(), catch ValueError, and act in consequence.

It would be nice to have a Path.is_relative_to() that does the equivalent for 
you and returns True/False.

This is probably a good easy issue for a beginner contributor.

--
components: Library (Lib)
keywords: easy
messages: 348498
nosy: pitrou, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Add Path.is_relative_to()
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue37496] Support annotations in signature strings.

2019-07-26 Thread Eric Snow


Eric Snow  added the comment:

+1 on using a string for Parameter.annotation and Signature.return_annotation.

--

___
Python tracker 

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



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

If "equivalent" is deceiving, perhaps replace it with "similary" or "roughly 
equivalent".  Feel free to post a PR with your preferred wording.

--

___
Python tracker 

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



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Brett Cannon


Brett Cannon  added the comment:

I think you're reading "equivalence" too strictly here to mean "exactly the 
same semantics". In this instance it means "for similar functionality, the 
equivalent method is ..." (admittedly this might be a quirk of the use of the 
word "equivalent" in North American English).

But I can see why you would interpret it the way you do. Please feel free to 
propose a PR to clarify the phrasing.

--
nosy: +brett.cannon
type: behavior -> enhancement

___
Python tracker 

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



[issue35476] _imp_create_dynamic_impl() does not clear error.

2019-07-26 Thread Eric Snow


Eric Snow  added the comment:

Hmm, looks like this was already fixed by Serhiy (for bpo-35454) the day before 
I opened this issue. :)

3.8/master: GH-11077 8905fcc85a6fc3ac394bc89b0bbf40897e9497a6
3.7: GH-11105 62674f3a36ec55f86a5f20ee028a37fbd549bd6c
3.6: GH-11106 8855d9339858683c9b4fcd50b02a7bca526d4726

That's what I get for not keeping my local clone up-to-date.

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



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +14728
pull_request: https://github.com/python/cpython/pull/14960

___
Python tracker 

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



[issue35476] _imp_create_dynamic_impl() does not clear error.

2019-07-26 Thread Eric Snow


Eric Snow  added the comment:

Sorry, @Batuhan.  We appreciate your effort and would be glad to see more 
contributions from you.  I hope you at least learned something positive while 
working on this. :)

--

___
Python tracker 

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



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

Actually, we're already ignoring this message, but now it includes "WARNING: " 
at the start and doesn't match the existing regex. So we can just continue to 
ignore it.

--

___
Python tracker 

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



Wing Python IDE 7.1

2019-07-26 Thread Wingware
Wing 7.1 is a new release of Wingware's Python IDE product line.  This 
release adds support for Python 3.8, warns about unused symbols, 
improves code warnings configuration, adds new icons for the 
auto-completer, project, and source browser, supports Dark Mode on OS X, 
and makes other improvements.


== Some Highlights of Wing 7.1 ==

* Support for Python 3.8:  Wing 7.1 supports editing, testing, and 
debugging code written for Python 3.8, so you can take advantage of 
assignment expressions and other improvements introduced in this new 
version of Python.


* Improved Code Warnings:  Wing 7.1 adds unused symbol warnings for 
imports, variables, and arguments found in Python code. This release 
also improves code warnings configuration, making it easier to disable 
unwanted warnings.


* Cosmetic Improvements:  Wing 7.1 improves the auto-completer, project 
tool, and code browser with redesigned icons that make use of Wing's 
icon color configuration. This release also improves text display on 
some Linux systems, supports Dark Mode on macOS, and improves display of 
Python code and icons found in documentation.


* And More:  Wing 7.1 also adds support for Windows 10 native OpenSSH 
installations for remote development, and makes a number of other minor 
improvements. This release drops support for macOS 10.11. System 
requirements remain unchanged on Windows and Linux.


For details see the change log: 
https://wingware.com/pub/wingpro/7.1.0.2/CHANGELOG.txt


For a complete list of new features in Wing 7, see What's New in Wing 7: 
https://wingware.com/wingide/whatsnew


== Downloads ==

Wing Pro: https://wingware.com/downloads/wing-pro/7.1/binaries
Wing Personal:  https://wingware.com/downloads/wing-personal/7.1/binaries
Wing 101: https://wingware.com/downloads/wing-101/7.1/binaries

Compare Products: https://wingware.com/downloads

See Upgrading https://wingware.com/doc/install/upgrading for details on 
upgrading from Wing 6 and earlier, and Migrating from Older Versions 
https://wingware.com/doc/install/migrating for a list of compatibility 
notes.



--
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/

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


ANN: Wing Python IDE 7.1 released

2019-07-26 Thread Wingware
Wing 7.1 is a new release of Wingware's Python IDE product line.  This 
release adds support for Python 3.8, warns about unused symbols, 
improves code warnings configuration, adds new icons for the 
auto-completer, project, and source browser, supports Dark Mode on OS X, 
and makes other improvements.


== Some Highlights of Wing 7.1 ==

* Support for Python 3.8:  Wing 7.1 supports editing, testing, and 
debugging code written for Python 3.8, so you can take advantage of 
assignment expressions and other improvements introduced in this new 
version of Python.


* Improved Code Warnings:  Wing 7.1 adds unused symbol warnings for 
imports, variables, and arguments found in Python code. This release 
also improves code warnings configuration, making it easier to disable 
unwanted warnings.


* Cosmetic Improvements:  Wing 7.1 improves the auto-completer, project 
tool, and code browser with redesigned icons that make use of Wing's 
icon color configuration. This release also improves text display on 
some Linux systems, supports Dark Mode on macOS, and improves display of 
Python code and icons found in documentation.


* And More:  Wing 7.1 also adds support for Windows 10 native OpenSSH 
installations for remote development, and makes a number of other minor 
improvements. This release drops support for macOS 10.11. System 
requirements remain unchanged on Windows and Linux.


For details see the change log: 
https://wingware.com/pub/wingpro/7.1.0.2/CHANGELOG.txt


For a complete list of new features in Wing 7, see What's New in Wing 7: 
https://wingware.com/wingide/whatsnew


== Downloads ==

Wing Pro: https://wingware.com/downloads/wing-pro/7.1/binaries
Wing Personal:  https://wingware.com/downloads/wing-personal/7.1/binaries
Wing 101: https://wingware.com/downloads/wing-101/7.1/binaries

Compare Products: https://wingware.com/downloads

See Upgrading https://wingware.com/doc/install/upgrading for details on 
upgrading from Wing 6 and earlier, and Migrating from Older Versions 
https://wingware.com/doc/install/migrating for a list of compatibility 
notes.


Stephan Deibel
Wing Python IDE | The Intelligent Development Environment for Python


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


[issue17535] IDLE editor line numbers

2019-07-26 Thread Tal Einat


Tal Einat  added the comment:

> The current right margin is 1 pixel. Let's try making it 2.

See PR GH-14959.  I added 2 pixels of horizontal padding to the line numbers 
text widget, and it certainly does look much nicer.  Thanks for the suggestion, 
Kyle!

--

___
Python tracker 

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



[issue31370] Remove support for threads-less builds

2019-07-26 Thread Kaeptm Blaubaer


Kaeptm Blaubaer  added the comment:

Unfortunately, this also leads to less good LTO if you use a single static 
executable, similar to what Tools/freeze produces but including libpython 
itself. I'm currently trying to make LLVM do that, but since I can't build 
without threads, it'd be extremely hard to tell it that it can remove all 
threading related things (like TLS) and inline them. This means I'll have to 
patch CPython on my own to remove thread support, but unfortunately this also 
means I can't guarantee that it continues to work, as well as that it makes it 
a lot more likely that my build won't support many third-party libraries.

--
nosy: +kb1000

___
Python tracker 

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



[issue17535] IDLE editor line numbers

2019-07-26 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +14727
pull_request: https://github.com/python/cpython/pull/14959

___
Python tracker 

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



[issue37679] test_with_pip fails on FreeBSD 10 bot

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

Could you please nosy yourself on the other issue and help us address it then?

The only change was upgrading pip, and the error is just a new warning message, 
but unless someone knows how bad it is then we'll "fix" it by ignoring the 
warning.

--

___
Python tracker 

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



[issue37628] IDLE: Fix Font sample (config dialog) geometry

2019-07-26 Thread Tal Einat


Tal Einat  added the comment:

See proposed fix in PR GH-14958.

--

___
Python tracker 

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



[issue37628] IDLE: Fix Font sample (config dialog) geometry

2019-07-26 Thread Tal Einat


Change by Tal Einat :


--
keywords: +patch
pull_requests: +14726
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14958

___
Python tracker 

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



[issue37652] Multiprocessing shared_memory ValueError on race with ShareableList

2019-07-26 Thread Pierre Glaser


Pierre Glaser  added the comment:

The root of the error is that struct.pack_into starts by memsetting the 
underlying memory area with NULL bytes before filling the data with memcpy. If 
ShareableList._get_packing_format is called between the two operations (through 
a concurrent __getitem__ call from another process), struct.unpack_from will 
return an empty tuple which is the direct cause of the error you're seeing.

In the general case though, memcpy is not atomic so even without the memset 
call before, results of struct.unpack_from may be invalid in a concurrent 
setting.

shared_memory is a low level python module. Precautions should be made when 
handling concurrently the shared_memory objects using synchronization 
primitives for example. I'm not sure this should be done internally in the 
SharedMemory class -- especially, we don't want to slow down concurrent READ 
access. +1 For a documentation addition.

--

___
Python tracker 

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



Re: Python 3.7 - Reading text from Terminal window

2019-07-26 Thread Thomas Jollans
On 26/07/2019 06.33, nir.za...@gmail.com wrote:
> Hi,
>
> I want it to wait for a specific text on the terminal window that it opens 
> (putty.exe), how can i do it? 
>
> from pywinauto.application import Application
> from pynput.keyboard import Key, Controller
>  
> print('Configuring')
>  
> app = Application().start(cmd_line=u'"C:\\...putty.exe" ')
> puttyconfigbox = app.PuTTYConfigBox
> puttyconfigbox.wait('ready')
> listbox = puttyconfigbox.ListBox
> listbox.select(u'COM5')
> button = puttyconfigbox[u'']
> button.click()
> button2 = puttyconfigbox[u'']
> button2.click()
>  
> keyboard = Controller()
> keyboard.press(Key.enter)
>  
> keyboard.type('password1')
> keyboard.press(Key.enter)
> keyboard.type('enable\nconf t\n')
>
Not a clue, but why are you using PuTTY at all? Can't whatever it is
you're doing be achieved much more simply using e.g. pyserial, accessing
the COM port directly from Python?

-- T


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


[issue37538] Refactor zipfile to ease subclassing and enhancement

2019-07-26 Thread Daniel Hillier


Change by Daniel Hillier :


--
keywords: +patch
pull_requests: +14725
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14957

___
Python tracker 

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



[issue37682] random.sample should support iterators

2019-07-26 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thomas, thank you for the suggestion but I think we should decline.  The API 
for sample() is consistent with choice(), choices() and shuffle().  For the 
most part the sequence based API has worked out well.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue37635] Using constant for whence arg in seek()

2019-07-26 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I don't know. "whence" is the official name of the argument in the POSIX API:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html

Perhaps "from_what" is assumed to be more understandable by the average reader?

Also, os.lseek() uses "how":
https://docs.python.org/3/library/os.html#os.lseek

--

___
Python tracker 

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



[issue36279] os.wait3() leaks some uninitialized stack when no processes exist

2019-07-26 Thread David Wilson


David Wilson  added the comment:

The original diff is attached here (per the old process) so others can find it, 
and the PR+fork are closed, as carrying a fork in my GitHub for 4 months has 
non-zero cost. I'm presently more interested in having a clean GH account than 
carrying around the baggage of forgotten old patches

--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed
Added file: 
https://bugs.python.org/file48507/c805d2764e6a0ee4d22a338c5f4fef6154df8687.diff

___
Python tracker 

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



[issue37409] relative import without parent succeeds with builtins.__import__

2019-07-26 Thread Ben Lewis


Change by Ben Lewis :


--
pull_requests: +14724
pull_request: https://github.com/python/cpython/pull/14956

___
Python tracker 

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



[issue37679] test_with_pip fails on FreeBSD 10 bot

2019-07-26 Thread Kubilay Kocak


Kubilay Kocak  added the comment:

Since this is likely a regression from issue 37664, which is still open, and 
also contains the report, I'd close this issue in favour of the former. Having 
regression reports in separate issues for still open in new/separate issues 
tends to results in them not being addressed in a timely manner.

If it turns out this is not related to the commits from issue 37664, this can 
be re-opened.

Having said that, these bots have been stable and green for a substantial 
amount of time, so in almost all cases (upgrades to the bots not withstanding), 
new regressions/failures are almost certainly newly introduced

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



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pitrou

___
Python tracker 

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



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Kirill Balunov


Kirill Balunov  added the comment:

I understand the reasons, I only say that it does not correspond to my 
perception of their equivalence, because:

os.path.isdir('') != os.path.isdir('.')

while:

Path('').is_dir() == Path('.').is_dir()

and I can confirm that some libraries rely on os.path.isdir('') -> False 
behavior.

--

___
Python tracker 

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



  1   2   >