diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..491deae --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: pip + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..8256fbf --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,46 @@ +name: "Code scanning - action" + +on: + push: + pull_request: + schedule: + - cron: '0 20 * * 4' + +jobs: + CodeQL-Build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + # Override language selection by uncommenting this and choosing your languages + with: + languages: python, cpp + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + - run: | + sudo apt install libgeoip-dev + python setup.py build + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.travis.yml b/.travis.yml index 4d96190..e1b6762 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,16 @@ +--- language: python - -python: - - 2.6 - - 2.7 - - 3.3 - +matrix: + include: + - python: '2.6' + dist: trusty + - python: '2.7' + - python: '3.3' + dist: trusty + - python: '3.4' + - python: '3.5' + - python: '3.6' + - python: '3.7' before_install: - git clone git://github.com/maxmind/geoip-api-c - cd geoip-api-c @@ -14,14 +20,15 @@ before_install: - sudo make install - sudo ldconfig - cd .. - - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi - + - "if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi" script: - CFLAGS="-Werror -Wall -Wextra" python setup.py test - notifications: email: - recipients: - - dev@maxmind.com - on_success: change on_failure: always + on_success: change + recipients: + - dev-ci@maxmind.com + slack: + rooms: + secure: "mNw9bQtM+fHITJiYGwex/YB42uy6IfIYSLQZWaD6F3mb2Y8aSXAtck+raV/C85CTM4LyBq6YyFLr1912+Xd0gmM7mSEQc5wXVf/vlzpMfNyDedonBSZeed7SGfm63xCTN9KWkOmhzIAhRy7WozmBP+bkNjyH9D1gYt863W6OYiA=\n" diff --git a/MANIFEST.in b/MANIFEST.in index 0ea1e05..881cb08 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ -include ChangeLog LICENSE README.rst py_GeoIP.c +include ChangeLog.md LICENSE README.rst py_GeoIP.c recursive-include examples *.py recursive-include tests *.py diff --git a/README.rst b/README.rst index 2455b39..ac0974b 100644 --- a/README.rst +++ b/README.rst @@ -2,11 +2,25 @@ MaxMind GeoIP Legacy Python Extension API ========================================= +End of Life +----------- + +MaxMind will be retiring the GeoIP Legacy databases at the end of May +2022. Until then, this library will only receive critical security and bug +fixes. Support for this library will end completely with the last release of +the legacy GeoIP databases. + +We recommend that you upgrade to our GeoIP2 databases. You can read these +from Python using `our GeoIP2 Python API `_. + +See `our blog post `_ +for more information. + Requirements ------------ * Python 2.5+ or 3.3+ -* GeoIP C Library 1.4.7 or greater +* GeoIP Legacy C Library 1.4.7 or greater Installation ------------ @@ -24,6 +38,14 @@ From source: $ python setup.py build $ python setup.py install + +IP Geolocation Usage +-------------------- + +IP geolocation is inherently imprecise. Locations are often near the center of +the population. Any location provided by a GeoIP database should not be used to +identify a particular address or household. + Usage ----- diff --git a/py_GeoIP.c b/py_GeoIP.c index fcf0b6b..11c9063 100644 --- a/py_GeoIP.c +++ b/py_GeoIP.c @@ -20,8 +20,8 @@ #include -#include "GeoIP.h" -#include "GeoIPCity.h" +#include +#include #ifdef __GNUC__ # define UNUSED(x) UNUSED_ ## x __attribute__((__unused__)) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy