Is there a way to install 3.4.10, without Visual Studio?

2020-09-24 Thread dcwh...@gmail.com
Hi,

I'm downgrading, for one particular project, and am trying to install 3.4.10 32 
bit

There's no Windows installer for this, so I installed 3.4, and then copied the 
contents of 

https://www.python.org/ftp/python/3.4.10/Python-3.4.10.tgz

into the c:\Python34 folder and subfolders.

The c:\Python34\PCBuild\Readme.txt file seems to indicate that I have to 
install Visual C++ 2010, in order to build this.

Is there an alternative to going this route?  There is this package, 

http://matejhorvat.si/en/windows/python/index.htm

, but I'm not sure how reliable it is.

Should I just use the most recent 3.4.x version that has a Windows Installer, 
and not worry about the final 3.4.10 version?  Or is there a way to get to 
3.4.10?

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


Re: Is there a way to install 3.4.10, without Visual Studio?

2020-09-24 Thread Chris Angelico
On Thu, Sep 24, 2020 at 5:36 PM dcwh...@gmail.com  wrote:
> Should I just use the most recent 3.4.x version that has a Windows Installer, 
> and not worry about the final 3.4.10 version?  Or is there a way to get to 
> 3.4.10?
>

I would STRONGLY recommend using a newer Python rather than pinning
yourself to the 3.4.x branch. But if you absolutely must use a
now-ancient version, your only options are to build it yourself (which
requires Visual Studio as you have discovered) or to use a slightly
older release. It's entirely up to you whether the changes in 3.4.10
are significant enough to build Python manually. Either way, you're
basically on your own.

If you really really have to use such an old Python, maybe consider
using Linux instead of Windows; building from source is generally
easier, and you may even be able to find a distribution that packages
Python 3.4 for you (Red Hat and Debian being the best contenders
here).

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


[RELEASE] Python 3.8.6 is now available

2020-09-24 Thread Łukasz Langa
Python 3.8.6 is the sixth maintenance release of Python 3.8. Go get it here:

https://www.python.org/downloads/release/python-386/ 


Maintenance releases for the 3.8 series will continue at regular bi-monthly 
intervals, with 3.8.7 planned for mid-November 2020.

What’s new?

The Python 3.8 series is the newest feature release of the Python language, and 
it contains many new features and optimizations. See the “What’s New in Python 
3.8 ” document for more 
information about features included in the 3.8 series.

Python 3.8 is becoming more stable. Our bugfix releases are becoming smaller as 
we progress. This one contains 122 changes, less than two thirds of the 
previous average for a new release. Detailed information about all changes made 
in version 3.8.6 specifically can be found in its change log 
. 
Note that compared to 3.8.5 this release also contains all changes present in 
3.8.6rc1.

We hope you enjoy Python 3.8!

Thanks to all of the many volunteers who help make Python Development and these 
releases possible! Please consider supporting our efforts by volunteering 
yourself or through organization contributions to the Python Software 
Foundation.

Your friendly release team,
Ned Deily @nad 
Steve Dower @steve.dower 
Łukasz Langa @ambv 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: python show folder files and not subfolder files

2020-09-24 Thread Terry Reedy

On 9/23/2020 7:24 PM, pascal z via Python-list wrote:

