Skip to content

Bug: deprecated logging.warn() used in owtf/shell/base.py and owtf/shell/interactive.py #1406

@saurabh4269

Description

@saurabh4269

Describe the bug

logging.warn() was deprecated in Python 3.2 and removed in Python 3.12. The following call sites still use it:

  • owtf/shell/base.py line 204: logging.warn(out.decode("utf-8"))
  • owtf/shell/interactive.py line 38: logging.warn("ERROR - Communication channel closed - %s", abort_message)
  • owtf/shell/interactive.py line 56: logging.warn("ERROR: read - The Communication channel is down!")
  • owtf/shell/interactive.py line 100: logging.warn("ERROR: Run - The Communication Channel is down!")

Since the project targets python >= 3.11, these calls will raise AttributeError on any Python 3.12+ environment.

Note: owtf/shell/pexpect_sh.py has the same issue (lines 36, 57, 101, 126, 128).

Expected behavior

All calls should use logging.warning(), which has been the correct method since Python 3.2.

Environment

  • Python 3.12+ (AttributeError on removed method)

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