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

Changes to use python-ipware #358

Closed

Conversation

rposborne
Copy link

@rposborne rposborne commented Oct 25, 2023

As django-ipware is being deprecated in favor of python-ipware, and the fact they share the same import namespace any project python-ipware

This is on hold until a conclusion is reached for un33k/python-ipware#10

As django-ipware is being deprecated in favor of python-ipware, and the fact they share the same import namespace any project python-ipware

Signed-off-by: Russell Osborne <[email protected]>
Copy link
Owner

@jrobichaud jrobichaud left a comment

Choose a reason for hiding this comment

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

pyproject.toml needs to be modified.

django_structlog/middlewares/request.py Show resolved Hide resolved
Comment on lines +23 to +26
from ipware import IpWare

# Instantiate IpWare with default values
ipw = IpWare()
Copy link
Owner

Choose a reason for hiding this comment

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

should this moved on the top of the file?

Copy link
Owner

Choose a reason for hiding this comment

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

I think it has to be added to app_settings.py and be configurable through settings.

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (400305f) 100.00% compared to head (8b0074f) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #358   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           32        32           
  Lines          459       459           
  Branches        23        23           
=========================================
  Hits           459       459           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jrobichaud
Copy link
Owner

jrobichaud commented Nov 6, 2023

Hi @rposborne.

I was wondering in which direction it was going finally:

  • python-ipware to replace django-ipware in django-structlog
  • django-ipware to use python-ipware

?

@rposborne
Copy link
Author

Closing as they are going to maintain the old one.

@rposborne rposborne closed this Nov 9, 2023
@jrobichaud
Copy link
Owner

As you seem to be a django-ipware and python-ipware aware, I have a question for you if you do not mind.

I was wondering if it would be useful to expose django-ipware configurations in django-structlog settings.

Some parameters have to be passed in the constructor and currently they are unavailable since django-structlog instantiates it directly. I am referring mainly about the proxy configuration.

What do you think?

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.

2 participants