Bug 2250191

Summary: sieveshell CLI fails with AttributeError 'socket' object has no attribute 'sslsocket_class'
Product: [Fedora] Fedora Reporter: Marius Hoch <mail>
Component: python-managesieveAssignee: Sandro <gui1ty>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: gui1ty
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-managesieve-0.7.1-16.fc39 python-managesieve-0.7.1-14.fc38 python-managesieve-0.7.1-7.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-26 01:55:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marius Hoch 2023-11-16 21:41:48 UTC
Currently the sieveshell CLI from python3-managesieve will fail to connect to and an SSL related error will occur.

See also: https://gitlab.com/htgoebel/managesieve/-/issues/8

Reproducible: Always

Steps to Reproduce:
1. Try to run the sieveshell CLI like, "sieveshell --user example-user example.foo"
Actual Results:  
Traceback (most recent call last):
  File "/usr/bin/sieveshell", line 410, in <module>
    raise SystemExit(main())
                     ^^^^^^
  File "/usr/bin/sieveshell", line 401, in main
    shell(args.authname, args.username, args.passwd,
  File "/usr/bin/sieveshell", line 290, in shell
    sieve = managesieve.MANAGESIEVE(server, port=port, use_tls=use_tls)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/managesieve.py", line 225, in __init__
    typ, data = self.starttls(keyfile=keyfile, certfile=certfile)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/managesieve.py", line 665, in starttls
    sslobj = ssl_wrap_socket(self.sock, keyfile, certfile)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/ssl.py", line 517, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'socket' object has no attribute 'sslsocket_class'


Expected Results:  
Correctly login and start the sieve shell.

Comment 1 Sandro 2023-11-16 23:42:42 UTC
Thanks for the bug report and the PR. I saw the scratch build failed, so I'll comment on the PR.

Comment 2 Fedora Update System 2023-11-17 12:00:55 UTC
FEDORA-2023-c9e55553c1 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-c9e55553c1

Comment 3 Fedora Update System 2023-11-17 12:02:30 UTC
FEDORA-2023-a656c42764 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a656c42764

Comment 4 Fedora Update System 2023-11-17 12:04:50 UTC
FEDORA-2023-4b9ff2cb2f has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-4b9ff2cb2f

Comment 5 Fedora Update System 2023-11-18 02:41:19 UTC
FEDORA-2023-c9e55553c1 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-c9e55553c1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-c9e55553c1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2023-11-18 02:47:45 UTC
FEDORA-2023-a656c42764 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-a656c42764`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-a656c42764

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2023-11-18 02:57:11 UTC
FEDORA-2023-4b9ff2cb2f has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-4b9ff2cb2f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-4b9ff2cb2f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2023-11-26 01:55:08 UTC
FEDORA-2023-c9e55553c1 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2023-11-26 03:04:59 UTC
FEDORA-2023-a656c42764 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2023-11-26 03:08:00 UTC
FEDORA-2023-4b9ff2cb2f has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.