Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop leftover Python2 compatibility code #91

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/hupper/ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from . import winapi

class ProcessGroup(object):
class ProcessGroup:
def __init__(self):
self.h_job = winapi.CreateJobObject(None, None)

Expand Down Expand Up @@ -65,7 +65,7 @@ def open_handle(handle, mode):
import fcntl
import termios

class ProcessGroup(object):
class ProcessGroup:
def add_child(self, pid):
# nothing to do on *nix
pass
Expand Down Expand Up @@ -104,7 +104,7 @@ def Pipe():
return c1, c2


class Connection(object):
class Connection:
"""
A connection to a bi-directional pipe.

Expand Down
1 change: 0 additions & 1 deletion src/hupper/logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import sys

from .interfaces import ILogger
Expand Down
4 changes: 2 additions & 2 deletions src/hupper/reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from . import winapi


class FileMonitorProxy(object):
class FileMonitorProxy:
"""
Wrap an :class:`hupper.interfaces.IFileMonitor` into an object that
exposes a thread-safe interface back to the reloader to detect
Expand Down Expand Up @@ -100,7 +100,7 @@ class WorkerResult:
WAIT = 'wait'


class Reloader(object):
class Reloader:
"""
A wrapper class around a file monitor which will handle changes by
restarting a new worker process.
Expand Down
2 changes: 1 addition & 1 deletion src/hupper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
WIN = sys.platform == 'win32'


class Sentinel(object):
class Sentinel:
def __init__(self, name):
self.name = name

Expand Down
1 change: 0 additions & 1 deletion src/hupper/watchdog.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# check ``hupper.utils.is_watchdog_supported`` before using this module
from __future__ import absolute_import
import os.path
import threading
from watchdog.events import FileSystemEventHandler
Expand Down
2 changes: 1 addition & 1 deletion src/hupper/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def iter_module_paths(modules=None):
yield abs_filename


class Worker(object):
class Worker:
"""A helper object for managing a worker process lifecycle."""

def __init__(self, spec, args=None, kwargs=None):
Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import pytest
import sys

Expand Down
8 changes: 4 additions & 4 deletions tests/test_reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def make_proxy(monitor_factory, callback, logger):


def test_proxy_proxies(logger):
class DummyMonitor(object):
class DummyMonitor:
started = stopped = joined = False

def __call__(self, cb, **kw):
Expand Down Expand Up @@ -47,7 +47,7 @@ def join(self):


def test_proxy_expands_paths(tmpdir, logger):
class DummyMonitor(object):
class DummyMonitor:
def __call__(self, cb, **kw):
self.cb = cb
self.paths = []
Expand All @@ -74,7 +74,7 @@ def add_path(self, path):


def test_proxy_tracks_changes(logger):
class DummyMonitor(object):
class DummyMonitor:
def __call__(self, cb, **kw):
self.cb = cb
return self
Expand All @@ -100,7 +100,7 @@ def __call__(self, cb, **kw):


def test_ignore_files():
class DummyMonitor(object):
class DummyMonitor:
paths = set()

def add_path(self, path):
Expand Down
Loading