2
2
Fork
You've already forked overpass-api-python-wrapper
2

overpass.API deprecation message is inaccurate #203

Closed
opened 2026年05月31日 21:30:45 +02:00 by joachim-n · 4 comments

I did this (from the README):

api = overpass.API(user_agent="...")

and got this message:

/Users/joachim/Sites/hist/test-overpass.py:2: DeprecationWarning: overpass.API is deprecated and will be removed in overpass 1.0; use overpass.OverpassClient in 1.0 instead.

So, as indicated, I tried this:

api = overpass.OverpassClient(user_agent="...")

and it crashes with:

AttributeError: module 'overpass' has no attribute 'OverpassClient'

I did this (from the README): ``` api = overpass.API(user_agent="...") ``` and got this message: > /Users/joachim/Sites/hist/test-overpass.py:2: DeprecationWarning: overpass.API is deprecated and will be removed in overpass 1.0; use overpass.OverpassClient in 1.0 instead. So, as indicated, I tried this: ``` api = overpass.OverpassClient(user_agent="...") ``` and it crashes with: > AttributeError: module 'overpass' has no attribute 'OverpassClient'

I've tried the code from the 1.0 design doc instead:

from overpass import OverpassClient

and that crashes too:

ImportError: cannot import name 'OverpassClient' from 'overpass' (/Users/joachim/Sites/hist/venv/lib/python3.14/site-packages/overpass/init.py)

I've tried the code from the 1.0 design doc instead: ``` from overpass import OverpassClient ``` and that crashes too: > ImportError: cannot import name 'OverpassClient' from 'overpass' (/Users/joachim/Sites/hist/venv/lib/python3.14/site-packages/overpass/__init__.py)

Yes, that’s confusing. The deprecation warning is merely that: a warning. You should continue to use the current method.

Did the code you tried in your first message work despite the warning?

use overpass.OverpassClient in 1.0 instead. should not be there or should be worded differently at least.

Apologies for that confusion.

Yes, that’s confusing. The deprecation warning is merely that: a warning. You should continue to use the current method. Did the code you tried in your first message work despite the warning? `use overpass.OverpassClient in 1.0 instead.` should not be there or should be worded differently at least. Apologies for that confusion.

The deprecation warning is merely that: a warning. You should continue to use the current method

I take a deprecation warning as meaning 'You should switch to the new method as soon as possible'. Since I'm writing a new project, it made sense to switch immediately.

The old version of the code works, yes.

> The deprecation warning is merely that: a warning. You should continue to use the current method I take a deprecation warning as meaning 'You should switch to the new method as soon as possible'. Since I'm writing a new project, it made sense to switch immediately. The old version of the code works, yes.
mvexel changed reference from (削除) 0.8.x (削除ここまで) to 0.8.x 2026年06月04日 20:24:51 +02:00

@joachim-n I fixed this up on the 0.8.x branch. If you don't want to wait for a release, you can grab the latest directly from there. Let me know if this works for you. Thanks for reporting!

@joachim-n I fixed this up on the 0.8.x branch. If you don't want to wait for a release, you can grab the latest directly from there. Let me know if this works for you. Thanks for reporting!
mvexel changed reference from (削除) 0.8.x (削除ここまで) to 0.8.x 2026年06月04日 20:25:59 +02:00
Sign in to join this conversation.
0.8.x
main
tutorial/d1-httpx-nvim
0.8.x
dev-contributor-tooling
1.0-dev
dev
feature/api-modernization
maintenance/base-0.8
maintenance/geojson-fixtures
archive/async-models
maintenance/endpoint-guard
maintenance/live-query-tool
maintenance/modernize-plan
archive/dev-prebaseline-20260502
archive/modernize
archive/chore-tests
chore/poetry
archive/readme
v0.8.2
v0.8.1
v0.8.0
v0.7.2
0.7.1
0.7.0
0.6.1
0.6.0
0.5.7
0.5.6
0.5.5
0.4.0
0.1.0
0.0.2
0.0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mvexel/overpass-api-python-wrapper#203
Reference in a new issue
mvexel/overpass-api-python-wrapper
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?