Skip to content

cx_oracle emits deprecation warning and/or segfaults under python 3.8.0b1 #317

Closed
@zzzeek

Description

@zzzeek

cx_Oracle generates this warning under Python 3.8.0b1 when an output type handler is used:

DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats

If you turn on the "error" handler for the warnings filter, then it segfaults.

Complete example:

import cx_Oracle
import warnings

# comment to only emit a warning, not segfault
warnings.filterwarnings("error", category=DeprecationWarning)


conn = cx_Oracle.connect(
    user="scott",
    password="tiger",
    dsn=cx_Oracle.makedsn("oracle1120", 1521, sid="xe"),
)

def output_type_handler(
    cursor, name, default_type, size, precision, scale
):
    return None

# comment out to remove the warning
conn.outputtypehandler = output_type_handler

cursor = conn.cursor()

cursor.execute(
    "select 1 from dual",
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpatch availableAwaiting inclusion in official release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions