Skip to content

gh-73487: Convert _decimal to use Argument Clinic (part 1) #137606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Aug 13, 2025

Conversation

skirpichev
Copy link
Contributor

@skirpichev skirpichev commented Aug 10, 2025

@skirpichev skirpichev changed the title gh-73487: convert the decimal module to use AC gh-73487: convert the _decimal module to use AC Aug 10, 2025
@skirpichev

This comment has been minimized.

@AA-Turner
Copy link
Member

AA-Turner commented Aug 10, 2025

Is the help(decimal) output identical before and after the PR?

I appreciate suggestion on how to make it easier to review.

It looks worse than it actually is, only ~400 lines diff in _decimal.c and ~190 lines of docstring-only changes in _decimal/docstrings.h. You could maybe split up the Decimal methods into a few groups to reduce the size of the PR, but no obvious such groupings spring to mind.

@skirpichev
Copy link
Contributor Author

It looks worse than it actually is

As I said, it's more or less a mechanical change. No changes in signatures, docstrings are copied from docstrings.h (though, AC enforces to have PEP summary line, most decimal docstrings don't follow this - that changed). There should be a minor speedup from using METH_FASTCALL (see issue thread for examples, I'll do benchmarks later, maybe add news). I'm planning to use also METH_METHOD where possible, but in a separate patch.

no obvious such groupings spring to mind.

Different types, then method functions? I don't see how to make such split uniform.

@AA-Turner

This comment was marked as outdated.

AA-Turner

This comment was marked as outdated.

@AA-Turner AA-Turner changed the title gh-73487: convert the _decimal module to use AC gh-73487: Convert _decimal to use Argument Clinic Aug 10, 2025
skirpichev and others added 2 commits August 11, 2025 04:09
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@AA-Turner

This comment was marked as resolved.

@skirpichev

This comment was marked as resolved.

@AA-Turner
Copy link
Member

AA-Turner commented Aug 11, 2025

Do you think it's now too hard to review?

Yes. I'm happy to look at the changes, just in a future PR instead of this one.

This reverts commit 354d8db.
@skirpichev skirpichev requested a review from AA-Turner August 11, 2025 02:08
@AA-Turner

This comment was marked as resolved.

AA-Turner

This comment was marked as resolved.

@skirpichev skirpichev changed the title gh-73487: Convert _decimal to use Argument Clinic gh-73487: Convert _decimal to use Argument Clinic (part 1) Aug 11, 2025
@rhettinger rhettinger removed their request for review August 12, 2025 16:31
@AA-Turner
Copy link
Member

I would appreciate if #137624 can be merged first.

Now merged.

Serhiy also suggested (in #137685 (comment)) that AC conversions don't need NEWS entries, perhaps remove from this PR?

A

@AA-Turner
Copy link
Member

Error in file 'Modules/_decimal/_decimal.c' on line 4616:
Warning:
Docstring lines for '_decimal.Decimal.to_integral_value' are too long!
Lines should be no longer than 72 characters.

Warning:
Docstring lines for '_decimal.Decimal.to_integral' are too long!
Lines should be no longer than 72 characters.

Warning:
Docstring lines for '_decimal.Decimal.to_integral_exact' are too long!
Lines should be no longer than 72 characters.

Summary line for '_decimal.Decimal.adjusted' is too long!
The summary line must be no longer than 72 characters.

@skirpichev
Copy link
Contributor Author

Now merged.

Thanks, I fixed errors. BTW, tool should display them all.

Serhiy also suggested (in #137685 (comment)) that AC conversions don't need NEWS entries, perhaps remove from this PR?

Removed. I fine with this, though PR affects performance and - thus - has user-visible changes.

@serhiy-storchaka
Copy link
Member

If this affects performance, you can mention methods that have become significantly faster.

/*[clinic input]
_decimal.Decimal.to_integral_value

self as dec: self
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not rename dec to self?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I did this, see reversion per reviewer request: 8b757da

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that in long term it is better to change few more lines, but get rid of the self converter unless it is absolutely necessary (if we need a behavior different from default). But this is just nitpicks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored.

@skirpichev
Copy link
Contributor Author

If this affects performance, you can mention methods that have become significantly faster.

It's a long list, every function that previously used METH_VARARGS is affected. I can restore news again, does it make sense?

@serhiy-storchaka
Copy link
Member

I can restore news again, does it make sense?

If it does not mention Argument Clinic and other implementation details.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, LGTM.

But since there were objections to this conversion from the author and a former developer, we need approval from several core developers who have worked on the decimal module for many years.

/*[clinic input]
_decimal.Decimal.to_integral_value

self as dec: self
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that in long term it is better to change few more lines, but get rid of the self converter unless it is absolutely necessary (if we need a behavior different from default). But this is just nitpicks.

@skirpichev skirpichev requested review from vstinner and picnixz August 13, 2025 07:55
@skirpichev
Copy link
Contributor Author

Ok, I asked @vstinner and @picnixz for review.

Raymond removed request for review, I hope this doesn't mean he is -1 on this.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I like moving docstrings closer to function implementation, it helps to keep both consistent and up to date! The code is also easier to read. Hopefully, it may be even faster ;-)

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same opinion as Victor.

@vstinner vstinner merged commit 70730ad into python:main Aug 13, 2025
46 checks passed
@vstinner
Copy link
Member

Merged. Thank you!

@skirpichev skirpichev deleted the ac-decimal/73487 branch August 13, 2025 13:10
@skirpichev
Copy link
Contributor Author

Thanks for reviews!

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL8 Refleaks 3.x (tier-3) has failed when building commit 70730ad.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/75/builds/3167) and take a look at the build logs.
  4. Check if the failure is related to this commit (70730ad) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/75/builds/3167

Failed tests:

  • test_os
  • test_ssl
  • test.test_multiprocessing_fork.test_processes
  • test_external_inspection

Failed subtests:

  • test_get_server_certificate_timeout - test.test_ssl.SimpleBackgroundTests.test_get_server_certificate_timeout
  • test_timerfd_ns_select - test.test_os.TimerfdTests.test_timerfd_ns_select
  • test_connection - test.test_multiprocessing_fork.test_processes.WithProcessesTestConnection.test_connection
  • test_only_active_thread - test.test_external_inspection.TestGetStackTrace.test_only_active_thread

Test leaking resources:

  • test_ssl: memory blocks

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2094, in test_get_server_certificate_timeout
    with self.assertRaises(socket.timeout):
         ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
AssertionError: TimeoutError not raised


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2397, in run
    msg = self.read()
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2374, in read
    return self.sslconn.read()
           ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1148, in read
    return self._sslobj.read(len)
           ~~~~~~~~~~~~~~~~~^^^^^
 ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2942)
TLS: (<ssl.SSLSocket fd=5, family=2, type=1, proto=0, laddr=('127.0.0.1', 45158), raddr=('127.0.0.1', 44225)>, 'read', <TLSVersion.TLSv1_3: 772>, <_TLSContentType.ALERT: 21>, <_TLSAlertType.CERTIFICATE_REQUIRED: 116>, b'\x02t')
 connection timeout TimeoutError('timed out')
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1108)
k


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/_test_multiprocessing.py", line 3611, in test_connection
    self.assertEqual(poll(TIMEOUT1), True)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False != True


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: NO_SUITABLE_KEY_SHARE] no suitable key share (_ssl.c:1108)
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1108)
 connection timeout TimeoutError('timed out')
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1108)
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: NO_SUITABLE_KEY_SHARE] no suitable key share (_ssl.c:1108)
 connection timeout TimeoutError('timed out')
k


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_os.py", line 4613, in test_timerfd_ns_select
    self.assertEqual(self.read_count_signaled(fd), 1)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 4 != 1


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2397, in run
    msg = self.read()
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2374, in read
    return self.sslconn.read()
           ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1148, in read
    return self._sslobj.read(len)
           ~~~~~~~~~~~~~~~~~^^^^^
 ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2942)
TLS: (<ssl.SSLSocket fd=5, family=2, type=1, proto=0, laddr=('127.0.0.1', 36762)>, 'read', <TLSVersion.TLSv1_3: 772>, <_TLSContentType.ALERT: 21>, <_TLSAlertType.CERTIFICATE_REQUIRED: 116>, b'\x02t')
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1108)
 connection timeout TimeoutError('timed out')
 server:  new connection from ('127.0.0.1', 51212)
 server: connection cipher is now ('ECDHE-PSK-CHACHA20-POLY1305', 'TLSv1.2', 256)
 server:  new connection from ('127.0.0.1', 49074)
 server: connection cipher is now ('ECDHE-PSK-CHACHA20-POLY1305', 'TLSv1.2', 256)
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1108)
 server:  new connection from ('127.0.0.1', 44742)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
k


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/multiprocessing/process.py", line 320, in _bootstrap
    self.run()
    ~~~~~~~~^^
  File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/_test_multiprocessing.py", line 518, in _sleep_some_event
    time.sleep(100)
    ~~~~~~~~~~^^^^^
KeyboardInterrupt
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1108)
k


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_external_inspection.py", line 1246, in test_only_active_thread
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        len(gil_traces), 1, "Should have exactly one GIL holder"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 0 != 1 : Should have exactly one GIL holder


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1108)
 server:  new connection from ('127.0.0.1', 52650)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1108)
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1108)
 connection timeout TimeoutError('timed out')
 connection timeout TimeoutError('timed out')
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1108)
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1108)
 connection timeout TimeoutError('timed out')
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1108)
 server:  new connection from ('127.0.0.1', 56386)
 server: connection cipher is now ('ECDHE-PSK-CHACHA20-POLY1305', 'TLSv1.2', 256)
 server:  new connection from ('127.0.0.1', 44776)
 server: connection cipher is now ('ECDHE-PSK-CHACHA20-POLY1305', 'TLSv1.2', 256)
k


Traceback (most recent call last):
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/test/test_ssl.py", line 2313, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1084, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x.refleak/build/Lib/ssl.py", line 1399, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1108)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants