Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/nmigen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9fba5ccb513c
Choose a base ref
...
head repository: m-labs/nmigen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 61e6267dafa4
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Oct 21, 2019

  1. Explicitly restrict prelude imports.

    It turns out that while Python does not import _private identifiers
    when using * imports, it does nevertheless import all submodules.
    
    Avoid polluting the namespace in the prelude by explicitly listing
    all exported identifiers.
    whitequark committed Oct 21, 2019
    Copy the full SHA
    61e6267 View commit details
Showing with 28 additions and 1 deletion.
  1. +14 −0 nmigen/__init__.py
  2. +14 −1 nmigen/hdl/__init__.py
14 changes: 14 additions & 0 deletions nmigen/__init__.py
Original file line number Diff line number Diff line change
@@ -4,4 +4,18 @@
except pkg_resources.DistributionNotFound:
pass


from .hdl import *


__all__ = [
"Shape", "unsigned", "signed",
"Value", "Const", "C", "Mux", "Cat", "Repl", "Array", "Signal", "ClockSignal", "ResetSignal",
"Module",
"ClockDomain",
"Elaboratable", "Fragment", "Instance",
"Memory",
"Record",
"DomainRenamer", "ResetInserter", "EnableInserter",
"CEInserter", # TODO(nmigen-0.2): remove this
]
15 changes: 14 additions & 1 deletion nmigen/hdl/__init__.py
Original file line number Diff line number Diff line change
@@ -6,4 +6,17 @@
from .mem import Memory
from .rec import Record
from .xfrm import DomainRenamer, ResetInserter, EnableInserter, \
CEInserter # deprecated
CEInserter # TODO(nmigen-0.2): remove this


__all__ = [
"Shape", "unsigned", "signed",
"Value", "Const", "C", "Mux", "Cat", "Repl", "Array", "Signal", "ClockSignal", "ResetSignal",
"Module",
"ClockDomain",
"Elaboratable", "Fragment", "Instance",
"Memory",
"Record",
"DomainRenamer", "ResetInserter", "EnableInserter",
"CEInserter", # TODO(nmigen-0.2): remove this
]