]> git.ipfire.org Git - thirdparty/babel.git/commit
Fixed issue #109: `ImportWarning` warned when `import babel` 177/head
authorPhilip_Tzou <philip.npc@gmail.com>
Sat, 1 Aug 2015 21:03:14 +0000 (14:03 -0700)
committerPhilip_Tzou <philip.npc@gmail.com>
Sat, 1 Aug 2015 21:18:12 +0000 (14:18 -0700)
commit7d387f95f4f41ed646bcb2b4fa39dae4a601b6ce
treea19811b32983968fd0dcfb74f34e087bfabc8780
parent4c00689ef53beb516f93806a882ea1f264ab9808
Fixed issue #109: `ImportWarning` warned when `import babel`

`localedata.py` uses the same name with folder `localedata/`, which
Python will try to load `localdata/__init__.py` and warn `ImportWarning`
if the file not found.

If try to filter the `ImportWarning` as an error like this:

```python
import warnings
warnings.filterwarnings('error', category=ImportWarning)
import babel
```

An `ImportWarning` exception will be raised.
babel/localedata/.gitignore
babel/localedata/__init__.py [moved from babel/localedata.py with 94% similarity]