Skip to content

Commit

Permalink
update to Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tz committed Nov 11, 2024
1 parent 4c43b00 commit e624d9b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 24 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: false
# using Python 3.8 to support running across multiple operating systems including Windows 7
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.8'
python-version: '3.10'
- name: Install floss [build]
run: |
pip install -r requirements.txt
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
steps:
- name: Checkout FLOSS
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.8'
python-version: '3.10'
- name: Install dependencies
run: |
pip install -r requirements.txt
Expand All @@ -41,13 +41,11 @@ jobs:
os: [ubuntu-20.04, windows-2019, macos-13]
# across all operating systems
# version numbers are strings, not floats
python-version: ['3.8', '3.11']
python-version: ['3.10', '3.11']
include:
# on Ubuntu run these as well
- os: ubuntu-20.04
python-version: '3.9'
- os: ubuntu-20.04
python-version: '3.10'
python-version: '3.12'
steps:
- name: Checkout FLOSS with submodule
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down
1 change: 0 additions & 1 deletion floss/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ def make_parser(argv):
epilog=epilog_advanced if show_all_options else epilog,
formatter_class=argparse.RawDescriptionHelpFormatter,
)
parser.register("action", "extend", floss.utils.ExtendAction)
parser.add_argument("-H", action="help", help="show advanced options and exit")
parser.add_argument(
"-n",
Expand Down
10 changes: 0 additions & 10 deletions floss/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@
logger = floss.logging_.getLogger(__name__)


class ExtendAction(argparse.Action):
# stores a list, and extends each argument value to the list
# Since Python 3.8 argparse supports this
# TODO: remove this code when only supporting Python 3.8+
def __call__(self, parser, namespace, values, option_string=None):
items = getattr(namespace, self.dest, None) or []
items.extend(values)
setattr(namespace, self.dest, items)


class InstallContextMenu(argparse.Action):
def __init__(self, option_strings, dest, nargs=None, **kwargs):
super(InstallContextMenu, self).__init__(option_strings, dest, nargs=0, **kwargs)
Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ authors = [
{name = "Willi Ballenthin", email = "william.ballenthin@mandiant.com"},
{name = "Moritz Raabe", email = "moritz.raabe@mandiant.com"},
]
requires-python=">=3.8"
requires-python=">=3.10"
keywords = ["floss", "malware", "analysis", "obfuscation", "strings", "FLARE"]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down Expand Up @@ -89,9 +89,7 @@ dependencies = [
# typically due to dropping support for python releases
# we still support.

# TODO(williballenthin): networkx 3.2 doesn't support python 3.8 while capa does.
# https://github.com/mandiant/capa/issues/1966
"networkx>=3,<3.2",
"networkx>=3",
]
dynamic = ["version", "readme"]

Expand Down

0 comments on commit e624d9b

Please sign in to comment.