You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2024/09/27 23:53:00 UTC

[jira] [Resolved] (SPARK-49820) change IOError to OSError

     [ https://issues.apache.org/jira/browse/SPARK-49820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-49820.
----------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

Issue resolved by pull request 48287
[https://github.com/apache/spark/pull/48287]

> 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
>            Assignee: Bjørn Jørgensen
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org