Skip to content

Latest commit

 

History

History
488 lines (280 loc) · 25.1 KB

CHANGELOG.md

File metadata and controls

488 lines (280 loc) · 25.1 KB

Changelog

v3.9.4 (2024-11-10)

Fix

  • p4w: Calling for_py4web.DAL() without any arguments (to load from config) should work even with singleton (16f9e68)

v3.9.3 (2024-11-08)

Fix

  • p4w: Actually passing the 'uri' to connect to a database in singleton mode would be pretty useful no? (e29a0bb)

v3.9.2 (2024-11-08)

Fix

  • Py4web-specific DAL now provides a singleton per db_uid, so different apps using shared typedal classes share a db instance, leading to less weird behavior (e.g. on db.commit()) (a2af3d5)

v3.9.1 (2024-10-25)

Fix

  • Bool(QueryBuilder) should NOT look at the data but if any filters were applied (962ddf3)

v3.9.0 (2024-10-25)

Feature

  • Add condition_and to .join so you can add additional requirements to inner joins (0ae688b)

v3.8.5 (2024-10-24)

Fix

  • Use right 'timestamp' field (2aedb02)
  • Allow specifying a field to Builder.count(...); support selecting extra fields (e.g. MyField.count()) (ce28a79)

v3.8.4 (2024-10-24)

Fix

  • Paginate with limit=0 will yield all rows instead of crashing pt2 (78f1ae7)

v3.8.3 (2024-10-24)

Fix

  • Paginate with limit=0 will yield all rows instead of crashing (76813e6)

v3.8.2 (2024-10-23)

Fix

  • Improvements in relationship detection and multiple mixins
  • make Mixin base class define settings so other mixins can use them without checking for existance

v3.8.1 (2024-10-22)

Fix

  • Make 'requires=' also accept list[Validator] or a single Validator/Callable (a4a7c00)

v3.8.0 (2024-10-11)

Feature

  • Add _sql() function to TypedTable to generate SQL Schema code. (only if 'migration' extra/pydal2sql is installed) (31f86de)
  • Add FieldSettings typed dict for better hinting for options when creating a TypedField() or any of the fields using it (97a7c7a)
  • Add custom TypedFields for timestamp, point and uuid (valid types in postgres and sqlite is okay with anything) (a7bc9d1)
  • Started on custom types (timestamp) (981da83)

v3.7.1 (2024-10-09)

Fix

  • Prepare for python 3.13 (-> cgi dependency, changes in forward reference evaluation); except psycopg2 (bbcca8f)
  • Require legacy-cgi for python 3.13+ (7ba9489)

Documentation

  • readme: Include from typedal.helpers import get_db in example (8853052)

v3.7.0 (2024-08-17)

Feature

  • Add get_db, get_table, get_field helpers to get pydal objects back from typedal (2363e9d)

v3.6.0 (2024-08-05)

Feature

  • typedal migrations.stub (via pydal2sql) to generate edwh-migrate stub migration (67dbeb8)

v3.5.0 (2024-07-03)

Feature

  • Improved callback hooks (before_/after_ insert/update/delete) (cabe328)

v3.4.0 (2024-06-04)

Feature

  • .column() function on querybuilder (173fb08)

v3.3.1 (2024-06-04)

Fix

  • Typing improvements for relationships, with_alias (e76d3a3)

Documentation

  • Manually append changelog (032b017)

v3.3.0 (2024-05-22)

Feature

  • Improved type hinting (84e701d)
  • Improved limitby + orderby (or other select kwargs) combination, so sorting is done BEFORE limiting + tests to validate this behavior (84e701d)

Fix

  • Validate_and_update does not raise an exception anymore, simplify function + make tests pass again (e7a33f6)

v3.2.0 (2024-04-30)

Feature

  • Add .from_slug to SlugMixin (bacf416)

v3.1.4 (2024-04-22)

Fix

  • Re-used fields are now all bound separately (1b7f80b)

v3.1.3 (2024-04-18)

Fix

  • SlugMixin: Field should not be manually writable (4254b77)

v3.1.2 (2024-04-17)

Fix

  • Bump pydal2sql for better CREATE statements (when a callable 'default' value is used) (28370f3)

v3.1.1 (2024-04-16)

Documentation

  • More info about configuration and the cli (950295d)

v3.1.0 (2024-04-16)

Feature

Fix

  • deps: Edwh-migrate 0.8 is release so don't depend on alpha version anymore (4b324ec)

v3.0.1 (2024-04-16)

Fix

  • Don't add before_update/before_delete hooks if caching is disabled (2c15bf2)

