wagtail-django-recaptcha
                                
                                 wagtail-django-recaptcha copied to clipboard
                                
                                    wagtail-django-recaptcha copied to clipboard
                            
                            
                            
                        Namespace change in django_recaptcha library as of 4.0: captcha changed to django_recaptcha
Context: https://github.com/torchbox/django-recaptcha/releases/tag/4.0.0
Package namespace renamed!
The package namespace captcha has been renamed to django_recaptcha to avoid conflicts with other captcha packages.
Please see the full CHANGELOG for all changes and upgrade considerations
@DanielSwain If you're modifying the import, I reckon the requirements in setup.py be updated as well to only install >=4? Otherwise, make the imports work with both versions (assuming everything else is compatible?) like so:
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 django_recaptcha < 4 in your own requirements.
@tacitus @haydngreatnews Do you think someone can look at this issue, this is breaking some builds.
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 wagtail-django-recaptcha.  Their just-released version addresses the django_recaptcha namespace problem.  Therefore, I'm closing this PR with an additional note to @thibaudcolas and @brylie that the PyPI project has not yet been updated.
Note:  The Installation section on PyPI mentions cloning from Springload's private repo rather than using pip install wagtail-django-recaptcha.
@DanielSwain Torchbox isn’t maintaining wagtail-django-recaptcha. We do have @katdom13 from Torchbox contributing to this project via maintenance-related PRs like #49. I work for Torchbox and have access to the package on PyPI but only because I used to help maintain this project at Springload years ago. Please see our description of the purpose of torchbox-forks for more info about our fork.
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?
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.
https://github.com/springload/wagtail-django-recaptcha/pull/50#pullrequestreview-1738739252
@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 django-recaptcha < 3, then I would recommend you use an older version of this package, or specifically state your case here.