GithubHelp home page GithubHelp logo

IPv6 address routability about django-ipware HOT 6 CLOSED

un33k avatar un33k commented on September 25, 2024
IPv6 address routability

from django-ipware.

Comments (6)

un33k avatar un33k commented on September 25, 2024

Do you have a link to the specs?

from django-ipware.

Karimerto avatar Karimerto commented on September 25, 2024

Specs are the same as in your documentation: https://en.wikipedia.org/wiki/Reserved_IP_addresses. But what I mean is using https://docs.python.org/3/library/ipaddress.html for detecting whether an address actually belongs to a given subnet. I created a version which does this and it seems to work nicely. I also added a couple of tests to check for more private IP addresses.

from django-ipware.

un33k avatar un33k commented on September 25, 2024

@Karimerto I am looking forward to your PR. Please have in mind that we still need to support py 2.7. As the link you provided is only in py 3. I like the idea as ipaddress is part of python and we don't create another depency.

Alternatively, we can pin use python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', and make the next version py 3.0 only.

from django-ipware.

Karimerto avatar Karimerto commented on September 25, 2024

Actually the same ipaddress library exists in both python versions, 2 and 3. I forked a copy of this and pushed the necessary changes. However it currently supports only python 3, as python 2's version of ipaddress library wants the string to be unicode (as in u'something'). I'll see if I can easily create something that'll support both 2 and 3.

from django-ipware.

un33k avatar un33k commented on September 25, 2024

I have looked at your work and it looks great. If you can make it fallback on what we have now for 2.7, it would be a great PR. Thx

from django-ipware.

un33k avatar un33k commented on September 25, 2024

@Karimerto django-ipware is on its way to being deprecated.

With that said, I have a python package that is going to replace it.

Have a look at python-ipware and if works for you switch to it.

Feedback is welcomed.

from django-ipware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.