v3.0.0 (2024-04-02)

v3.0.0-beta.4 (2024-03-20)

Fix

  • Bump pydal2sql dependency (33ba73e)

v3.0.0-beta.3 (2024-03-20)

Fix

  • Swap out black's implementation of find_pyproject_toml to configuraptor's (82676cc)

v3.0.0-beta.2 (2024-03-20)

Fix

  • Use skip_none for configuraptor.update to prevent setting optional fields to None (b05caf8)

v3.0.0-beta.1 (2024-03-20)

Feature

  • Added migrations.fake subcommand to mark edwh-migrate migrations as done in the db (1a39409)
  • Allow --format/--fmt/-f for cache stats to output as machine-readable + more docstrings (8cd2771)
  • Initial basic statistics via cli (typedal cache.stats) (5822763)

Fix

  • Make pytest work again and other su6 tests happier (ab4061e)

v2.4.0 (2024-02-26)

Feature

  • querybuilder: New .execute() to execute a query from the builder raw, without any postprocessing (68d631c)

v2.3.6 (2024-01-01)

Fix

  • Passing folder=Path() to TypeDAL() shouldn't crash config (7bcf96d)

v2.3.5 (2023-12-19)

Fix

  • Some fields should not be nullable (4a3ebba)

v2.3.4 (2023-12-19)

Fix

  • Included web2py auth tables in for_web2py (b7c7213)

v2.3.3 (2023-12-19)

v2.3.3-beta.1 (2023-12-19)

Fix

  • Remove json-fix magic, just use the custom json serializer instead! (6f5b687)

v2.3.2 (2023-12-18)

Fix

  • Improved JSON dumping with custom logic instead of pydals logic (ab9c3f0)

v2.3.1 (2023-12-18)

Fix

  • Model classes can now have non-db properties and methods and pydal will not complain anymore. Config should all go via @define, not as class properties anymore (49db4df)

v2.3.0 (2023-12-18)

Feature

  • Db._config exposes the config used by TypeDAL (276fd8e)
  • .update and .delete on a TypedRows result (after .collect()) (813f008)

Fix

  • Cached items can now be dumped .to_json() (0eaacc5)

v2.2.4 (2023-12-15)

Fix

  • If no .env, still load os environ pt2 (3a04890)

v2.2.3 (2023-12-15)

Fix

  • If no .env, still load os environ (983c5b4)

v2.2.2 (2023-12-14)

Feature

  • Env vars are now filled into config toml settings (dfbca8f)

v2.2.1 (2023-12-05)

Fix

  • py4web: Add proper requires= to pydal's auth_user model (00d6436)

Documentation

  • readme: Removed roadmap and set new docs url (6045065)

v2.2.0 (2023-12-05)

Feature

  • cli: Started with setup cli command to initialize typedal config (a46a859)
  • Start working on cli that unifies pydal2sql + edwh-migrate (180dbb1)
  • config: TypeDAL will now by default look for config in pyproject.toml and env (.env and os environ) (6af3cae)

Fix

  • install: Typedal[all] should now include all dependencies (e46b3ce)
  • setup: Tomlkit uses custom types which broke setup (7a6eca1)
  • Improve cli + tests (978fea1)

Documentation

  • migrations: Included subsection about multiple connections (acc8922)
  • Added section 6 on Migrations (2423ed8)

v2.1.5 (2023-11-21)

Feature

  • Automatically create the typedal 'folder' if it doesn't exist yet (163b205)

Fix

  • cache: If cache table exists but flags are missing, properly re-define with fake migrate (212eb8a)

v2.1.4 (2023-11-07)

Fix

  • Readthedocs was missing dependencies (02e8109)

Documentation

  • Set new docs url on pypi (3b6ea5b)
  • Renamed readme to index so RTD understands it better (9d544a3)
  • Add ReadTheDocs with mkdocs (e2d2e48)

v2.1.3 (2023-11-02)

Fix

  • mypy: TypeDAL(folder=...) folder can also be a Path (f7494ed)

v2.1.2 (2023-11-02)

Fix

  • Auto-fake internal tables if migrating fails (4a87190)

v2.1.1 (2023-11-02)

Documentation

  • Update changelog for 2.1 release (6affca5)

v2.1.0 (2023-11-02)

Feature

  • p4w: Add AuthUser class (d355314)
  • Started implementing .cache() on query builder (a2687dc)
  • caching: You can now mark a table as "not a caching dependency" with db.define(cache_dependency=False) (e1ad350)
  • caching: Allow setting ttl/expire datetime for cache (c3b4671)
  • Caching requires dill (a7e5ca8)

