diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 50e102f6e..e3b77a90e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -6,17 +6,18 @@ permissions:
jobs:
build:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-20.04
strategy:
matrix:
- python-version: [2.7, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, "3.10", pypy2, pypy3]
+ python-version: [3.6, 3.7, 3.8, 3.9, "3.10", 3.11, 3.12, pypy2.7, pypy3.9]
steps:
- - uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@f38219332975fe8f9c04cca981d674bf22aea1d3 # v2
+ uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: ${{ matrix.python-version }}
+ allow-prereleases: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 7c33e851a..894dfc3ca 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -8,15 +8,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Set up latest Python 3
- uses: actions/setup-python@f38219332975fe8f9c04cca981d674bf22aea1d3 # v2
+ uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
with:
python-version: 3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install protobuf pycodestyle coverage coveralls
+ pip install protobuf==3.17.3 pycodestyle coverage coveralls
- name: Test with coverage
run: |
cd python
diff --git a/.github/workflows/typing.yml b/.github/workflows/typing.yml
index 4ce986911..5005dad2c 100644
--- a/.github/workflows/typing.yml
+++ b/.github/workflows/typing.yml
@@ -18,7 +18,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install mypy==0.921 types-protobuf
+ pip install mypy==0.921 types-protobuf==3.19.21
- name: Execute run_stubtest.py
run: |
@@ -39,7 +39,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install mypy types-protobuf
+ pip install mypy==0.921 types-protobuf==3.19.21
- name: Run mypy
run: |
diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml
new file mode 100644
index 000000000..f0fa64186
--- /dev/null
+++ b/.github/workflows/upstream.yml
@@ -0,0 +1,21 @@
+name: Check libphonenumbers releases
+
+on:
+ schedule:
+ - cron: '30 7,19 * * *' # Run daily at 07:30 and 19:30
+ workflow_dispatch:
+
+jobs:
+ versioncheck:
+ runs-on: ubuntu-latest
+ if: github.repository_owner == 'daviddrysdale'
+ steps:
+ - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
+ - uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
+ with:
+ python-version: 3
+ - name: Check upstream version
+ run: |
+ pip install -U pip
+ pip install requests
+ python3 tools/python/checkupstreamversion.py
diff --git a/README.md b/README.md
index 2b22d68f7..2a99a86e6 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,8 @@ Original Java code is Copyright (C) 2009-2015 The Libphonenumber Authors.
Release [HISTORY](https://github.com/daviddrysdale/python-phonenumbers/blob/dev/python/HISTORY.md),
derived from [upstream release notes](https://github.com/google/libphonenumber/blob/master/release_notes.txt).
+[Documentation](https://daviddrysdale.github.io/python-phonenumbers/)
+
Installation
------------
@@ -141,7 +143,7 @@ PhoneNumberMatch [51,62) 703-4800500
```
You might want to get some information about the location that corresponds to a phone number. The
-`geocoder.area_description_for_number` does this, when possible.
+`geocoder.description_for_number` does this, when possible.
```pycon
>>> from phonenumbers import geocoder
@@ -207,9 +209,6 @@ load of metadata will not cause a pause or memory exhaustion):
* Force-load the extended metadata by `import`ing the appropriate packages (`phonenumbers.geocoder`,
`phonenumbers.carrier`, `phonenumbers.timezone`).
-The `phonenumberslite` version of the package does not include the geocoding, carrier and timezone metadata,
-which can be useful if you have problems installing the main `phonenumbers` package due to space/memory limitations.
-
Static Typing
-------------
diff --git a/docs/phonenumbers.asyoutypeformatter.html b/docs/phonenumbers.asyoutypeformatter.html
index 68e80f8f2..d67129b17 100644
--- a/docs/phonenumbers.asyoutypeformatter.html
+++ b/docs/phonenumbers.asyoutypeformatter.html
@@ -58,7 +58,7 @@
Arguments:
region_code -- The region where the phone number is being entered
-Return an AsYouTypeFormatter} object, which could be used to format
+Return an AsYouTypeFormatter object, which could be used to format
phone numbers in the specific region "as you type"