Skip to content

Commit

Permalink
Drop support of Python3.6 (#89)
Browse files Browse the repository at this point in the history
Python3.6 has reached the end of its lifetime more than a year ago,
hence Grammarinator also stops supporting it.
Since contextlib supports nullcontext as default from python3.7,
Grammarinator starts using it instead of defining it on its own
version.
  • Loading branch information
renatahodovan committed Mar 16, 2023
1 parent 49f461d commit a4fff1d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11', 'pypy-3.7']
exclude:
- python-version: 3.6
os: ubuntu-latest
include:
- python-version: 3.6
os: ubuntu-20.04
python-version: [3.7, 3.8, 3.9, '3.10', '3.11', 'pypy-3.7']
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.autocrlf input
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The `trophy page`_ of the found issues is available from the wiki.
Requirements
============

* Python_ >= 3.6
* Python_ >= 3.7
* Java_ SE >= 7 JRE or JDK (the latter is optional)

.. _Python: https://www.python.org
Expand Down
7 changes: 1 addition & 6 deletions grammarinator/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import random

from argparse import ArgumentParser, ArgumentTypeError, SUPPRESS
from contextlib import contextmanager
from contextlib import nullcontext
from functools import partial
from itertools import count
from math import inf
Expand Down Expand Up @@ -47,11 +47,6 @@ def size(self):
return len(self.obj_list)


@contextmanager
def nullcontext():
yield None


class Generator(object):

def __init__(self, generator, rule, out_format,
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ classifiers =
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Expand All @@ -27,7 +26,7 @@ platform = any
[options]
packages = find:
include_package_data = True
python_requires = >=3.6
python_requires = >=3.7
install_requires =
antlerinator>=1!3.0.0
antlr4-python3-runtime==4.9.2
Expand Down

0 comments on commit a4fff1d

Please sign in to comment.