Skip to content
New issue

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

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

Already on GitHub? # to your account

chore: update to python 3.11.11+20250212 for libssl #26049

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jdstrand
Copy link
Contributor

@jdstrand jdstrand commented Feb 21, 2025

References:

Testing: I locally recompiled against 3.11.11+20250212, put influxdb3 and the unpacked python-build-standalone from the all.tar.gz from https://app.circleci.com/pipelines/github/influxdata/influxdb/44279/workflows/c86bfc95-cb04-42cd-82e9-f12c62f18649/jobs/418616/artifacts in place, then ran this plugin on Linux/amd64, Darwin/aarch64 and Windows/amd64 (the ssl import uses libssl under the hood):

import importlib.util
import sys

def process_scheduled_call(influxdb3_local, call_time, args=None):
    influxdb3_local.info("sys.prefix = %s" % sys.prefix)
    influxdb3_local.info("sys.path = %s" % sys.path)
    spec = importlib.util.find_spec("ssl")
    if spec is not None:
        influxdb3_local.info("'ssl' location = %s" % spec.origin)

        # use ssl
        # https://docs.python.org/3/library/ssl.html#socket-creation
        import socket
        import ssl

        hn = 'www.python.org'
        ctx = ssl.create_default_context()
        with socket.create_connection((hn, 443)) as sock:
            with ctx.wrap_socket(sock, server_hostname=hn) as ssock:
                influxdb3_local.info("connecting to: %s" % hn)
                influxdb3_local.info("sock version: %s" % ssock.version())
    else:
        influxdb3_local.info("'ssl' location = not found")

Linux:

{
  "trigger_time": "2025-02-21T14:28:19Z",
  "log_lines": [
    "INFO: sys.prefix = /home/jamie/tmp/influxdb3-pe/data/plugins/.venv",
    "INFO: sys.path = ['/home/jamie/tmp/influxdb3-pe/data/plugins/.venv/lib/python3.11/site-packages', '/home/jamie/tmp/influxdb3-pe/install/python/lib/python311.zip', '/home/jamie/tmp/influxdb3-pe/install/python/lib/python3.11', '/home/jamie/tmp/influxdb3-pe/install/python/lib/python3.11/lib-dynload']",
    "INFO: 'ssl' location = /home/jamie/tmp/influxdb3-pe/install/python/lib/python3.11/ssl.py",
    "INFO: connecting to: www.python.org",
    "INFO: sock version: TLSv1.3"
  ],
  "database_writes": {},
  "errors": []
}

Darwin:

{
  "trigger_time": "2025-02-21T14:28:40Z",
  "log_lines": [
    "INFO: sys.prefix = /Users/jamie/tmp/influxdb3-pe/install/python",
    "INFO: sys.path = ['/Users/jamie/tmp/influxdb3-pe/data/plugins/.venv/lib/python3.11/site-packages', '/Users/jamie/tmp/influxdb3-pe/install/python/lib/python311.zip', '/Users/jamie/tmp/influxdb3-pe/install/python/lib/python3.11', '/Users/jamie/tmp/influxdb3-pe/install/python/lib/python3.11/lib-dynload', '/Users/jamie/tmp/influxdb3-pe/install/python/lib/python3.11/site-packages']",
    "INFO: 'ssl' location = /Users/jamie/tmp/influxdb3-pe/install/python/lib/python3.11/ssl.py",
    "INFO: connecting to: www.python.org",
    "INFO: sock version: TLSv1.3"
  ],
  "database_writes": {},
  "errors": []
}

Windows:

{
  "trigger_time": "2025-02-21T14:29:09Z",
  "log_lines": [
    "INFO: sys.prefix = Z:\\influxdb3-pe\\install\\python",
    "INFO: sys.path = ['Z:\\\\influxdb3-pe\\\\data\\\\plugins\\\\.venv\\\\Lib\\\\site-packages', 'Z:\\\\influxdb3-pe\\\\install\\\\python311.zip', 'Z:\\\\influxdb3-pe\\\\install\\\\python\\\\DLLs', 'Z:\\\\influxdb3-pe\\\\install\\\\python\\\\Lib', 'Z:\\\\influxdb3-pe\\\\install', 'Z:\\\\influxdb3-pe\\\\install\\\\python', 'Z:\\\\influxdb3-pe\\\\install\\\\python\\\\Lib\\\\site-packages']",
    "INFO: 'ssl' location = Z:\\influxdb3-pe\\install\\python\\Lib\\ssl.py",
    "INFO: connecting to: www.python.org",
    "INFO: sock version: TLSv1.3"
  ],
  "database_writes": {},
  "errors": []
}

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

Successfully merging this pull request may close these issues.

1 participant