You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Type checks started failing on our codebase with v4.4 #514
Thanks for fixing so quickly! Do you plan to do a patch release for this change alone or do you normally wait for a few more fixes before cutting a release?
Good day. FYI, the problem remains. I just checked the PR and it seems to be adjusting the mypy config for this repo, but this doesn't have any effect on projects using the package.
@Viicos We add async variants to every method in the management client at runtime - eg users.get_async(id) would all of these not also need to be defined? can we just opt out of type checking for AsyncAuth0?
And the fact that asyncify returns dynamic stuff as well, it is indeed hard to type check this correctly.
The fix you did on #515 only affects the current project, as the mypy.ini file is only used when working on auth0-python. Instead, projects depending on auth0-python need to disable this attr-defined error code on their mypy configuration if they want to ignore the error (this means that #515 can be reverted)
Instead, projects depending on auth0-python need to disable this attr-defined error code on their mypy configuration
I don't think It's reasonable to expect users of this package to have to do this, if there isn't a better solution I'm going to have to remove the py.typed file and revert publishing types until a better solution is available.
Activity
adamjmcgrath commentedon Aug 18, 2023
Thanks @lorinkoz - will take a look
dazzag24 commentedon Aug 18, 2023
I'm also seeing this issue after just updating to 4.4
lorinkoz commentedon Aug 21, 2023
Thanks for fixing so quickly! Do you plan to do a patch release for this change alone or do you normally wait for a few more fixes before cutting a release?
adamjmcgrath commentedon Aug 21, 2023
Np @lorinkoz - will ship a patch today
adamjmcgrath commentedon Aug 21, 2023
@lorinkoz - apologies - it might take a little longer while I fix a releasing issue
Will update this thread when the patch is up
adamjmcgrath commentedon Aug 21, 2023
@lorinkoz 4.4.1 is now available - lmk if you run into any more types issues in the management client
lorinkoz commentedon Aug 30, 2023
Good day. FYI, the problem remains. I just checked the PR and it seems to be adjusting the mypy config for this repo, but this doesn't have any effect on projects using the package.
adamjmcgrath commentedon Aug 30, 2023
Ah, ok - thanks for the heads up @lorinkoz
@Viicos - do you know a fix for this?
Viicos commentedon Aug 30, 2023
Well this looks similar to #483 but for the
AsyncAuth0class. Can be fixed by either doing the same thing as:auth0-python/auth0/management/auth0.py
Lines 54 to 94 in b10cd5b
Or by doing it in a
TYPE_CHECKINGblockadamjmcgrath commentedon Aug 30, 2023
@Viicos We add async variants to every method in the management client at runtime - eg
users.get_async(id)would all of these not also need to be defined? can we just opt out of type checking forAsyncAuth0?Viicos commentedon Aug 30, 2023
Looking at how it is done currently:
auth0-python/auth0/management/async_auth0.py
Lines 30 to 42 in d1097e7
And the fact that
asyncifyreturns dynamic stuff as well, it is indeed hard to type check this correctly.The fix you did on #515 only affects the current project, as the
mypy.inifile is only used when working onauth0-python. Instead, projects depending onauth0-pythonneed to disable thisattr-definederror code on their mypy configuration if they want to ignore the error (this means that #515 can be reverted)adamjmcgrath commentedon Aug 30, 2023
I don't think It's reasonable to expect users of this package to have to do this, if there isn't a better solution I'm going to have to remove the
py.typedfile and revert publishing types until a better solution is available.Revert publishing types (#521)
lorinkoz commentedon Sep 7, 2023
Thanks again!