Skip to content

Commit

Permalink
Fixed crash on early Python 3.11 releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout committed Oct 27, 2023
1 parent 316cad5 commit 090bc40
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].

## [Unreleased]

### Fixed

- cli: Fixed crash on early Python 3.11 releases.

## [7.1.0] - 2023-10-27

### Added
Expand Down
6 changes: 5 additions & 1 deletion src/dipdup/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ async def cli(ctx: click.Context, config: list[str], env_file: list[str]) -> Non
return

# NOTE: https://github.com/python/cpython/issues/95778
sys.set_int_max_str_digits(0)
# NOTE: Method is not available in early Python 3.11
try:
sys.set_int_max_str_digits(0)
except AttributeError:
_logger.warning("You're running an outdated Python 3.11 release; consider upgrading")

from dotenv import load_dotenv

Expand Down

0 comments on commit 090bc40

Please sign in to comment.