Skip to content

Commit

Permalink
Merge pull request #114 from python-discord/8.0.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLovering authored Jul 27, 2022
2 parents 20ed26e + fb9b5fa commit db0ff48
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 1,104 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: HassanAbouelela/actions/setup-python@setup-python_v1.1.0
with:
dev: true
python_version: 3.9
python_version: "3.10"
install_args: "--extras async-rediscache"

# Undeclared dependency for `releases`... whoops
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
uses: HassanAbouelela/actions/setup-python@setup-python_v1.1.0
with:
dev: true
python_version: 3.9
python_version: "3.10"
install_args: "--extras async-rediscache"

# Undeclared dependency for `releases`... whoops
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
# Set dev=true to run pre-commit which is a dev dependency
dev: true
python_version: 3.9
python_version: "3.10"
install_args: "--extras async-rediscache"

# We will not run `flake8` here, as we will use a separate flake8
Expand Down
7 changes: 2 additions & 5 deletions botcore/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ async def setup_hook(self) -> None:
)
self.http.connector = self._connector

if getattr(self, "redis_session", False) and self.redis_session.closed:
if getattr(self, "redis_session", False) and not self.redis_session.valid:
# If the RedisSession was somehow closed, we try to reconnect it
# here. Normally, this shouldn't happen.
await self.redis_session.connect()
await self.redis_session.connect(ping=True)

# Create dummy stats client first, in case `statsd_url` is unreachable or None
self.stats = AsyncStatsClient(loop, "127.0.0.1")
Expand Down Expand Up @@ -284,8 +284,5 @@ async def close(self) -> None:
if getattr(self.stats, "_transport", False):
self.stats._transport.close()

if getattr(self, "redis_session", False):
await self.redis_session.close()

if self._statsd_timerhandle:
self._statsd_timerhandle.cancel()
2 changes: 1 addition & 1 deletion dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim
FROM python:3.10-slim

# Set pip to have no saved cache
ENV PIP_NO_CACHE_DIR=false \
Expand Down
5 changes: 4 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
Changelog
=========

- :bug:`107` Declare aiodns as a project dependency.
- :release:`8.0.0 <27th July 2022>`
- :breaking:`110` Bump async-rediscache to v1.0.0-rc2
- :support:`108` Bump Python version to 3.10.*
- :bug:`107 major` Declare aiodns as a project dependency.
- :support:`107` Add a sample project with boilerplate and documentation explaining how to develop for bot-core.


Expand Down
Loading

0 comments on commit db0ff48

Please sign in to comment.