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

Fst 20221118 https://dialpad.atlassian.net/browse/DP-60739 #5

Open
wants to merge 67 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
2dda137
Merge metadata changes from upstream 8.12.44
daviddrysdale Feb 25, 2022
81027e3
Generated files for metadata
daviddrysdale Feb 25, 2022
821454c
Prep for 8.12.44 release
daviddrysdale Feb 25, 2022
214fcb1
Merge metadata changes from upstream 8.12.45
daviddrysdale Mar 11, 2022
c3b6d23
Generated files for metadata
daviddrysdale Mar 11, 2022
6db6ffa
Prep for 8.12.45 release
daviddrysdale Mar 11, 2022
1338d6c
Merge metadata changes from upstream 8.12.46
daviddrysdale Apr 1, 2022
0e0ca00
Generated files for metadata
daviddrysdale Apr 1, 2022
f92246d
Prep for 8.12.46 release
daviddrysdale Apr 1, 2022
d84e6c1
Merge metadata changes from upstream 8.12.47
daviddrysdale Apr 21, 2022
f06ff47
Generated files for metadata
daviddrysdale Apr 21, 2022
26655fc
Add extra tests from upstream
daviddrysdale Apr 21, 2022
4da649d
Prep for 8.12.47 release
daviddrysdale Apr 21, 2022
4d017ef
Merge metadata changes from upstream 8.12.48
daviddrysdale May 6, 2022
cf45cfb
Generated files for metadata
daviddrysdale May 6, 2022
a500e29
Prep for 8.12.48 release
daviddrysdale May 6, 2022
9761786
Merge metadata changes from upstream 8.12.49
daviddrysdale May 28, 2022
0bf4931
Generated files for metadata
daviddrysdale May 28, 2022
1405136
Prep for 8.12.49 release
daviddrysdale May 28, 2022
d3209ea
ci: pin protobuf dep in coverage.yml too
daviddrysdale May 28, 2022
0271114
tests: use assertIsNone in phonenumberutiltest.py (#242)
penmetsaa Jun 10, 2022
94931e0
Merge metadata changes from upstream 8.12.50
daviddrysdale Jun 10, 2022
d86771c
Generated files for metadata
daviddrysdale Jun 10, 2022
ec339e5
Prep for 8.12.50 release
daviddrysdale Jun 10, 2022
9055710
Merge code changes from upstream 8.12.51
daviddrysdale Jul 1, 2022
dfb476f
Merge metadata changes from upstream 8.12.51
daviddrysdale Jul 1, 2022
0319ba6
Generated files for metadata
daviddrysdale Jul 1, 2022
e896b61
Prep for 8.12.51 release
daviddrysdale Jul 1, 2022
8ef0fa4
ci: pin versions of dependencies
daviddrysdale Jul 1, 2022
3981d27
Merge metadata changes from upstream 8.12.52
daviddrysdale Jul 19, 2022
11cf84c
Generated files for metadata
daviddrysdale Jul 19, 2022
fdc02ac
Prep for 8.12.52 release
daviddrysdale Jul 19, 2022
0224550
Fix new lint from pycodestyle v2.9.0
daviddrysdale Jul 31, 2022
9c98d55
docs: Fix a few typos (#246)
timgates42 Jul 31, 2022
ee2fe76
Merge metadata changes from upstream 8.12.53
daviddrysdale Aug 4, 2022
c5cf1b0
Generated files for metadata
daviddrysdale Aug 4, 2022
f12e9ac
Prep for 8.12.53 release
daviddrysdale Aug 4, 2022
cd5886b
Merge metadata changes from upstream 8.12.54
daviddrysdale Aug 19, 2022
be45325
Generated files for metadata
daviddrysdale Aug 19, 2022
c2fe6f4
Prep for 8.12.54 release
daviddrysdale Aug 19, 2022
09a7204
Merge metadata changes from upstream 8.12.55
daviddrysdale Sep 9, 2022
751ce42
Generated files for metadata
daviddrysdale Sep 9, 2022
4af9941
Prep for 8.12.55 release
daviddrysdale Sep 9, 2022
334f9d1
Merge metadata changes from upstream 8.12.56
daviddrysdale Sep 24, 2022
4002dab
Generated files for metadata
daviddrysdale Sep 24, 2022
d08079c
Prep for 8.12.56 release
daviddrysdale Sep 24, 2022
79bbe0f
Merge metadata changes from upstream 8.12.57
daviddrysdale Oct 14, 2022
679a137
Generated files for metadata
daviddrysdale Oct 14, 2022
466e4c5
Prep for 8.12.57 release
daviddrysdale Oct 14, 2022
e97c76d
tools: don’t auto-regen locale data
daviddrysdale Nov 6, 2022
e610dc9
Merge metadata changes from upstream 8.13.0
daviddrysdale Nov 6, 2022
846d48c
Generated files for metadata
daviddrysdale Nov 6, 2022
fe2f0c1
Prep for 8.13.0 release
daviddrysdale Nov 6, 2022
5963b05
tools: don't use clean target in metaclean
daviddrysdale Nov 6, 2022
f1d7607
New Tests
rajpan Aug 26, 2019
321617e
New Tests
rajpan Aug 26, 2019
b64f53d
Add Dialpadistan region
CoreyFirespotter Jul 31, 2018
b4cb1f9
TEL-10934 - Unable To Dialpad Florida Number From Desktop & Mobile App
rajpan Feb 12, 2020
b4cee0c
Changes for new NPA in Canada
rajpan Jul 1, 2020
953e69f
DP-13742: Fix to Indonesia toll free numbers
danadialpad Sep 20, 2018
6b29fde
TEL-12621 - Unable dial new Poland Police prefix +48 47 731 4848
rajpan Oct 15, 2020
d381b94
Rename test file
rajpan Oct 15, 2020
dd0e12c
TEL-13057 - Supporting new Number format for Ivory Coast
rajpan Jan 27, 2021
52bac83
Quarterly update
rajpan Jul 13, 2021
eb660c6
New Colombia format
rajpan Sep 7, 2021
d71a4fb
Fixing the Unit Tests for Region Dialpadistan
rajpan Sep 14, 2021
75736c1
fix for https://dialpad.atlassian.net/browse/DP-60739
hassan-dialpad Nov 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- 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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down
8 changes: 8 additions & 0 deletions python/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ This file does not generally include descriptions of patch releases (vX.Y.Z
changes. (Metadata updates are best checked
[upstream](https://github.com/google/libphonenumber/blob/master/release_notes.txt).)

What's new in 8.13.0
--------------------

Merge to [upstream commit
185004cabd1bb4d3](https://github.com/google/libphonenumber/commit/185004cabd1bb4d3). Upstream has
removed the `leading_zero_possible` field from the `PhoneMetadata` type as part of this version;
however, this change is *not* mirrored in the Python code due to back-compatibility concerns.

What's new in 8.12.40
---------------------

Expand Down
75 changes: 75 additions & 0 deletions python/dialpad_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import phonenumbers

# Fixed by Phonenumbers Cases
valid_strings = ['+442083661177',
'+658003211137',
'+20573925008',
'+2057392500',
'+20225777444',
'+84384813220',
'+84357659677',
'+56232512653', # https://switchcomm.atlassian.net/browse/TEL-9285
'+525547808256',
'+13677395285',
'+16892226575',
'+18404440531',
'+48477314848',
'+6569786318',
'+6560115374', # https://switchcomm.atlassian.net/browse/TEL-14616
'+576015088865', # https://switchcomm.atlassian.net/browse/TEL-14616
'+16562013774', # https://dialpad.atlassian.net/browse/DP-60739
]

print '######### - VALID BY LIBRARY - ################'
for l in valid_strings:
x = phonenumbers.parse(l, None)
print '%15s' % l, '%10s' % phonenumbers.is_valid_number(x), '%25s' % x

# To be fixed by Dialpad Changes
dialpad_cases = ['+6278033212174', # https://switchcomm.atlassian.net/browse/DP-13742
'+63283168971', # Philipines
'+8031000000141', # Dialpadistan
'+2250757715034', # Ivory Coast - New Format
'+2252721214601', # Ivory Coast - New Format
]

print '######### - VALID BY DIALPAD - ################'
for l in dialpad_cases:
try:
x = phonenumbers.parse(l, None)
print '%15s' % l, '%10s' % phonenumbers.is_valid_number(x), '%25s' % x
except Exception as e:
print '%15s' % l, '%25s' % e

# Invalid Strings
invalid_strings = ['+4916190899790', # https://switchcomm.atlassian.net/browse/TEL-8824 Not Fixed
'+2022577744',
'+205739250',
]

print '######### - INVALID NUMBERS - ################'
for l in invalid_strings:
x = phonenumbers.parse(l, None)
print '%15s' % l, '%10s' % phonenumbers.is_valid_number(x), '%25s' % x

# National Format match
national_format_match = {'+525547808256': '55 4780 8256'}

print '######### - NUMBER FORMAT VALIDITY - ################'
for l in national_format_match:
x = phonenumbers.parse(l, None)
y = phonenumbers.format_number(x, phonenumbers.PhoneNumberFormat.NATIONAL)
if national_format_match[l] == y:
status = 'Success'
else:
status = 'Failed'
print (l), '-> %10s : %s' % (y, status)

# Number validity check
number_validity_check = {'1932621160': 'BR'}
print '######### - REGION NUMBER VALIDITY - ###############'
for l in number_validity_check:
region = number_validity_check[l]
x = phonenumbers.parse(l, region)
print '%15s' % l, '%10s -> Region : %5s' % (phonenumbers.is_valid_number(x), region)

2 changes: 1 addition & 1 deletion python/phonenumbers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@

# Version number is taken from the upstream libphonenumber version
# together with an indication of the version of the Python-specific code.
__version__ = "8.12.43"
__version__ = "8.13.0"

__all__ = ['PhoneNumber', 'CountryCodeSource', 'FrozenPhoneNumber',
'REGION_CODE_FOR_NON_GEO_ENTITY', 'NumberFormat', 'PhoneNumberDesc', 'PhoneMetadata',
Expand Down
Loading