Skip to content

Commit

Permalink
Removed obsolete compatibility statements
Browse files Browse the repository at this point in the history
  • Loading branch information
jooste committed Dec 8, 2023
1 parent fc955c4 commit ec90c24
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 36 deletions.
1 change: 0 additions & 1 deletion BlueSky_pygame.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
""" Pygame BlueSky start script """
from __future__ import print_function
import pygame as pg
import bluesky as bs
from bluesky.ui.pygame import splash
Expand Down
6 changes: 1 addition & 5 deletions bluesky/core/trafficarrays.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
""" Classes that derive from TrafficArrays (like Traffic) get automated create,
delete, and reset functionality for all registered child arrays."""
# -*- coding: utf-8 -*-
try:
from collections.abc import Collection
except ImportError:
# In python <3.3 collections.abc doesn't exist
from collections import Collection
from collections.abc import Collection
import numpy as np

defaults = {"float": 0.0, "int": 0, "uint":0, "bool": False, "S": "", "str": ""}
Expand Down
6 changes: 1 addition & 5 deletions bluesky/core/varexplorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
'''
from numbers import Number
from collections import OrderedDict
try:
from collections.abc import Collection
except ImportError:
# In python <3.3 collections.abc doesn't exist
from collections import Collection
from collections.abc import Collection
import re
import numpy as np
import bluesky as bs
Expand Down
1 change: 0 additions & 1 deletion bluesky/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
NOTE - The test suite is written in Python3 only.
It tests BlueSky running in either Python2 or 3.
"""
from __future__ import print_function
import inspect
import time
from bluesky.tools.network import as_bytes
Expand Down
1 change: 0 additions & 1 deletion bluesky/test/tcp/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
NOTE - The test suite is written in Python3 only.
It tests BlueSky running in either Python2 or 3.
"""
from __future__ import print_function
import socket
import os
import subprocess
Expand Down
1 change: 0 additions & 1 deletion bluesky/test/traffic/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
NOTE - The test suite is written in Python3 only.
"""
from __future__ import print_function
import pytest
import bluesky

Expand Down
6 changes: 1 addition & 5 deletions bluesky/traffic/autopilot.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
""" Autopilot Implementation."""
from math import sqrt, atan
import numpy as np
try:
from collections.abc import Collection
except ImportError:
# In python <3.3 collections.abc doesn't exist
from collections import Collection
from collections.abc import Collection
import bluesky as bs
from bluesky import stack
from bluesky.tools import geo
Expand Down
7 changes: 1 addition & 6 deletions bluesky/traffic/traffic.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
""" BlueSky traffic implementation."""
from __future__ import print_function
try:
from collections.abc import Collection
except ImportError:
# In python <3.3 collections.abc doesn't exist
from collections import Collection
from collections.abc import Collection
from math import *
from random import randint
import numpy as np
Expand Down
6 changes: 1 addition & 5 deletions bluesky/ui/qtgl/glhelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@
opengl_versions = ((4, 1), (2, 1), (2, 0))


try:
from collections.abc import Collection, MutableMapping
except ImportError:
# In python <3.3 collections.abc doesn't exist
from collections import Collection, MutableMapping
from collections.abc import Collection, MutableMapping
import ctypes
import numpy as np

Expand Down
6 changes: 1 addition & 5 deletions bluesky/ui/qtgl/infowindow.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
try:
from collections.abc import Collection
except ImportError:
# In python <3.3 collections.abc doesn't exist
from collections import Collection
from collections.abc import Collection
import numpy as np
import matplotlib
matplotlib.rcParams['font.size'] = 5
Expand Down
1 change: 0 additions & 1 deletion check.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python
from __future__ import print_function
import traceback

import PyQt6
Expand Down

0 comments on commit ec90c24

Please sign in to comment.