ygg 0.1.23__tar.gz → 0.1.24__tar.gz

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.
Files changed (61) hide show
  1. {ygg-0.1.23 → ygg-0.1.24}/PKG-INFO +1 -1
  2. {ygg-0.1.23 → ygg-0.1.24}/pyproject.toml +1 -1
  3. {ygg-0.1.23 → ygg-0.1.24}/src/ygg.egg-info/PKG-INFO +1 -1
  4. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/pyutils/python_env.py +51 -8
  5. {ygg-0.1.23 → ygg-0.1.24}/LICENSE +0 -0
  6. {ygg-0.1.23 → ygg-0.1.24}/README.md +0 -0
  7. {ygg-0.1.23 → ygg-0.1.24}/setup.cfg +0 -0
  8. {ygg-0.1.23 → ygg-0.1.24}/src/ygg.egg-info/SOURCES.txt +0 -0
  9. {ygg-0.1.23 → ygg-0.1.24}/src/ygg.egg-info/dependency_links.txt +0 -0
  10. {ygg-0.1.23 → ygg-0.1.24}/src/ygg.egg-info/entry_points.txt +0 -0
  11. {ygg-0.1.23 → ygg-0.1.24}/src/ygg.egg-info/requires.txt +0 -0
  12. {ygg-0.1.23 → ygg-0.1.24}/src/ygg.egg-info/top_level.txt +0 -0
  13. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/__init__.py +0 -0
  14. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/__init__.py +0 -0
  15. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/compute/__init__.py +0 -0
  16. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/compute/cluster.py +0 -0
  17. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/compute/execution_context.py +0 -0
  18. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/compute/remote.py +0 -0
  19. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/jobs/__init__.py +0 -0
  20. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/jobs/config.py +0 -0
  21. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/sql/__init__.py +0 -0
  22. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/sql/engine.py +0 -0
  23. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/sql/exceptions.py +0 -0
  24. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/sql/statement_result.py +0 -0
  25. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/sql/types.py +0 -0
  26. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/workspaces/__init__.py +0 -0
  27. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/workspaces/databricks_path.py +0 -0
  28. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/databricks/workspaces/workspace.py +0 -0
  29. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/dataclasses/__init__.py +0 -0
  30. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/dataclasses/dataclass.py +0 -0
  31. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/libs/__init__.py +0 -0
  32. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/libs/databrickslib.py +0 -0
  33. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/libs/extensions/__init__.py +0 -0
  34. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/libs/extensions/polars_extensions.py +0 -0
  35. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/libs/extensions/spark_extensions.py +0 -0
  36. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/libs/pandaslib.py +0 -0
  37. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/libs/polarslib.py +0 -0
  38. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/libs/sparklib.py +0 -0
  39. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/pyutils/__init__.py +0 -0
  40. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/pyutils/callable_serde.py +0 -0
  41. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/pyutils/exceptions.py +0 -0
  42. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/pyutils/modules.py +0 -0
  43. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/pyutils/parallel.py +0 -0
  44. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/pyutils/retry.py +0 -0
  45. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/requests/__init__.py +0 -0
  46. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/requests/msal.py +0 -0
  47. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/requests/session.py +0 -0
  48. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/__init__.py +0 -0
  49. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/cast/__init__.py +0 -0
  50. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/cast/arrow_cast.py +0 -0
  51. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/cast/cast_options.py +0 -0
  52. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/cast/pandas_cast.py +0 -0
  53. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/cast/polars_cast.py +0 -0
  54. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/cast/polars_pandas_cast.py +0 -0
  55. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/cast/registry.py +0 -0
  56. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/cast/spark_cast.py +0 -0
  57. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/cast/spark_pandas_cast.py +0 -0
  58. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/cast/spark_polars_cast.py +0 -0
  59. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/libs.py +0 -0
  60. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/python_arrow.py +0 -0
  61. {ygg-0.1.23 → ygg-0.1.24}/src/yggdrasil/types/python_defaults.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygg
3
- Version: 0.1.23
3
+ Version: 0.1.24
4
4
  Summary: Type-friendly utilities for moving data between Python objects, Arrow, Polars, Pandas, Spark, and Databricks
5
5
  Author: Yggdrasil contributors
