Skip to content

Commit 86d2948

Browse files
authored
fix(init): prevent module from configuring the logger
1 parent 9dbcaea commit 86d2948

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

CHANGELOG.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Changelog
22

3-
## Unreleased
3+
## [Unreleased](https://github.com/GIScience/ohsome-py/compare/v0.3.3..master)
44

5-
## 0.3.3
5+
### Fixed
6+
7+
- the module configuring the root logger on import causing users to be forced to overwrite the configuration.
8+
9+
## [0.3.3](https://github.com/GIScience/ohsome-py/releases/tag/v0.3.3)
610

711
### Fixed
812

@@ -17,7 +21,7 @@
1721

1822
- init variable `data` to `OhsomeResponse`
1923

20-
## 0.3.2
24+
## [0.3.2](https://github.com/GIScience/ohsome-py/releases/tag/v0.3.2)
2125

2226
### Fixed
2327

@@ -28,7 +32,7 @@
2832
- if tags are supplied for explosion in `response.as_dataframe`, the respective column will always be present in the resulting Geodataframe, even if the tags were not part of the result. In that case the column will be all-None ([#149](https://github.com/GIScience/ohsome-py/issues/149)).
2933

3034

31-
## 0.3.1
35+
## [0.3.1](https://github.com/GIScience/ohsome-py/releases/tag/v0.3.1)
3236

3337
### Fixed
3438

@@ -41,7 +45,7 @@
4145
- improved and sped up testing (first steps towards [#139](https://github.com/GIScience/ohsome-py/issues/139))
4246
- move metadata property from singleton to `cached_property`
4347

44-
## 0.3.0
48+
## [0.3.0](https://github.com/GIScience/ohsome-py/releases/tag/v0.3.0)
4549

4650
### Added
4751

@@ -63,7 +67,7 @@
6367
- support for pandas < 2.1
6468
- support for urllib3 < 2.1
6569

66-
## 0.2.0
70+
## [0.2.0](https://github.com/GIScience/ohsome-py/releases/tag/v0.2.0)
6771

6872
### Added
6973

ohsome/__init__.py

+4-7
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33

44
"""Ohsome API client for Python"""
55

6-
from .exceptions import OhsomeException
7-
from .response import OhsomeResponse
8-
from .clients import OhsomeClient
9-
import logging
10-
11-
log_format = "%(asctime)s %(module)8s %(levelname)5s: %(message)s"
12-
logging.basicConfig(level="INFO", format=log_format)
6+
# The order of imports here must remain to prevent circular imports
7+
from .exceptions import OhsomeException # noqa
8+
from .response import OhsomeResponse # noqa
9+
from .clients import OhsomeClient # noqa

ohsome/test/__init__.py

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
"""__description__"""
4-
5-
import logging
6-
7-
log_format = "%(asctime)s %(module)8s %(levelname)5s: %(message)s"
8-
logging.basicConfig(level="DEBUG", format=log_format)

0 commit comments

Comments
 (0)