Skip to content

ISSUE-159: possible fix for information hiding #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2021

Conversation

jjtolton
Copy link
Contributor

Closes: #159

@cnuernber I'm not sure about the background on that try/catch, so please double check this for me. Removing it exposes the error message @behrica is seeking.

@jjtolton
Copy link
Contributor Author

Ah I see the case now. builtins.list. Good thing you setup these checks!

throw if empty path to reveal more debug info
@cnuernber
Copy link
Collaborator

Is this PR ready for review/testing?

@jjtolton
Copy link
Contributor Author

jjtolton commented Oct 20, 2021 via email

@cnuernber
Copy link
Collaborator

Oh definitely it makes logical sense. It is hard to get the metadata generation to work correctly and not hide errors as often times simply reading python attributes causes errors but we should not hide errors due to importing modules. This is a great PR as that has bitten me and I am sure many other people.

@jjtolton
Copy link
Contributor Author

jjtolton commented Oct 20, 2021 via email

@jjtolton jjtolton marked this pull request as ready for review October 20, 2021 15:37
@jjtolton jjtolton requested a review from cnuernber October 20, 2021 15:37
@cnuernber cnuernber merged commit bd586da into clj-python:master Oct 22, 2021
@cnuernber
Copy link
Collaborator

So this will expose error information if the module the user tries to load fails at import but not of some nested module does, is that correct?

Copy link
Collaborator

@cnuernber cnuernber left a comment

Choose a reason for hiding this comment

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

Looks good - it would be nice if any import always generated a full stack trace I guess but we can't do that.

@jjtolton
Copy link
Contributor Author

So this will expose error information if the module the user tries to load fails at import but not of some nested module does, is that correct?

I narrowly checked to make sure that it covered the complaint in #159 only. It would be possible to extract the StackTrace, they can be converted to first class objects https://docs.python.org/3/library/traceback.html#traceback.extract_tb. There would need to be some magic done to convert the pointer.

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.

require-python hides useful python error messages
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy