Skip to content

Conversation

@dvermd
Copy link
Contributor

@dvermd dvermd commented Oct 2, 2022

Tested by removing expected failure and commenting everything but OSError in Lib/test/test_exceptions.py::testAttributes::exceptionList, WindowsError and pickling part of the test.

fixes : #4193

@dvermd dvermd force-pushed the oserror_attributes branch 3 times, most recently from 8265033 to 47a3bda Compare October 2, 2022 20:50
@dvermd dvermd mentioned this pull request Oct 3, 2022
@dvermd
Copy link
Contributor Author

dvermd commented Oct 3, 2022

From the discussion in #4191, there seems to be 2 different behaviors of the OSError constructor:

  • the one which takes from 2 to 5 arguments and that fills errno, strerror, winerror, filename and filename2
  • the other one which takes 1 or more than 5 arguments, that just behaves like a BaseException without filling any of the OSError fields

@dvermd dvermd force-pushed the oserror_attributes branch 2 times, most recently from b1ece8e to 8ad3f3f Compare October 3, 2022 21:03
@dvermd dvermd force-pushed the oserror_attributes branch from 8ad3f3f to 5f04da0 Compare October 4, 2022 10:19
@dvermd dvermd force-pushed the oserror_attributes branch from 5f04da0 to a18bad2 Compare October 4, 2022 11:34
Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@youknowone youknowone merged commit 54d7c34 into RustPython:main Oct 4, 2022
@dvermd dvermd deleted the oserror_attributes branch October 6, 2022 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OSError attributes

2 participants