[Python-Dev] Re: compiled python3.10 is unable to find _ssl

2022-05-24 Thread Lou King
Christian Heimes wrote:
> For PEP 644 I added new instructions how to build Python 3.10 with 
> custom OpenSSL builds. The instructions should work on all major Linux 
> distributions. They have been tested on Debian-like and Fedora-like 
> platforms:
> https://docs.python.org/3/using/unix.html?highlight=openssl#custom-openssl

CentOS Linux release 7.9.2009 (Core)
trying to build python 3.10.4

I followed the instructions at 
https://docs.python.org/3/using/unix.html?highlight=openssl#custom-openssl and 
cannot import ssl in the resulting build.

My log of what I did follows. Struggling with this for a couple of days, so any 
help would be appreciated.

2022-05-24 11:24 sudo find /etc/ -name openssl.cnf -printf "%h\n"
/etc/pki/tls
2022-05-24 11:27 cd /home/lking/openssl/openssl-1.1.1o
2022-05-24 11:27 sudo ./config --prefix=/usr/local/custom-openssl --libdir=lib 
--openssldir=/etc/pki/tls
2022-05-24 11:28 sudo make clean
2022-05-24 11:29 sudo make -j1 depend
2022-05-24 11:29 sudo make -j > logs/build1.txt
2022-05-24 11:32 sudo make install_sw > logs/install_sw.txt
2022-05-24 11:33 cd /home/lking/python/Python-3.10.4
2022-05-24 11:34 ./configure -C --with-openssl=/usr/local/custom-openssl 
--with-openssl-rpath=auto --prefix=/usr/local/python-3.10.4 > 
logs/configure4.txt
2022-05-23 11:35 vim /home/lking/python/Python-3.10.4/Makefile # 
https://stackoverflow.com/a/50855855/799921
199c199
< RUNSHARED=
---
> RUNSHARED=LD_LIBRARY_PATH=/usr/local/custom-openssl/lib
2022-05-24 11:37 sudo make clean
2022-05-24 11:38 sudo make -j > logs/buildlog4.txt
2022-05-24 11:42 sudo make altinstall > logs/altinstall4.txt
2022-05-24 11:43 [lking@loutility-server-digitalocean Python-3.10.4]$ python3.10
Python 3.10.4 (main, May 15 2022, 12:44:05) [GCC 4.8.5 20150623 (Red Hat 
4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.10/ssl.py", line 98, in 
import _ssl # if we can't import it, let the error propagate
ModuleNotFoundError: No module named '_ssl'
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/PNC7IT64YAVR72TVQPLBRSTC5XD6BCAY/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: compiled python3.10 is unable to find _ssl

2022-05-25 Thread Lou King
I should have mentioned, earlier I made these changes to Setup

2022-05-22 14:54 vim /home/lking/python/Python-3.10.4/Modules/Setup
207c207
< #_socket socketmodule.c
---
> _socket socketmodule.c
211,217c211,217
< # OPENSSL=/path/to/openssl/directory
< # _ssl _ssl.c \
< # -I$(OPENSSL)/include -L$(OPENSSL)/lib \
< # -lssl -lcrypto
< #_hashlib _hashopenssl.c \
< # -I$(OPENSSL)/include -L$(OPENSSL)/lib \
< # -lcrypto
---
> OPENSSL=/usr/local/custom-openssl
> _ssl _ssl.c \
> -I$(OPENSSL)/include -L$(OPENSSL)/lib \
> -lssl -lcrypto
> _hashlib _hashopenssl.c \
> -I$(OPENSSL)/include -L$(OPENSSL)/lib \
> -lcrypto
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/ENGCKIYF4APIQ2ZEUIE5CYKR2J2HPKDI/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: compiled python3.10 is unable to find _ssl

2022-05-25 Thread Lou King
I should have mentioned, earlier I made these changes to Setup

2022-05-22 14:54 vim /home/lking/python/Python-3.10.4/Modules/Setup
207c207
< #_socket socketmodule.c
---
> _socket socketmodule.c
211,217c211,217
< # OPENSSL=/path/to/openssl/directory
< # _ssl _ssl.c \
< # -I$(OPENSSL)/include -L$(OPENSSL)/lib \
< # -lssl -lcrypto
< #_hashlib _hashopenssl.c \
< # -I$(OPENSSL)/include -L$(OPENSSL)/lib \
< # -lcrypto
---
> OPENSSL=/usr/local/custom-openssl
> _ssl _ssl.c \
> -I$(OPENSSL)/include -L$(OPENSSL)/lib \
> -lssl -lcrypto
> _hashlib _hashopenssl.c \
> -I$(OPENSSL)/include -L$(OPENSSL)/lib \
> -lcrypto
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/B4QRCLBVYGFJ62DRRFVINULYYA6E3NCX/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: compiled python3.10 is unable to find _ssl

2022-05-27 Thread Lou King
It turns out the one problem was being caused by the manual change to Makefile 
I made at 2022-05-23 11:35.

My build goes through now by prefixing after 
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/custom-openssl/lib after sudo, as 
the root account was not getting this environment variable.

Having said that, while the dynamic load library now gets built correctly (it 
wasn't with the Makefile change), I still see the same symptom. Will continue 
to debug.

I now see 

$ ls  /usr/local/python-3.10.4/lib/python3.10/lib-dynload/*_ssl*
/usr/local/python-3.10.4/lib/python3.10/lib-dynload/_ssl.cpython-310-x86_64-linux-gnu.so

but still see 

$ python3.10
 Python 3.10.4 (main, May 15 2022, 12:44:05) [GCC 4.8.5 20150623 (Red Hat 
4.8.5-44)] on linux 
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import ssl
 Traceback (most recent call last):
   File "", line 1, in 
   File "/usr/local/lib/python3.10/ssl.py", line 98, in 
 import _ssl # if we can't import it, let the error propagate
 ModuleNotFoundError: No module named '_ssl'
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/ORCFZOHP5M46LWUB7BTVG2H2JVHDTC6X/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: compiled python3.10 is unable to find _ssl

2022-05-29 Thread Lou King
Solved!

The astute reader will notice that while I built the latest version of 
python3.10 2022-05-24 11:38, the one I was testing was built May 15 2022, 
12:44:05.

This was left over from an earlier iteration, and not cleaned up with a 
subsequent make clean that was run after another ./configure with a different 
--prefix value.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/HQUMR3RSUWXC5FVQTTVCOW6GV7DLY3UK/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: problem with Distributed File System Replication and Namespacing and different versions of Python 3

2022-10-20 Thread Lou King
Not sure if this is relevant, but I know they updated the openssl version
in Python 3.10. I had the opposite problem trying to use Python 3.10 on
CentOS 7 which has the old openSSL. I had to back off to 3.9. maybe running
over the network invoked openSSL at some point and that's where the
disconnect occurs?

I would check which openSSL your host os uses.



On Thu, Oct 20, 2022, 2:36 PM 
wrote:

> Hi,
> I have a question about a problem we are facing in different Python
> versions, like Python 3.7.7, Python 3.8, Python 3.6 and Python 3.9.
> This apparently doesnt happen in Python 3.10.2 and we were wondering how
> we could achieve the same behaviours without going deep into the nuts and
> bolts of the python import system.
>
> We have python libraries that are distributed in a networked environment
> that when imported for the first time they are correctly imported but
> something happens in the meantime that prevents it from loading anymore.
> This networked paths are domain paths that are bound to a final "real" path
> in a specific file server from a specific site in the world.
>
> What happens is, when injecting into the sys.path the domain names it
> doesnt import but when injecting into the sys.path the "real" file server
> path it works, generally speaking. We have been facing this issue in such
> different python 3 versions and i was wondering what makes this work in
> Python 3.10.2.
>
> Apparently, in my opinion it is a mix of two things involved: one,
> something the DFS-R DFS-N does at a very low level, that python 3 versions
> dont like when importing and the other one, the fact that is a network path.
>
> Can anybody shed some light about the improvements regarding this?
>
> We will be tied to all these python versions for a very long time and we
> need to give solution to this.
> One of the possibilities would be to distribute the libraries into C:/
> local disc, this eliminating the network path variable. But it would be
> nice to know what is causing this in Python < 3.10.2.
>
> Thanks in advance.
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/5EJ7FAWQSUOFFYSCBZF2NRQSY3SULVV5/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/KLKTXTTACDY5OY25WSDJ6K2ML5S4QI7B/
Code of Conduct: http://python.org/psf/codeofconduct/