Please advise if the following is ok (i don't think it is)

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import os

csv_contents = ""
output_file = '/home/user/Documents/csv/output3csv.csv'
Lpath = '/home/user/Documents/'

csv_contents = "FOLDER PATH;Size in Byte;Size in Kb;Size in Mb;Size in Gb\n"

d_size = 0
for root, dirs, files in os.walk(Lpath, topdown=False):
 for i in files:
 d_size += os.path.getsize(root + os.sep + i)
 csv_contents += "%s   ;%.2f   ;%.2f   ;%.2f   ;%.2f  \n" % (root, d_size, 
d_size/1024, d_size/1048576, d_size/1073741824)

 counter = Lpath.count(os.path.sep)
 if counter < 5:
 for f in os.listdir(Lpath):
 path = os.path.join(Lpath, f)
 f_size = 0
 f_size = os.path.getsize(path)
 csv_contents += "%s   ;%.2f   ;%.2f   ;%.2f   ;%.2f  \n" % (path, 
f_size, f_size/1024, f_size/1048576, f_size/1073741824)

fp = open(output_file, "w")
fp.write(csv_contents)
fp.close()



Read
https://docs.python.org/3/faq/programming.html#what-is-the-most-efficient-way-to-concatenate-many-strings-together
--
Terry Jan Reedy

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


stackless python 2.7.9 and openssl-1.1.1g

2020-09-24 Thread bhashkar prakash Singh
Hi,

I am using stackless Python 2.7.9 in my project and openssl-1.0.2q.
I just upgraded the Openssl  version to 1.1.1g, due to which python
compilation started failing. So, I patched  _hashopenssl.c and _ssl.c file
in Python Modules as per new openssl  to make compilation successful.
But when I run my image on  target HW,  I am getting below errors.  It
looks like Openssl 1.1.1g libraries are not linked to Python.
 I am struggling with this issue since many days. Looks like something I
missed in my patching. Could someone please help on this.

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 109, in
__get_openssl_constructor
return __get_builtin_constructor(name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 109, in
__get_openssl_constructor
return __get_builtin_constructor(name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 109, in
__get_openssl_constructor
return __get_builtin_constructor(name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 109, in
__get_openssl_constructor
return __get_builtin_constructor(name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 109, in
__get_openssl_constructor
return __get_builtin_constructor(name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 109, in
__get_openssl_constructor
return __get_builtin_constructor(name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512

Thanks & Regards,
Bhashkar
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: stackless python 2.7.9 and openssl-1.1.1g

2020-09-24 Thread Barry Scott



> On 24 Sep 2020, at 19:21, bhashkar prakash Singh  
> wrote:
> 
> Hi,
> 
> I am using stackless Python 2.7.9 in my project and openssl-1.0.2q.
> I just upgraded the Openssl  version to 1.1.1g, due to which python
> compilation started failing. So, I patched  _hashopenssl.c and _ssl.c file
> in Python Modules as per new openssl  to make compilation successful.
> But when I run my image on  target HW,  I am getting below errors.  It
> looks like Openssl 1.1.1g libraries are not linked to Python.
> I am struggling with this issue since many days. Looks like something I
> missed in my patching. Could someone please help on this.

I recently built python 2.7.18 against openssl 1.1.1g without issue.
Maybe look see what is in the cpython code that works fine.

Barry
> Thanks & Regards,
> Bhashkar
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 

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


Question

2020-09-24 Thread Michael Boom
I have a Python manager and clients.  I added a feature that if the client or 
server are killed, they will be restarted.

When I restart the server after being killed the clients get a broken pipe 
error, but the connect call that worked on the first connect, doesn't work now.

When a client is restarted it runs the same connection code as always.  The 
connect seems to complete, but the calls don't complete.  They just hang.

Is there an issue with broken connections and multiprocessing managers?

I have tried this with the 3.9.0rc2 and the problem still exists.

Also, I have a single connection to a manager.  I get two proxies to that 
manager on the one connection.  The documentation says that proxies to a 
manager are not thread safe.  What about two proxies.  Do I need to use a 
single mutex for both proxies, or can I have one mutex for each proxy?  If I 
have a blocking call on one proxy, would using the other proxy step on the toes 
of the first?


Michael L. Boom
858-240-6059
mikeb...@mikeboom.com
11532 Hadar Dr.
San Diego, CA. 92126

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


Re: stackless python 2.7.9 and openssl-1.1.1g

2020-09-24 Thread bhashkar prakash Singh
Hi Barry,

Thanks for your response.

I am not an expert in python code. Could you please elaborate a bit more on
this.  Which cpython code are you referring to?
did you modify other files also apart from   _hashopenssl.c and _ssl.c to
work with openssl-1.1.1g ?

Regards,
Bhashkar

On Fri, Sep 25, 2020 at 2:40 AM Barry Scott  wrote:

>
>
> > On 24 Sep 2020, at 19:21, bhashkar prakash Singh <
> singh.bhash...@gmail.com> wrote:
> >
> > Hi,
> >
> > I am using stackless Python 2.7.9 in my project and openssl-1.0.2q.
> > I just upgraded the Openssl  version to 1.1.1g, due to which python
> > compilation started failing. So, I patched  _hashopenssl.c and _ssl.c
> file
> > in Python Modules as per new openssl  to make compilation successful.
> > But when I run my image on  target HW,  I am getting below errors.  It
> > looks like Openssl 1.1.1g libraries are not linked to Python.
> > I am struggling with this issue since many days. Looks like something I
> > missed in my patching. Could someone please help on this.
>
> I recently built python 2.7.18 against openssl 1.1.1g without issue.
> Maybe look see what is in the cpython code that works fine.
>
> Barry
> > Thanks & Regards,
> > Bhashkar
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >
>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


list comprehension namespace problem

2020-09-24 Thread Frank Millman

Hi all

I have a problem related (I think) to list comprehension namespaces. I 
don't understand it enough to figure out a solution.


In the debugger, I want to examine the contents of the current instance, 
so I can type


(Pdb) dir(self)

and get the result with no problem.

However, it is a long list containing attribute names and method names, 
and I only want to see the attribute names. So I tried this -


(Pdb) [x for x in dir(self) if not callable(getattr(self, x))]
*** NameError: name 'self' is not defined
(Pdb)

Q1. Can someone explain what is going on?

Q2. Is there a way to get what I want?

Thanks

Frank Millman

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


Re: list comprehension namespace problem

2020-09-24 Thread Chris Angelico
On Fri, Sep 25, 2020 at 3:43 PM Frank Millman  wrote:
>
> Hi all
>
> I have a problem related (I think) to list comprehension namespaces. I
> don't understand it enough to figure out a solution.
>
> In the debugger, I want to examine the contents of the current instance,
> so I can type
>
>  (Pdb) dir(self)
>
> and get the result with no problem.
>
> However, it is a long list containing attribute names and method names,
> and I only want to see the attribute names. So I tried this -
>
>  (Pdb) [x for x in dir(self) if not callable(getattr(self, x))]
>  *** NameError: name 'self' is not defined
>  (Pdb)
>
> Q1. Can someone explain what is going on?
>
> Q2. Is there a way to get what I want?
>

If you put that line of code into your actual source code, does it
work? I think this might be a pdb-specific issue, since normally the
comprehension should have no difficulty seeing names from its
surrounding context.

A minimal case will probably involve the debugger and a function with
a local, unless in some way this depends on 'self' being special.

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


Re: list comprehension namespace problem

2020-09-24 Thread Frank Millman

On 2020-09-25 7:46 AM, Chris Angelico wrote:

On Fri, Sep 25, 2020 at 3:43 PM Frank Millman  wrote:


Hi all

I have a problem related (I think) to list comprehension namespaces. I
don't understand it enough to figure out a solution.

In the debugger, I want to examine the contents of the current instance,
so I can type

  (Pdb) dir(self)

and get the result with no problem.

However, it is a long list containing attribute names and method names,
and I only want to see the attribute names. So I tried this -

  (Pdb) [x for x in dir(self) if not callable(getattr(self, x))]
  *** NameError: name 'self' is not defined
  (Pdb)

Q1. Can someone explain what is going on?

Q2. Is there a way to get what I want?



If you put that line of code into your actual source code, does it
work? I think this might be a pdb-specific issue, since normally the
comprehension should have no difficulty seeing names from its
surrounding context.

A minimal case will probably involve the debugger and a function with
a local, unless in some way this depends on 'self' being special.



Yes, is does work from within my source code.

Frank


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