-
Notifications
You must be signed in to change notification settings - Fork 21
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
Namespace change in django_recaptcha library as of 4.0: captcha changed to django_recaptcha #50
Conversation
Context: https://github.com/torchbox/django-recaptcha/releases/tag/4.0.0
|
@DanielSwain If you're modifying the import, I reckon the requirements in try:
from django_captcha.fields import ReCaptchaField # >= 4.0
except ImportError:
from captcha.fields import ReCaptchaField # < 4.0 Until this is merged, I reckon you can add @tacitus @haydngreatnews Do you think someone can look at this issue, this is breaking some builds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed with previous review - the import needs to be wrapped in a try/except with fallback to pre-4 captcha namespace:
try:
from django_recaptcha.fields import ReCaptchaField
except ImportError:
from captcha.fields import ReCaptchaField
The widget syntax has changed in django-recaptcha also, upgrading that package needs to be a conscious, planned decision for people supplying parameters to the underlying widget.
Hi there, thanks for the contribution. Seeing as the interface to the widget has also changed, I think we should probably set a maximum version in the dependencies for this case, and make a point release. I'll get started down that road now, and then look into merging #49 for a better time down the road, also. Until then, I think @loicteixeira's suggestion, of setting the requirement explicitly in your project would be the best option. |
With the cloning of this repo by Torchbox into Torchbox Forks, it appears that Torchbox will now be maintaining Note: The Installation section on PyPI mentions cloning from Springload's private repo rather than using |
@DanielSwain Torchbox isn’t maintaining So I’d recommend keeping this PR open. Regardless of who maintains the package, they’ll benefit from this work. And as far as future maintenance of this package, let’s keep chatting in #51 ? |
Reopening per the comment from @thibaudcolas above. |
Hello everyone, any ideas when this will be fixed or can a workaround be provided? |
The workaround is above. Go into the package folder in your virtual environment, edit forms.py and update the import manually until this is resolved. |
@brylie Any chance you could review this - it seems you're the only one with access to do this |
As of 14th opf September 2024 the issue still remains. Any news on of this is going to be fixed? |
This package has been updated as of v2.1.1 to support django-recaptcha 4+, and drop support for previous versions If you have a particular need to run |
No description provided.