Skip to content

Commit

Permalink
Drop support for py310 for newer features
Browse files Browse the repository at this point in the history
  • Loading branch information
fkantelberg committed Nov 25, 2023
1 parent f283db5 commit ae1a674
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11']
python-version: ['3.11']
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ include_package_data = True
package_dir =
= src
packages = find:
python_requires = >=3.10
python_requires = >=3.11
install_requires =
aiohttp-jinja2
aiosmtpd
Expand Down
15 changes: 0 additions & 15 deletions src/mail_devel/__main__.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
import asyncio
import logging
import signal
import sys
from argparse import Namespace
from contextlib import suppress

from pymap.parsing.specials.searchkey import SearchKey

from . import VERSION, utils
from .service import Service

_logger = logging.getLogger(__name__)


# Manual patch for https://github.com/icgood/pymap/pull/138 for py3.10
if sys.version_info[:2] == (3, 10):
original_func = SearchKey.__init__

def patched_searchkey(self, key, filter_=None, inverse=False):
if isinstance(filter_, list):
filter_ = frozenset(filter_)
return original_func(self, key, filter_, inverse)

SearchKey.__init__ = patched_searchkey


async def sleep_forever() -> None:
with suppress(asyncio.CancelledError):
while True:
Expand Down

0 comments on commit ae1a674

Please sign in to comment.