Repository: algorand/pyteal

Issue:
The module `pyteal.ast.int` shadows the Python keyword `int`
When importing `pyteal` by `from pyteal import *` (as in the documentation examples), the module `pyteal.ast.int` shadows the Python keyword `int`.

In particular, we have
```
$ python3 -c "from pyteal import *; print(int(5))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: 'module' object is not callable
```
while:
```
$ python3 -c "print(int(5))"
5
```

## Requirements
Stop submodules from being exported, small change. They shouldn't be exported in the first place

## Urgency
Could be a major blocker for some people and it's a simple change that we can just knock out.

Comments:

Patch:
diff --git a/pyteal/__init__.py b/pyteal/__init__.py
index b72a01d..ff1f2fb 100644
--- a/pyteal/__init__.py
+++ b/pyteal/__init__.py
@@ -1,7 +1,19 @@
 from .ast import *
+from .ast import __all__ as ast_all
 from .ir import *
+from .ir import __all__ as ir_all
 from .compiler import compileTeal
 from .types import TealType
 from .errors import TealInternalError, TealTypeError, TealInputError
 from .util import execute
 from .config import MAX_GROUP_SIZE
+
+__all__ = ast_all + ir_all + [
+    "compileTeal",
+    "TealType",
+    "TealInternalError",
+    "TealTypeError",
+    "TealInputError",
+    "execute",
+    "MAX_GROUP_SIZE",
+]
diff --git a/pyteal/ast/__init__.py b/pyteal/ast/__init__.py
index 9f635c9..362d006 100644
--- a/pyteal/ast/__init__.py
+++ b/pyteal/ast/__init__.py
@@ -41,3 +41,76 @@ from .assert_ import Assert
 # misc
 from .scratch import ScratchSlot, ScratchLoad, ScratchStore
 from .maybe import MaybeValue
+
+__all__ = [
+    "Expr",
+    "LeafExpr",
+    "Addr",
+    "Bytes",
+    "Err",
+    "Int",
+    "EnumInt",
+    "Arg",
+    "TxnType",
+    "TxnField",
+    "TxnExpr",
+    "TxnaExpr",
+    "TxnArray",
+    "TxnObject",
+    "Txn",
+    "GtxnExpr",
+    "GtxnaExpr",
+    "TxnGroup",
+    "Gtxn",
+    "Global",
+    "GlobalField",
+    "App",
+    "AppField",
+    "OnComplete",
+    "AssetHolding",
+    "AssetParam",
+    "Array",
+    "Tmpl",
+    "Nonce",
+    "UnaryExpr",
+    "Btoi",
+    "Itob",
+    "Len",
+    "Sha256",
+    "Sha512_256",
+    "Keccak256",
+    "Not",
+    "BitwiseNot",
+    "Pop",
+    "Return",
+    "Balance",
+    "BinaryExpr",
+    "Add",
+    "Minus",
+    "Mul",
+    "Div",
+    "BitwiseAnd",
+    "BitwiseOr",
+    "BitwiseXor",
+    "Mod",
+    "Eq",
+    "Neq",
+    "Lt",
+    "Le",
+    "Gt",
+    "Ge",
+    "Ed25519Verify",
+    "Substring",
+    "NaryExpr",
+    "And",
+    "Or",
+    "Concat",
+    "If",
+    "Cond",
+    "Seq",
+    "Assert",
+    "ScratchSlot",
+    "ScratchLoad",
+    "ScratchStore",
+    "MaybeValue",
+]
diff --git a/pyteal/ir/__init__.py b/pyteal/ir/__init__.py
index e6aa604..ce498a9 100644
--- a/pyteal/ir/__init__.py
+++ b/pyteal/ir/__init__.py
@@ -3,3 +3,11 @@ from .ops import Op, Mode
 from .tealcomponent import TealComponent
 from .tealop import TealOp
 from .teallabel import TealLabel
+
+__all__ = [
+    "Op",
+    "Mode",
+    "TealComponent",
+    "TealOp",
+    "TealLabel",
+]


Test patch:
diff --git a/pyteal/ast/gtxn_test.py b/pyteal/ast/gtxn_test.py
index 33cbdf0..e27f5d9 100644
--- a/pyteal/ast/gtxn_test.py
+++ b/pyteal/ast/gtxn_test.py
@@ -1,6 +1,8 @@
 import pytest
 
 from .. import *
+# this is not necessary but mypy complains if it's not included
+from .. import MAX_GROUP_SIZE
 
 GTXN_RANGE = range(MAX_GROUP_SIZE)
 
diff --git a/tests/module_test.py b/tests/module_test.py
new file mode 100644
index 0000000..3894542
--- /dev/null
+++ b/tests/module_test.py
@@ -0,0 +1,6 @@
+from pyteal import *
+
+def test_export_int():
+    from pyteal import ast
+
+    assert int != ast.int