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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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