Skip to content
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

v0.7.1 on GitHub repo, v0.8.0 on PyPI #31

Closed
vst opened this issue Jan 5, 2023 · 6 comments
Closed

v0.7.1 on GitHub repo, v0.8.0 on PyPI #31

vst opened this issue Jan 5, 2023 · 6 comments

Comments

@vst
Copy link

vst commented Jan 5, 2023

Latest release on the GitHub repository seems to be v0.7.1. On PyPI, we have v0.8.0.

Does that matter?

@sbdchd
Copy link
Owner

sbdchd commented Jan 5, 2023

oh hmm, maybe I pushed something to pypi and didn't merge it

@vst
Copy link
Author

vst commented Jan 5, 2023

Probably. There is only dc69c7d. You may wish to rebase master if you think that it is not a bad idea (and you can find the commits).

@dolfandringa
Copy link

dolfandringa commented Jul 21, 2023

Could you please merge your code back in here? There is still a version discrepancy between this repo and pypi.

image

@dolfandringa
Copy link

I don't know what went on with that version, but it also reverts fixes from 0.7.1, so I would suggest pinning your versions to 0.7.1

@simensol
Copy link

simensol commented Oct 8, 2024

I have v0.8.0 installed through PyPi.

The following code:

from rest_framework.permissions import BasePermission

class CanChangeChild(BasePermission):
    ...

@action(
    detail=True,
    methods=["patch"],
    serializer_class=UpdateProfilePictureSerializer,
    permission_classes=[CanChangeChild],
)
def update_profile_picture(self, request, pk=None):
    ...

raised the following error from Pylance:

Argument of type "list[type[CanChangeChild]]" cannot be assigned to parameter "permission_classes" of type "_PermClassesParam" in function "action" Type "CanChangeChild" is not assignable to type "type[BasePermission]"

After checking the types, I found this in rest_framework-stubs/decorators.pyi

_PermClassesParam = Sequence[Type[BasePermission]]

However, the issue seems corrected in the master branch:

_PermClassesParam = Sequence[_PermissionClass]

The fix was made in #40 on Jul 25, 2023:

2a44546#diff-311444d4598e5dbe12bf1c0dd49f2afbbb13dbdff781bedabeb638d5f99e4f94L93-L94

I tried pinning to v0.7.1 as suggested by @dolfandringa, but the fix doesn’t seem included in that version either. The only solution was installing from the master branch, which is not ideal.

Would it be possible, @sbdchd, to publish the latest master as a new version to PyPi?

@sbdchd
Copy link
Owner

sbdchd commented Oct 10, 2024

should be fixed!

@sbdchd sbdchd closed this as completed Oct 10, 2024
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

No branches or pull requests

4 participants