Comments (3)
Odd, it works for me:
Python 3.11.7 (main, Dec 8 2023, 14:22:46) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import phonenumbers
>>> parsed_number = phonenumbers.parse("+61461271797")
>>> phonenumbers.is_valid_number(parsed_number)
True
>>> phonenumbers.format_number(parsed_number, phonenumbers.PhoneNumberFormat.E164)
'+61461271797'
>>> phonenumbers.__version__
'8.13.32'
from python-phonenumbers.
Same result with an old Python 2 on a different OS (below). Is there any chance your library install has local modifications somehow?
Python 2.7.18 (default, May 10 2022, 12:54:30)
[GCC Apple LLVM 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import phonenumbers
>>> parsed_number = phonenumbers.parse("+61461271797")
>>> phonenumbers.is_valid_number(parsed_number)
True
>>> phonenumbers.format_number(parsed_number, phonenumbers.PhoneNumberFormat.E164)
u'+61461271797'
>>> phonenumbers.__version__
'8.13.32'
from python-phonenumbers.
@daviddrysdale Thanks for the quick replies. I was also able to reproduce your steps locally and got the expected validation boolean back. That made me go back to the developer who reported the issue to me and we figured out that the tests he ran were in an old container running an older version of the package.
It's all sorted, sorry for the waste of time.
from python-phonenumbers.
Related Issues (20)
- Dutch public services numbers: eg. 140418 HOT 2
- Automatically track upstream version HOT 7
- Bus factor of 1 HOT 6
- Error parsing phone numbers with double leading 1's HOT 3
- Issue with Kuwait number HOT 1
- is_valid_number broken in latest version (8.13.19) HOT 1
- Embracing Cython 3.0 pure python mode to speed-up the library HOT 2
- 8.13.23: pytest cannot find any units HOT 1
- IE164 contains trailing zero (should be removed) HOT 3
- Carrier names for US numbers returning null HOT 1
- Inconsistent parsing for Gabon phone numbers HOT 1
- Region FR national_number_pattern requires an update HOT 2
- country_code: 353 phone: ks.123456789 is getting parsed without any invalid error. is this expected? HOT 1
- PhoneInfoga
- Dramatic import performance regression in Python 3.12+ when debugging HOT 3
- Phonenumbers don't work with italian numbers HOT 3
- can't get italy phone numbers
- Need an i18n enhancement for error text HOT 1
- phonenumber.parse fails even though number is valid - 17748019715 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-phonenumbers.