Documentation

  • Explained you can pass kwargs to db.define (7d6591c)
  • Added .cache() to the query builder docs (60f8f93)
  • You need redefine=True when extending AuthUser (29c63a3)
  • Remove 2.1 from roadmap in preparation for 2.1 release (202a028)
  • Add a small chapter about py4web integration (cb838d8)
  • Cleaned up changelog (8dad225)

v2.0.2 (2023-11-01)

Fix

  • Proper capitalization on pypi (8a0c320)

Documentation

  • Updated readme (7706e75)
  • Added one-to-one relationship example (and included it in tests) (dac1721)
  • Fix typo (77981c9)

v2.0.1 (2023-11-01)

Fix

  • Or_fail functions can now be passed a specific error (75b49e9)

Documentation

  • Set urls from relative to absolute so they work on pypi (d71e7c4)
  • Merged prerelease changelog entries into one 2.0.0 entry (f2d73e1)

v2.0.0 (2023-11-01)

Features

  • p4w: Add py4web specific DAL Fixture (2d87327)
  • Added more ORM features (dynamic querying. some better typing etc) (64c9b67)
  • More progress on Typed ORM logic. BREAKS A LOT OF PYTESTS!!! (582cb56)
  • orm: Allows creating relationships between tables (5902ac6)
  • Extended Rows (result) functionality (8a20c0c)
  • rows: Added typedrow functionality + tests (22ee99b)
  • Improvements on row instances (218a45e)
  • typedrows: Added metadata for debugging etc (658ecfe)
  • query: Improved INNER JOIN handling and allow _method to generate SQL (ab5794b)
  • json: Compatibility with json-fix (d9ca1af)
  • querybuilder: Add pagination (6adf622)
  • paginate: As_dict for PaginatedRows now also returns pagination info in addition to data (3b17937)
  • paginate: Paginate doesn't return a querybuilder anymore but can replace collect, returns a PaginatedRows (ccda5d4)
  • table: Shadowed and/or modified pydal.Table methods in TypedTable (Meta) (397bf67)
  • Add .chunk to query builder + chore more tests (51f5979)

Fix

  • json: Auto add json-fix if including for py4web (4d51511)
  • core: Table(0) can also work in some instances, so don't check for falsey but for None (4430453)
  • select: Auto add missing id in select (eacce47)
  • relations: One-to-one improvements (65984ce)
  • relationships: Better collection (3db63ab)
  • mypy: Fix return types in fields.py (51322f7)

Documentation

  • Started with more documentation about the ORM features (ca86f7c)
  • Minor improvements in examples and text (76d0bae)
  • Updated examples and roadmap (55901fd)
  • relationships: Added examples of one-to-many, many-to-one, many-to-many (2ff8555)
  • queries: Explain select, where, join + new paginated rows (6d2b9b8)

v1.2.2 (2023-07-06)

Fix

  • Allow using TypedFieldTypes in .select() (2945d15)

v1.2.1 (2023-06-27)

Fix

  • Typehint query options for db() and update_or_insert() (2b65f58)

v1.2.0 (2023-06-27)

Feature

  • set: Type hints for .count() and .select() (1f23581)

v1.1.2 (2023-06-27)

Fix

  • query: A class with postponed db.define could not be used to make queries (2e55363)

v1.1.1 (2023-06-22)

Fix

  • mypy: Made the package properly typed (a242895)

v1.1.0 (2023-06-22)

Feature

  • types: You should use param = TypedField() instead of param: TypedField() from now on for better mypy support (ed50273)

Fix

  • version: We were already on 1.0.0 (d6a8d0d)

Documentation

  • More info about new release (ddfffe2)

v1.0.0 (2023-06-05)

Refactored pre-1.0 code and added su6 checker tool.
Moved to pyproject.toml based build system.

Feature

  • su6: Add github workflow with checkers (d462387)
  • tests: Moved tests.py to pytest (de33d20)
  • define: Pass extra kwargs (e.g. format) to define_table (bb692dc)
  • TypedRows: Subscriptable return type for .select() (7b674b0)
  • Add specific Fields, experimented with future.annotations (does not work right now) and general improvements (9af27c2)

Fix

  • gh: Also install current project with dependencies on checking (60a1010)
  • ruff: Make linter happy (b961054)
  • ..Field: Use typing.Type[] instead of type() for better hinting (308ea14)
  • core: Table(id) works now just like Table(id=id) (c19e170)
  • intfield: Return int type, not int instance (334c3ac)
  • core: Notnull > required, fix ReferenceField with cls instead of string (1cc1482)
  • Actually use custom type in TypedField (98c8fc3)