Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fedora-python/python-ethtool
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.15
Choose a base ref
...
head repository: fedora-python/python-ethtool
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 5 commits
  • 2 files changed
  • 3 contributors

Commits on Nov 2, 2021

  1. Copy the full SHA
    a99b363 View commit details
  2. Copy the full SHA
    2c87615 View commit details

Commits on Jul 23, 2024

  1. Copy the full SHA
    f82dd76 View commit details

Commits on Aug 28, 2024

  1. Copy the full SHA
    b10c2a2 View commit details

Commits on Sep 3, 2024

  1. Merge pull request #60 from dotlambda/python312

    Make tests compatible with Python 3.12
    hroncok authored Sep 3, 2024
    Copy the full SHA
    dccdf65 View commit details
Showing with 18 additions and 2 deletions.
  1. +1 −1 README.rst
  2. +17 −1 tests/test_scripts.py
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ interfaces, driver, and hardware settings.
Python SIG. We ported it to Python 3 and only maintain it for the current
tools to keep working. **No new development is happening. This is a
deprecated package.** If you are considering to start using this, please
don't. We recommend `netifaces <https://pypi.org/project/netifaces/>`_ instead.
don't. We recommend `netifaces <https://pypi.org/project/netifaces/>`_ instead. Another alternative is `ethtool parsers <https://insights-core.readthedocs.io/en/latest/shared_parsers_catalog/ethtool.html>`_ from `insights-core <https://pypi.org/project/insights-core/>`_.

Installation
------------
18 changes: 17 additions & 1 deletion tests/test_scripts.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,23 @@
import sys
import os
from io import TextIOWrapper, BytesIO
from imp import load_source

try:
from imp import load_source
except ImportError:
import importlib.machinery
import importlib.util

# from https://docs.python.org/3.12/whatsnew/3.12.html#imp
def load_source(modname, filename):
loader = importlib.machinery.SourceFileLoader(modname, filename)
spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
module = importlib.util.module_from_spec(spec)
# The module is always executed and not cached in sys.modules.
# Uncomment the following line to cache the module.
# sys.modules[module.__name__] = module
loader.exec_module(module)
return module

pifc = load_source('pifc', 'scripts/pifconfig')
peth = load_source('peth', 'scripts/pethtool')