6
6
  License: Apache License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ygg"
7
- version = "0.1.23"
7
+ version = "0.1.24"
8
8
  description = "Type-friendly utilities for moving data between Python objects, Arrow, Polars, Pandas, Spark, and Databricks"
9
9
  readme = { file = "README.md", content-type = "text/markdown" }
10
10
  license = { file = "LICENSE" }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygg
3
- Version: 0.1.23
3
+ Version: 0.1.24
4
4
  Summary: Type-friendly utilities for moving data between Python objects, Arrow, Polars, Pandas, Spark, and Databricks
5
5
  Author: Yggdrasil contributors
6
6
  License: Apache License
@@ -17,7 +17,7 @@ import zipfile
17
17
  from contextlib import contextmanager
18
18
  from dataclasses import dataclass
19
19
  from pathlib import Path, PurePosixPath
20
- from typing import Any, Iterable, Iterator, Mapping, MutableMapping, Optional, Union
20
+ from typing import Any, Iterable, Iterator, Mapping, MutableMapping, Optional, Union, List
21
21
 
22
22
  log = logging.getLogger(__name__)
23
23
 
@@ -40,9 +40,55 @@ _LOCKS_GUARD: threading.RLock = threading.RLock()
40
40
 
41
41
  # Installed into newly created envs (and on create() upsert when env already exists)
42
42
  DEFAULT_CREATE_PACKAGES: tuple[str, ...] = ("uv", "ygg")
43
- EXCLUDED_PACKAGES = {
44
- "python-apt"
45
- }
43
+ _NON_PIPABLE_NAMES = (
44
+ "python-apt",
45
+ "python3-apt",
46
+ "unattended-upgrades",
47
+ "apt",
48
+ "apt-utils",
49
+ "dpkg",
50
+ "adduser",
51
+ "lsb-release",
52
+ "software-properties-common",
53
+ "systemd",
54
+ "udev",
55
+ "dbus",
56
+ )
57
+
58
+ # Matches a requirement line that starts with one of those names, followed by:
59
+ # - end of line
60
+ # - a version specifier (==,>=, etc)
61
+ # - extras ([...])
62
+ # - an environment marker (; ...)
63
+ _NON_PIPABLE_RE = re.compile(
64
+ r"^\s*(?:"
65
+ + "|".join(re.escape(n) for n in _NON_PIPABLE_NAMES)
66
+ + r")(?=\s*(?:$|==|~=|!=|<=|>=|<|>|\[|;))",
67
+ re.IGNORECASE,
68
+ )
69
+
70
+
71
+
72
+ def _filter_non_pipable_linux_packages(requirements: Iterable[str]) -> List[str]:
73
+ """
74
+ Remove Linux OS-level packages that aren't realistically installable via pip/uv on Databricks.
75
+ Keeps comments/blank lines as-is.
76
+ """
77
+ out: List[str] = []
78
+ for line in requirements:
79
+ s = line.strip()
80
+
81
+ # keep empty lines and comments
82
+ if not s or s.startswith("#"):
83
+ out.append(line)
84
+ continue
85
+
86
+ if _NON_PIPABLE_RE.match(s):
87
+ continue
88
+
89
+ out.append(line)
90
+
91
+ return out
46
92
 
47
93
 
48
94
  def _is_windows() -> bool:
@@ -882,10 +928,7 @@ print("RESULT:" + json.dumps(top_level))""".strip()
882
928
  if not isinstance(top_level, list) or not all(isinstance(x, str) for x in top_level):
883
929
  raise PythonEnvError(f"Unexpected top-level requirements payload: {top_level!r}")
884
930
 
885
- # exclude python-apt (yanked/unmaintained; not usable on Databricks)
886
- _pyapt_re = re.compile(r"^\s*python-apt(\s*(?:==|~=|!=|<=|>=|<|>|\[)|\s*(?:;|$))", re.IGNORECASE)
887
-
888
- filtered = [line for line in top_level if not _pyapt_re.match(line)]
931
+ filtered = _filter_non_pipable_linux_packages(top_level)
889
932
 
890
933
  req_in_text = "\n".join(filtered) + "\n"
891
934
  req_in_path.write_text(req_in_text, encoding="utf-8")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes