Skip to content

RecursionError raised when attempting to destroy a session #8

@kyprince

Description

@kyprince

On Python 3.14
files_com version 1.6.362

Following the files.com documentation, I'm attempting to create and destroy a session following the code in the docs:

import files_sdk

session = files_sdk.session.create({ "username": "motor", "password": "vroom" })
session.destroy()

Expected behavior:
session.destroy() should destroy the active session.

Actual behavior:
session.destroy() raises a RecursionError.

There appears to be a collision with the the instance method destroy and the module-level function destroy in session.py, which is causing a recursive call. I assume the module-level function is intended to be called at the end of the function below.

def destroy(self, params=None, options=None):
    if not isinstance(params, dict):
        params = {}
    if not isinstance(options, dict):
        options = {}
    options.pop("session_id", None)
    options["session"] = self
    Session.destroy(params, options)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions