Eliminate uses of deprecated abstractproperty() decorator.

Its docstring with the deprecation notice polluted the documentation.
This commit is contained in:
Catherine 2023-07-24 12:37:21 +00:00
parent 7f00f4b99d
commit d491288e32
7 changed files with 29 additions and 29 deletions

View file

@ -1,6 +1,6 @@
from collections import OrderedDict from collections import OrderedDict
from collections.abc import Iterable from collections.abc import Iterable
from abc import ABCMeta, abstractmethod, abstractproperty from abc import ABCMeta, abstractmethod
import os import os
import textwrap import textwrap
import re import re
@ -20,11 +20,11 @@ __all__ = ["Platform", "TemplatedPlatform"]
class Platform(ResourceManager, metaclass=ABCMeta): class Platform(ResourceManager, metaclass=ABCMeta):
resources = abstractproperty() resources = property(abstractmethod(lambda: None))
connectors = abstractproperty() connectors = property(abstractmethod(lambda: None))
default_clk = None default_clk = None
default_rst = None default_rst = None
required_tools = abstractproperty() required_tools = property(abstractmethod(lambda: None))
def __init__(self): def __init__(self):
super().__init__(self.resources, self.connectors) super().__init__(self.resources, self.connectors)
@ -271,9 +271,9 @@ class Platform(ResourceManager, metaclass=ABCMeta):
class TemplatedPlatform(Platform): class TemplatedPlatform(Platform):
toolchain = abstractproperty() toolchain = property(abstractmethod(lambda: None))
file_templates = abstractproperty() file_templates = property(abstractmethod(lambda: None))
command_templates = abstractproperty() command_templates = property(abstractmethod(lambda: None))
build_script_templates = { build_script_templates = {
"build_{{name}}.sh": """ "build_{{name}}.sh": """

View file

@ -1,4 +1,4 @@
from abc import abstractproperty from abc import abstractmethod
from ..hdl import * from ..hdl import *
from ..build import * from ..build import *
@ -55,9 +55,9 @@ class IntelPlatform(TemplatedPlatform):
toolchain = None # selected when creating platform toolchain = None # selected when creating platform
device = abstractproperty() device = property(abstractmethod(lambda: None))
package = abstractproperty() package = property(abstractmethod(lambda: None))
speed = abstractproperty() speed = property(abstractmethod(lambda: None))
suffix = "" suffix = ""
# Quartus templates # Quartus templates

View file

@ -1,4 +1,4 @@
from abc import abstractproperty from abc import abstractmethod
from ..hdl import * from ..hdl import *
from ..build import * from ..build import *
@ -66,9 +66,9 @@ class LatticeECP5Platform(TemplatedPlatform):
toolchain = None # selected when creating platform toolchain = None # selected when creating platform
device = abstractproperty() device = property(abstractmethod(lambda: None))
package = abstractproperty() package = property(abstractmethod(lambda: None))
speed = abstractproperty() speed = property(abstractmethod(lambda: None))
grade = "C" # [C]ommercial, [I]ndustrial grade = "C" # [C]ommercial, [I]ndustrial
# Trellis templates # Trellis templates

View file

@ -1,4 +1,4 @@
from abc import abstractproperty from abc import abstractmethod
from ..hdl import * from ..hdl import *
from ..lib.cdc import ResetSynchronizer from ..lib.cdc import ResetSynchronizer
@ -68,8 +68,8 @@ class LatticeICE40Platform(TemplatedPlatform):
toolchain = None # selected when creating platform toolchain = None # selected when creating platform
device = abstractproperty() device = property(abstractmethod(lambda: None))
package = abstractproperty() package = property(abstractmethod(lambda: None))
# IceStorm templates # IceStorm templates

View file

@ -1,4 +1,4 @@
from abc import abstractproperty from abc import abstractmethod
from ..hdl import * from ..hdl import *
from ..build import * from ..build import *
@ -40,9 +40,9 @@ class LatticeMachXO2Or3LPlatform(TemplatedPlatform):
toolchain = "Diamond" toolchain = "Diamond"
device = abstractproperty() device = property(abstractmethod(lambda: None))
package = abstractproperty() package = property(abstractmethod(lambda: None))
speed = abstractproperty() speed = property(abstractmethod(lambda: None))
grade = "C" # [C]ommercial, [I]ndustrial grade = "C" # [C]ommercial, [I]ndustrial
required_tools = [ required_tools = [

View file

@ -1,4 +1,4 @@
from abc import abstractproperty from abc import abstractmethod
from ..hdl import * from ..hdl import *
from ..lib.cdc import ResetSynchronizer from ..lib.cdc import ResetSynchronizer
@ -27,8 +27,8 @@ class QuicklogicPlatform(TemplatedPlatform):
* ``add_constraints``: inserts commands in XDC file. * ``add_constraints``: inserts commands in XDC file.
""" """
device = abstractproperty() device = property(abstractmethod(lambda: None))
package = abstractproperty() package = property(abstractmethod(lambda: None))
# Since the QuickLogic version of SymbiFlow toolchain is not upstreamed yet # Since the QuickLogic version of SymbiFlow toolchain is not upstreamed yet
# we should distinguish the QuickLogic version from mainline one. # we should distinguish the QuickLogic version from mainline one.

View file

@ -1,5 +1,5 @@
import re import re
from abc import abstractproperty from abc import abstractmethod
from ..hdl import * from ..hdl import *
from ..lib.cdc import ResetSynchronizer from ..lib.cdc import ResetSynchronizer
@ -118,9 +118,9 @@ class XilinxPlatform(TemplatedPlatform):
toolchain = None # selected when creating platform toolchain = None # selected when creating platform
device = abstractproperty() device = property(abstractmethod(lambda: None))
package = abstractproperty() package = property(abstractmethod(lambda: None))
speed = abstractproperty() speed = property(abstractmethod(lambda: None))
@property @property
def _part(self): def _part(self):