Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Commit

Permalink
Updated version to 0.2.dev4, fixed HTTP error and fixed test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Luna-Klatzer committed Sep 3, 2021
1 parent a2c2b5e commit 3703e59
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Added
### Changed
### Removed

## [v0.2.dev4] - 2021-09-03

### Added
- Parsers for events `on_message_create` and `on_message_delete`
- New property `room_ids` to `HivenClient`
Expand All @@ -23,6 +29,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Moved `Connection` class initialisation to `HivenClient.connect()` and added
deletion after the HivenClient closed to allow for a full-recreation if
the client reconnects.
- Fixed HTTP `json.JSONDecodeError` on empty responses for success returns `200`
- Moved value configuration of `host`, `api_version`, `heartbeat` and
`close_timeout` to `HivenClient.__init__()`
- Fixed `rooms` and `entities` property in `House`
Expand Down Expand Up @@ -251,7 +258,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- `ping` from the HivenClient (Will be added back later but with better
implementation)

[unreleased]: https://github.com/Para-C/Para-C/compare/0.2.dev3...v0.2.dev
[unreleased]: https://github.com/Para-C/Para-C/compare/0.2.dev4...v0.2.dev

[v0.2.dev4]: https://github.com/Para-C/Para-C/compare/0.2.dev3...0.2.dev4

[v0.2.dev3]: https://github.com/Para-C/Para-C/compare/0.2.dev2...0.2.dev3

Expand Down
2 changes: 1 addition & 1 deletion openhivenpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
__title__ = "openhiven.py"
__author__ = "Luna Klatzer"
__license__ = "MIT"
__version__ = "0.2.dev3"
__version__ = "0.2.dev4"
__copyright__ = "Luna Klatzer"

import logging
Expand Down
3 changes: 1 addition & 2 deletions openhivenpy/gateway/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

import asyncio
import json as json_decoder
import json as json_module
import logging
import sys
import time
Expand Down Expand Up @@ -303,7 +302,7 @@ async def http_request(
_json_data = json_decoder.loads(data)

# empty data
except json_module.JSONDecodeError as e:
except json_decoder.decoder.JSONDecodeError as e:
# Success but no data
if http_resp_code == 200:
logger.debug(
Expand Down
8 changes: 5 additions & 3 deletions pytest/test_client/test_hivenclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,13 @@ async def on_init():
@client.event()
async def on_ready():
print("\non_ready was called!")
await client.parsers.dispatch('message_create', {})
await client.parsers.dispatch(
'presence_update', {}
)

@client.event()
async def on_message_create():
print("Received message")
async def on_presence_update(*args, **kwargs):
print("Received")
await client.close()

client.run(token)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name="openhivenpy",
version="0.2.dev3",
version="0.2.dev4",
author="Luna Klatzer",
author_email="luna.klatzer@gmail.com",
description="The OpenSource Python API Wrapper and Bot-Framework for Hiven",
Expand Down

0 comments on commit 3703e59

Please sign in to comment.