Skip to content

requirements: use django-cors-headers instead #8713

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

Closed
wants to merge 4 commits into from

Conversation

humitos
Copy link
Member

@humitos humitos commented Nov 24, 2021

Note that django-cors-middleware is deprecated (see note in
https://github.com/zestedesavoir/django-cors-middleware) and they recommend
using django-cors-headers instead.

Related to #8692

@humitos humitos requested a review from a team as a code owner November 24, 2021 14:52
@humitos humitos force-pushed the humitos/django-cors-requirement branch from 4d149d8 to f678e83 Compare November 24, 2021 14:57
@@ -92,9 +92,10 @@ dj-pagination==2.5.0
# Version comparison stuff
packaging==21.2

# django-cors-middleware==1.5.0 fails with
# django-cors-middleware was replaced by django-cors-headers
# django-cors-headers==3.10.0 is failing with:
Copy link
Member

Choose a reason for hiding this comment

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

Should we not fix the error if we're looking to upgrade this package? This feels like a sideways move, but not really what we need to do to move forward?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think we can fix this issue by ourselves. I didn't research too much yet, but I found adamchainz/django-cors-headers#558 that it's related to a Django bug which is solved in 3.1.x

Copy link
Member

Choose a reason for hiding this comment

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

@humitos I believe we're on a newer Django now, so is this fixed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's see. I've rebased the branch and push. Tests should pass now if it's fixed 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems it's not fixed yet... Tests are still failing, :/

@agjohnson
Copy link
Contributor

Bumping this one off our release tomorrow due to questions here.

@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added Status: stale Issue will be considered inactive soon and removed Status: stale Issue will be considered inactive soon labels Mar 2, 2022
@humitos humitos force-pushed the humitos/django-cors-requirement branch from 976e942 to ed2469c Compare March 2, 2022 16:32
@humitos humitos enabled auto-merge March 2, 2022 16:32
@humitos
Copy link
Member Author

humitos commented Mar 7, 2022

The issue AttributeError: 'dict' object has no attribute 'has_header' seems it's not solved in Django 3.2 as we thought. Tests are still failing on that.

@agjohnson
Copy link
Contributor

This seems like it will get bumped out a release. I won't reassign a release yet though, sounds like this one is a bit more elusive than we expected.

@stale
Copy link

stale bot commented May 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added Status: stale Issue will be considered inactive soon and removed Status: stale Issue will be considered inactive soon labels May 2, 2022
humitos added 4 commits May 3, 2022 09:43
Note that `django-cors-middleware` is deprecated (see note in
https://github.com/zestedesavoir/django-cors-middleware) and they recommend
using `django-cors-headers` instead.
We are using Django 3.x now, so this problem should be solved now.
@humitos humitos force-pushed the humitos/django-cors-requirement branch from ed2469c to 7a6ba35 Compare May 3, 2022 07:44
@humitos
Copy link
Member Author

humitos commented Feb 3, 2023

With the latest refactor that @stsewd did in CORS, this dependency can probably be removed completely, right?

@stsewd
Copy link
Member

stsewd commented Feb 6, 2023

@humitos nope, we still need it to set the proper CORS headers for us.

@stsewd stsewd mentioned this pull request Feb 6, 2023
@ericholscher
Copy link
Member

@stsewd would be good to get upgraded to a supported version here, since we aren't doing anything custom anymore. 👍

@stsewd
Copy link
Member

stsewd commented Feb 7, 2023

I'm doing this at #10000.

also, PR/issue number 10K!

@stsewd stsewd closed this Feb 7, 2023
auto-merge was automatically disabled February 7, 2023 19:33

Pull request was closed

@stsewd stsewd deleted the humitos/django-cors-requirement branch February 7, 2023 19:33
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.

4 participants