decorators: fix stacklevel, export in std

This commit is contained in:
Robert Jordens 2015-04-05 03:49:06 -06:00 committed by Sebastien Bourdeauducq
parent f26ad97624
commit 8798ee8d73
2 changed files with 4 additions and 2 deletions

View File

@ -48,11 +48,11 @@ class ModuleTransformer:
@classmethod
def adhoc(cls, i, *args, **kwargs):
warnings.warn("deprecated, use the plain transformer", DeprecationWarning)
warnings.warn("deprecated, use the plain transformer", DeprecationWarning, 2)
return cls(*args, **kwargs)(i)
def DecorateModule(transformer, *args, **kwargs):
warnings.warn("deprecated, use the plain transformer", DeprecationWarning)
warnings.warn("deprecated, use the plain transformer", DeprecationWarning, 2)
return transformer.__self__(*args, **kwargs)
class ControlInserter(ModuleTransformer):

View File

@ -3,3 +3,5 @@ from migen.fhdl.module import Module, FinalizeError
from migen.fhdl.specials import TSTriple, Instance, Memory
from migen.fhdl.bitcontainer import log2_int, bits_for, flen, fiter, fslice, freversed
from migen.fhdl.decorators import DecorateModule, InsertCE, InsertReset, RenameClockDomains
from migen.fhdl.decorators import (CEInserter, ResetInserter,
ClockDomainsRenamer, ModuleTransformer)