Whole file
kayak/pypika
The author described this change as “fix `Field.__init__` (#742)”. It counts as a record because the check below fails on the code as it stood at f1552da36 and passes on 822140eb8, with nothing else changed between the two runs.
Projectkayak/pypika
Fix saved2024-04-17
Sharing licenceApache-2.0 · LICENSE.txt
Change size+4 −0
What the code was meant to do, written into the code itself as a save note
fix `Field.__init__` (#742)
The change
| 548 | 548 | ) -> None: | |
| 549 | 549 | super().__init__(alias=alias) | |
| 550 | 550 | self.name = name | |
| 551 | + | if isinstance(table, str): | |
| 552 | + | # avoid circular import at load time | |
| 553 | + | from pypika.queries import Table | |
| 554 | + | table = Table(table) | |
| 551 | 555 | self.table = table | |
| 552 | 556 | ||
| 553 | 557 | def nodes_(self) -> Iterator[NodeT]: |
The check that tells the two apart
fail→pass·pypika/tests/test_terms.py::FieldInitTests::test_init_with_str_table
Check file pypika/tests/test_terms.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before itf1552da3663af0bcc3eac78ce8a34c08fad1a858
Broken version dated2024-04-17
Modulepypika.terms
Units changedField
Fingerprint0d4945c6dd0a9df3
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in kayak/pypika
- 2023-09-26Fix: Allow the usage of `frozenset` in the `isin(...)` and `notin(...)` functions (#744)
- 2023-09-22fix(terms): fixed EmptyCriterion bug with ComplexCriterion (#732)
- 2021-08-26MySQLQuery
- 2021-01-11Fix empty Postgres array syntax (#539)
- 2021-01-04Fix PostgreSQLQueryBuilder returning clause code causing Py3.9 test failures
- 2020-12-09Fix groupby_alias specified multiple times in kwargs when subqueries are used