Bjørn Jørgensen created SPARK-49820:
---------------------------------------

             Summary: change IOError to OSError
                 Key: SPARK-49820
                 URL: https://issues.apache.org/jira/browse/SPARK-49820
             Project: Spark
          Issue Type: Improvement
          Components: PySpark
    Affects Versions: 4.0.0
            Reporter: Bjørn Jørgensen


OSError is the builtin error type used for exceptions that relate to the 
operating system.

In Python 3.3, a variety of other exceptions, like WindowsError were aliased to 
OSError. These aliases remain in place for compatibility with older versions of 
Python, but may be removed in future versions.

Prefer using OSError directly, as it is more idiomatic and future-proof.

Example

raise IOError
Use instead:


raise OSError

https://docs.astral.sh/ruff/rules/os-error-alias/
https://docs.python.org/3/library/exceptions.html#OSError



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to