egglog 10.0.0__cp310-cp310-win_amd64.whl → 10.0.1__cp310-cp310-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of egglog might be problematic. Click here for more details.

Binary file
egglog/builtins.py CHANGED
@@ -5,6 +5,7 @@ Builtin sorts and function to egg.
5
5
 
6
6
  from __future__ import annotations
7
7
 
8
+ from collections.abc import Callable
8
9
  from fractions import Fraction
9
10
  from functools import partial, reduce
10
11
  from types import FunctionType, MethodType
@@ -20,7 +21,7 @@ from .runtime import RuntimeClass, RuntimeExpr, RuntimeFunction
20
21
  from .thunk import Thunk
21
22
 
22
23
  if TYPE_CHECKING:
23
- from collections.abc import Callable, Iterator
24
+ from collections.abc import Iterator
24
25
 
25
26
 
26
27
  __all__ = [
egglog/egraph.py CHANGED
@@ -1817,12 +1817,13 @@ def _rewrite_or_rule_generator(gen: RewriteOrRuleGenerator, frame: FrameType) ->
1817
1817
  """
1818
1818
  Returns a thunk which will call the function with variables of the type and name of the arguments.
1819
1819
  """
1820
- # Get the local scope from where the function is defined, so that we can get any type hints that are in the scope
1821
- # but not in the globals
1822
- globals = gen.__globals__.copy()
1823
- if "Callable" not in globals:
1824
- globals["Callable"] = Callable
1825
- hints = get_type_hints(gen, globals, frame.f_locals)
1820
+ # Need to manually pass in the frame locals from the generator, because otherwise classes defined within function
1821
+ # will not be available in the annotations
1822
+ # combine locals and globals so that they are the same dict. Otherwise get_type_hints will go through the wrong
1823
+ # path and give an error for the test
1824
+ # python/tests/test_no_import_star.py::test_no_import_star_rulesset
1825
+ combined = {**gen.__globals__, **frame.f_locals}
1826
+ hints = get_type_hints(gen, combined, combined)
1826
1827
  args = [_var(p.name, hints[p.name]) for p in signature(gen).parameters.values()]
1827
1828
  return list(gen(*args)) # type: ignore[misc]
1828
1829
 
@@ -6,13 +6,10 @@ Higher Order Functions
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
- from typing import TYPE_CHECKING
9
+ from collections.abc import Callable
10
10
 
11
11
  from egglog import *
12
12
 
13
- if TYPE_CHECKING:
14
- from collections.abc import Callable
15
-
16
13
 
17
14
  class Math(Expr):
18
15
  def __init__(self, i: i64Like) -> None: ...
@@ -7,12 +7,11 @@ Lambda Calculus
7
7
 
8
8
  from __future__ import annotations
9
9
 
10
- from typing import TYPE_CHECKING, ClassVar
10
+ from collections.abc import Callable
11
+ from typing import ClassVar
11
12
 
12
13
  from egglog import *
13
-
14
- if TYPE_CHECKING:
15
- from collections.abc import Callable
14
+ from egglog import Expr
16
15
 
17
16
 
18
17
  class Val(Expr):
egglog/exp/array_api.py CHANGED
@@ -60,6 +60,7 @@ import math
60
60
  import numbers
61
61
  import os
62
62
  import sys
63
+ from collections.abc import Callable
63
64
  from copy import copy
64
65
  from types import EllipsisType
65
66
  from typing import TYPE_CHECKING, Any, ClassVar, TypeAlias, cast
@@ -72,9 +73,10 @@ from egglog.runtime import RuntimeExpr
72
73
  from .program_gen import *
73
74
 
74
75
  if TYPE_CHECKING:
75
- from collections.abc import Callable, Iterator
76
+ from collections.abc import Iterator
76
77
  from types import ModuleType
77
78
 
79
+
78
80
  # Pretend that exprs are numbers b/c sklearn does isinstance checks
79
81
  numbers.Integral.register(RuntimeExpr)
80
82
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: egglog
3
- Version: 10.0.0
3
+ Version: 10.0.1
4
4
  Classifier: Environment :: MacOS X
5
5
  Classifier: Environment :: Win32 (MS Windows)
6
6
  Classifier: Intended Audience :: Developers
@@ -1,19 +1,19 @@
1
- egglog-10.0.0.dist-info/METADATA,sha256=aWuZK6v1QbkwYpgfn9_9UnMiwCvPBONgvULMJCkMyFw,4019
2
- egglog-10.0.0.dist-info/WHEEL,sha256=77DqkvxB4HqZitBRK_M49NRS207JKb0MotMEjnxEWQ8,96
3
- egglog-10.0.0.dist-info/licenses/LICENSE,sha256=TfaboMVZ81Q6OUaKjU7z6uVjSlcGKclLYcOpgDbm9_s,1091
1
+ egglog-10.0.1.dist-info/METADATA,sha256=aV4v_MVLJxVZ6W0NUmSopQcAA9kulEpBgG2aLGJQn3M,4019
2
+ egglog-10.0.1.dist-info/WHEEL,sha256=77DqkvxB4HqZitBRK_M49NRS207JKb0MotMEjnxEWQ8,96
3
+ egglog-10.0.1.dist-info/licenses/LICENSE,sha256=TfaboMVZ81Q6OUaKjU7z6uVjSlcGKclLYcOpgDbm9_s,1091
4
4
  egglog/bindings.pyi,sha256=fnRiGyHuM-m0fDe91kFryUC09U87f5XXPiY6Lno8bvk,14497
5
- egglog/builtins.py,sha256=ZLXp5txd7CD_Wlb137DFdy_qGbvmvzbfb54tc_KbRfY,30692
5
+ egglog/builtins.py,sha256=7T66DZ2fd0rxApVq6vrvHwoLTTXrGy1TIUjBM5SrfD0,30720
6
6
  egglog/config.py,sha256=mALVaxh7zmGrbuyzaVKVmYKcu1lF703QsKJw8AF7gSM,176
7
7
  egglog/conversion.py,sha256=o6iE32taKz-PBX8aDo5i4jGELdEai-wrzMEZUC1lqsU,10257
8
8
  egglog/declarations.py,sha256=R4U8JhM6ChOMmPEgG6tL2sJ8wJGsIEEVVN5lVY-6k2w,23011
9
- egglog/egraph.py,sha256=ssy2UHt8weA8GXzomqTWMKB389HzMo62k826gas5Fng,64537
9
+ egglog/egraph.py,sha256=Cdf51_7oHGq7Fg5mLizc7YkRfXZgR8kocfSOQMFtEK0,64724
10
10
  egglog/egraph_state.py,sha256=wkuHoXmEzcUFspvNl8ZG7_xS1J7XZTK3RPnlZEuvk9k,28720
11
11
  egglog/examples/bignum.py,sha256=r4UeVwpKK2iSZiT5MK4qqTWhWu76CAtSJ5YGDboO9tk,568
12
12
  egglog/examples/bool.py,sha256=pWZTjfXR1cFy3KcihLBU5AF5rn83ImORlhUUJ1YiAXc,733
13
13
  egglog/examples/eqsat_basic.py,sha256=ivYHFD52sjYyl5rWQ60ScxmvcbABYUBlPobDMu6HvN4,913
14
14
  egglog/examples/fib.py,sha256=wAn-PjazxgHDkXAU4o2xTk_GtM_iGL0biV66vWM1st4,520
15
- egglog/examples/higher_order_functions.py,sha256=5P-_10y8eTh-z3bze5GVzKHyFTeefTM774haF8KYGig,1164
16
- egglog/examples/lambda_.py,sha256=hQBOaSw_yorNcbkQVu2EhgSc0IZNWIny7asaOlcUk9s,8496
15
+ egglog/examples/higher_order_functions.py,sha256=z8HgCi057k7Rt6Ms4xDz_tsmVj_Czx8JMUSWqd0HlvM,1105
16
+ egglog/examples/lambda_.py,sha256=y0HrgtmF2Ml2h2crRvqd1fYRtJGPP_n91o-fiWfyCLM,8481
17
17
  egglog/examples/matrix.py,sha256=_zmjgfFr2O_LjTcsTD-45_38Y_M1sP3AV39K6oFxAdw,5136
18
18
  egglog/examples/multiset.py,sha256=kSUFiN4qs8WXvexPCecqk3o5DzdywXacDmIiC5IDKCM,1507
19
19
  egglog/examples/ndarrays.py,sha256=T-wwef-n-3LDSjaO35zA8AZH5DXFFqq0XBSCQKEXV6E,4186
@@ -21,7 +21,7 @@ egglog/examples/README.rst,sha256=QrbfmivODBvUvmY3-dHarcbC6bEvwoqAfTDhiI-aJxU,23
21
21
  egglog/examples/resolution.py,sha256=sKkbRI_v9XkQM0DriacKLINqKKDqYGFhvMCAS9tZbTA,2203
22
22
  egglog/examples/schedule_demo.py,sha256=iJtIbcLaZ7zK8UalY0z7KAKMqYjQx0MKTsNF24lKtik,652
23
23
  egglog/examples/__init__.py,sha256=KuhaJFOyz_rpUvEqZubsgLnv6rhQNE_AVFXA6bUnpdY,34
24
- egglog/exp/array_api.py,sha256=Y-mG8tC8ihFkeIbNDsDyZl7-7zP6YFxZGS4rfsWOG-8,65661
24
+ egglog/exp/array_api.py,sha256=fNC4DRg19vo9-bQfkgAK-OrMml2pgf1rUh_ZPOT47JU,65691
25
25
  egglog/exp/array_api_jit.py,sha256=c0lN-411M9LmEz8uM0ELXTtfUPMJDZFmy81-x3ck6PY,1591
26
26
  egglog/exp/array_api_loopnest.py,sha256=1KZ8kWtv00TVCbzqzWG92vz8Y1pBlPOLRIrJfxyDs9s,2518
27
27
  egglog/exp/array_api_numba.py,sha256=g0Yb7auB2MtJHgSzn7iVnsxn6ffL4FHggKvbEuuDwZs,2765
@@ -40,5 +40,5 @@ egglog/visualizer.css,sha256=DDmxZfLmFygwVkQwel0gGUiM5BZqgunawWeSfaRYBr8,259399
40
40
  egglog/visualizer.js,sha256=kDkYzE5cLLhmpNaWqSfQWzD0SlSsNe9KzT_GpNqhWgo,3789092
41
41
  egglog/visualizer_widget.py,sha256=TGkf61P_f4EvCFcyqwQC_8XYUkujFhcQnEG9vHWLPC4,1358
42
42
  egglog/__init__.py,sha256=TZ3IMVKoz5Qr97VFe-YT7oyT2NACikTis21PpVlSCmg,326
43
- egglog/bindings.cp310-win_amd64.pyd,sha256=rXxhe751_y2H-2KXARFPl_PUZ5HKJtOfIHhGPBape80,4500992
44
- egglog-10.0.0.dist-info/RECORD,,
43
+ egglog/bindings.cp310-win_amd64.pyd,sha256=YNqoCqFlvOwq0cfrv3qzOEabpNC-R5dVlh_2rL2jBlg,4505600
44
+ egglog-10.0.1.dist-info/RECORD,,