egglog 10.0.0__cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 10.0.1__cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.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.

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,15 +1,15 @@
1
- egglog-10.0.0.dist-info/METADATA,sha256=doz_j7GUVTFvkbavd_wTPB4etBIjYF4IpJxs7e4hlVA,4009
2
- egglog-10.0.0.dist-info/WHEEL,sha256=DV_T2A0Gv13JmYxViXfpTCmEZM5AlEMD1_Y1Pzch5h0,131
3
- egglog-10.0.0.dist-info/licenses/LICENSE,sha256=w7VlVv5O_FPZRo8Z-4Zb_q7D5ac3YDs8JUkMZ4Gq9CE,1070
1
+ egglog-10.0.1.dist-info/METADATA,sha256=BKd5QxorELhavgKQf4E6fDVQ8FpCCifHy4v_BxFiXT0,4009
2
+ egglog-10.0.1.dist-info/WHEEL,sha256=DV_T2A0Gv13JmYxViXfpTCmEZM5AlEMD1_Y1Pzch5h0,131
3
+ egglog-10.0.1.dist-info/licenses/LICENSE,sha256=w7VlVv5O_FPZRo8Z-4Zb_q7D5ac3YDs8JUkMZ4Gq9CE,1070
4
4
  egglog/visualizer_widget.py,sha256=LtVfzOtv2WeKtNuILQQ_9SOHWvRr8YdBYQDKQSgry_s,1319
5
5
  egglog/egraph_state.py,sha256=KxP4aXfh21vVqx1HbQMtb2PRxJg4Gzp1Po6Jp5Zppk0,28086
6
- egglog/builtins.py,sha256=6kVNJHRsJJDy_4_MWKtMztbpfWKyv15NnHb3m-9aJlY,29609
6
+ egglog/builtins.py,sha256=7cZk-MxUvOA3OT9RSX7WkYBoj1whAfp3tOB3a82ZTH0,29636
7
7
  egglog/exp/array_api_numba.py,sha256=X3H1TnCjPL92uVm6OvcWMJ11IeorAE58zWiOX6huPv4,2696
8
8
  egglog/exp/program_gen.py,sha256=9q8-ihkXLgeRU_BrINF3t3gThdS74KCzTo4UiRIR6Dk,13027
9
9
  egglog/exp/array_api_program_gen.py,sha256=0FpWZZJ3VqIod9vIYfQYUIiyswfj4h4K_4s6GZb8SJY,21742
10
10
  egglog/exp/siu_examples.py,sha256=yZ-sgH2Y12iTdwBUumP7D2OtCGL83M6pPW7PMobVFXc,719
11
11
  egglog/exp/__init__.py,sha256=nPtzrH1bz1LVZhZCuS0S9Qild8m5gEikjOVqWAFIa88,49
12
- egglog/exp/array_api.py,sha256=jcVAwJN-b_n7bDnDIz2cadQ67Okk5CDGPOiAgpTJgfc,63678
12
+ egglog/exp/array_api.py,sha256=jKQoDg3bYg0TGGEJLwXF3okWDkgi4JA4ayXzwf-9XB4,63706
13
13
  egglog/exp/array_api_jit.py,sha256=90RmyivRoCKzVtiYWnTBkK2q2FDkD2p1iq7vzbh68b4,1546
14
14
  egglog/exp/array_api_loopnest.py,sha256=-kbyorlGxvlaNsLx1nmLfEZHQM7VMEBwSKtV0l-bs0g,2444
15
15
  egglog/type_constraint_solver.py,sha256=_y52JJoxWJDzokvS07-QHJ4sQpvWE86_Dk43RAUqhAk,4516
@@ -24,21 +24,21 @@ egglog/pretty.py,sha256=5hcc5-tAGnhcpz_aClJ1PgE3StOvFqQRYXYFDWXbNP0,20476
24
24
  egglog/conversion.py,sha256=lE9a3myOWyxlYbCVqOMKnqXw2_Ul24DJuJlVZ50HCA0,9989
