Skip to content

Deprecation version on Python 3.11: ssl.SSLContext() without protocol argument is deprecated #196

@ad-m-ss

Description

@ad-m-ss

Driver version

master

Redshift version

N/A

Client Operating System

N/A

Python version

3.11

Table schema

N/A

Problem description

  1. Expected behaviour:
  2. Actual behaviour:
  3. Error message/stack trace:
/usr/local/lib/python3.11/site-packages/redshift_connector/__init__.py:340: in connect
    return Connection(
/usr/local/lib/python3.11/site-packages/redshift_connector/core.py:603: in __init__
    ssl_context: SSLContext = SSLContext()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'ssl.SSLContext'>, protocol = None, args = (), kwargs = {}

    def __new__(cls, protocol=None, *args, **kwargs):
        if protocol is None:
>           warnings.warn(
                "ssl.SSLContext() without protocol argument is deprecated.",
                category=DeprecationWarning,
                stacklevel=2
            )
E           DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
  1. Any other details that can be helpful:

ssl_context: SSLContext = SSLContext()

Python Driver trace logs

Reproduction code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions