Skip to content

Commit

Permalink
update user agent (#242)
Browse files Browse the repository at this point in the history
* update user agent

* update test case
  • Loading branch information
2pd committed Jul 3, 2023
1 parent 6fe9480 commit 08bd1e8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 3.1.1 - 2023-07-03

### Changed
- Change `User-Agent`

## 3.1.0 - 2023-06-01

### Added
Expand Down
2 changes: 1 addition & 1 deletion binance/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.1.0"
__version__ = "3.1.1"
2 changes: 1 addition & 1 deletion binance/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(
self.session.headers.update(
{
"Content-Type": "application/json;charset=utf-8",
"User-Agent": "binance-connector/" + __version__,
"User-Agent": "binance-connector-python/" + __version__,
"X-MBX-APIKEY": api_key,
}
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_API_initial():
"application/json;charset=utf-8"
)
client.session.headers.should.have.key("User-Agent").which.should.equal(
"binance-connector/" + __version__
"binance-connector-python/" + __version__
)
client.session.headers.should.have.key("X-MBX-APIKEY").which.should.be.none
client._logger.should.be(logging.getLogger("binance.api"))
Expand Down

0 comments on commit 08bd1e8

Please sign in to comment.