25
25
  egglog/ipython_magic.py,sha256=2hs3g2cSiyDmbCvE2t1OINmu17Bb8MWV--2DpEWwO7I,1189
26
26
  egglog/functionalize.py,sha256=VMqiWcDbn1pYrY3FMxT143Bk90dMaxo2VapUL60-fvE,3847
27
- egglog/egraph.py,sha256=efeQ6KLPy4FPtEB9bLxyf4FI0RqFYzsYOBZP-aP-3YQ,62681
27
+ egglog/egraph.py,sha256=Y2vAfJpH3ss51zc9krkfAVzkcttKtSwrnSpmrBupvXs,62867
28
28
  egglog/visualizer.css,sha256=eL0POoThQRc0P4OYnDT-d808ln9O5Qy6DizH9Z5LgWc,259398
29
29
  egglog/visualizer.js,sha256=2qZZ-9W_INJx4gZMYjnVXl27IjT_JNuQyEeI2dbjWoU,3753315
30
30
  egglog/examples/schedule_demo.py,sha256=JbXdPII7_adxtgyKVAiqCyV2sj88VZ-DhomYrdn8vuc,618
31
31
  egglog/examples/README.rst,sha256=ztTvpofR0eotSqGoCy_C1fPLDPCncjvcqDanXtLHNNU,232
32
32
  egglog/examples/fib.py,sha256=BOHxKWA7jGx4FURBmfmuZKfLo6xq9-uXAwAXjYid7LU,492
33
33
  egglog/examples/resolution.py,sha256=BJd5JClA3DBVGfiVRa-H0gbbFvIqeP3uYbhCXHblSQc,2119
34
- egglog/examples/lambda_.py,sha256=LK1ZSCITpvxpRMaqISZkRAKqNAU7QbaWq9oGe7ku2Ns,8208
34
+ egglog/examples/lambda_.py,sha256=iQvwaXVhp2VNOMS7j1WwceZaiq3dqqilwUkMcW5GFBE,8194
35
35
  egglog/examples/multiset.py,sha256=fdEPvNFkHe_XmzBv90JCP8SCxoKgpg_CIDsR8HWcbnY,1447
36
36
  egglog/examples/bignum.py,sha256=LziQqBdOaYNhO3VQS6ZokHDO7_QSsOMV4Whyrj6-6nA,536
37
37
  egglog/examples/matrix.py,sha256=7_mPcMcgE-t_GJDyf76-nv3xhPIeN2mvFkc_p_Gnr8g,4961
38
38
  egglog/examples/__init__.py,sha256=wm9evUbMPfbtylXIjbDdRTAVMLH4OjT4Z77PCBFyaPU,31
39
- egglog/examples/higher_order_functions.py,sha256=hWs9sCM5mERuuYscw9Qp-W3HEHi0EMtAs57gV2Qv69k,1119
39
+ egglog/examples/higher_order_functions.py,sha256=DNLIQfPJCX_DOLbHNiaYsfvcFIYCYOsRUqp99r9bpc8,1063
40
40
  egglog/examples/bool.py,sha256=e0z2YoYJsLlhpSADZK1yRYHzilyxSZWGiYAaM0DQ_Gw,695
41
41
  egglog/examples/ndarrays.py,sha256=mfr410eletH8gfdg-P8L90vlF6TUifvYV_-ryOwvZZE,4042
42
42
  egglog/examples/eqsat_basic.py,sha256=2xtM81gG9Br72mr58N-2BUeksR7C_UXnZJ4MvzSPplc,869
43
- egglog/bindings.cpython-310-aarch64-linux-gnu.so,sha256=s58gJBc62ta1IszzNE7n5iMQnn_4LCB0UCt-SdsTZsg,5841296
44
- egglog-10.0.0.dist-info/RECORD,,
43
+ egglog/bindings.cpython-310-aarch64-linux-gnu.so,sha256=DRoaD5fWBNVffaiuGJ0F_Fuho-KGxTFQpWcBmIR44qM,5841280
44
+ egglog-10.0.1.dist-info/RECORD,,