Repository navigation
Allow manual trigger of tests - #3
Open
sarahmonod wants to merge 63 commits into
Open
sarahmonod wants to merge 63 commits into
sarahmonod wants to merge 63 commits into
Conversation
This commit contains the changes that `pyupgrade --py36-plus` recommends, plus the change of the `python_requires` to make it explicit that this version only supports 3.6+ Signed-off-by: Gus Monod <gmonod1@bloomberg.net>
This minor version is the first version that removes support for Python 2.7. Signed-off-by: Gus Monod <gmonod1@bloomberg.net>
This library is necessary only for Python 2 support, and now that we have dropped support for 2.7, we don't need it anymore. Signed-off-by: Gus Monod <gmonod1@bloomberg.net>
This was made unnecessary by the running of `pyupgrade --py36-plus` Signed-off-by: Gus Monod <gmonod1@bloomberg.net>
Signed-off-by: Gus Monod <gmonod1@bloomberg.net>
Drop 2.7 support
Change `python_requires` to make it explicit that this version only supports 3.7+ and bump the minor version. Note that `pyupgrade --py37-plus` is a no-op. Signed-off-by: Gus Monod <gmonod1@bloomberg.net>
Signed-off-by: asardesai2 <asardesai2@bloomberg.net>
It'd be hard to trigger, and would require a race between threads, but this defends against the issue. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Signed-off-by: Gus Monod <gmonod1@bloomberg.net>
This update was missed when support for binding arrays was introduced. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
This test takes the current date and time and switches the year to a hardcoded one. On leap day, that fails because the hardcoded year didn't have a February 29th. Update the test to use a hardcoded year that did. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
actions/checkout@v4 is getting a "permission denied" error when attempting to remove some of these files. Remove them ourselves as a super-user. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
This is the only thing `ruff check` complains about. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Now that we no longer support Python 2.7, we no longer benefit from maintaining typing information in stub files, and can instead use type annotations. This was partially performed by `merge-pyi` and `pyupgrade --py37-plus`, but partially by hand, and needs to be checked carefully. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
This commit was entirely automatic, from `ruff format`. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
PEP 585 allows the types in `collections.abc` to be used as generic
types for the purposes of type annotations. Since we're using
from __future__ import annotations
we can use this feature even for Python 3.8, which predates PEP 585.
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Without this change, Sphinx complains that these attributes are documented twice, once by our Sphinx markup in the class docstring and once with a generated docstring for each property produced by `NamedTuple` itself for each property. Override the generated one with our description so that Sphinx finds only one docstring for each attribute, and so that `help()` shows the more useful one. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
This allows us to use the C++ standard library to more easily implement future changes, and reduces friction with some internal patches. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Expose a `column_types` keyword-only argument to `cdb2.Handle.execute` and `dbapi2.Cursor.execute` for specifying the types that the result set columns must have. The database will coerce returned values to the given type for the column. An exception will be raised if it can't, or if too few or too many types are given. Also, populate an `enum.IntEnum` with the acceptable column types. Previously we had this only as the members of a dict, but that doesn't play nicely with type annotations. Keep the dict for backwards compatibility, but use the enum to populate it. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Now that 3.13 beta is out, we should start this Signed-off-by: Sarah Monod <smonod1@bloomberg.net>
Up until now, we were always testing with `python3.10`, no matter which version was setup… which made all the tests green, but also only tested one version instead of all versions as was the intention. Signed-off-by: Sarah Monod <smonod1@bloomberg.net>
Previously their annotations used the less specific `Sequence` type, despite the docstring saying that lists are returned. This caused type checkers to reject concatenating two result sets with `+`. Signed-off-by: Saharsh Rathi <srathi41@bloomberg.net>
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
When we added this feature, we didn't update the documentation to describe it. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
The latest version of each is v4, and v3 is deprecated and scheduled to be decommissioned. Signed-off-by: Matt Wozniski <godlygeek@gmail.com>
Signed-off-by: Matt Wozniski <godlygeek@gmail.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Now that there has been a 3.13 final release, "3.13" and "3.13-dev" are equivalent. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
This method can be used to explicitly convert a `DatetimeUs` instance to a `datetime` instance that can be used somewhere where instances of the subclass are not accepted (such as pydantic). Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
This is now triggering warnings saying that:
WARNING: The config value `viewcode_import' has type `bool';
expected `NoneType'.
The comment says that we were trying to prevent the `viewcode` extension
from generating HTML for the standard library `datetime` module, but
even with this setting removed it doesn't do that. This may just be
a holdover from some long ago version of Sphinx, but it no longer seems
to be necessary or useful.
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Add support for `?` placeholders that are bound sequentially to elements of a sequence of parameters. Signed-off-by: Salil Chandra <schandra107@bloomberg.net> Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
This release adds support for binding parameters positionally with `?` placeholders, and adds a new `.as_datetime` method to `DatetimeUs` to allow converting a `DatetimeUs` to a `datetime.datetime`. This release also drops support for Python 3.7, which has at this point is several years past end-of-life, and which has become too difficult to support in our CI. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Existing users rely on this to access the underlying Comdb2 error code. Signed-off-by: Michael Thorpe <michael@thorpe.dev>
This attribute can be `None`, for instance on a newly created `Cursor` or one where a transaction has just been committed or rolled back. Signed-off-by: Jonathan Surany <jsurany@bloomberg.net>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v4...v5) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
We'll use 3.14-dev for now, as 3.14.0 has not been released yet. Signed-off-by: Ivona Stojanovic <istojanovic2@bloomberg.net>
Update test_date_column_decode_exception to handle both old and new datetime year validation error message formats. Python 3.14 changed the error message from "year 0 is out of range" to "year must be in MINYEAR..MAXYEAR, not 0" for invalid year values. The test now checks for either format to maintain compatibility across Python versions. Signed-off-by: Ivona Stojanovic <istojanovic2@bloomberg.net>
Signed-off-by: Matt Wozniski <godlygeek@gmail.com>
This originally was not the case, but this behavior was accidentally changed c0f99cf way back in 2017 while fixing a bug in our handling of aware datetimes, and the regression wasn't noticed. At this point Hyrum's Law tells us that the new behavior is almost certainly depended upon by someone and fixing the bug would be far riskier than just updating the documentation to match the current behavior. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
When binding a `datetime.datetime` (but _not_ a `DatetimeUs`), the `fold` attribute was incorrectly ignored, leading to the first occurrence of the given wall clock time being bound, rather than the later occurrence. This was caused by the binding layer rounding the parameter value to the nearest millisecond by adding a `timedelta` to it, which resets the `fold` attribute to 0. Work around this by converting to UTC first, before rounding to the nearest millisecond. This works since there are no ambiguous times in UTC and so the `fold` attribute must always be zero. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
I'm a bit nervous about pulling the trigger on getting rid of `pytz` entirely, so this is a baby step in the right direction: starting from Python 3.14, use `zoneinfo` to create the time zone objects that we attach to the `datetime` objects fetched by queries, rather than `pytz`. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
This release adds support for 3.14 Signed-off-by: Sarah Monod <smonod1@bloomberg.net>
The `tcl-dev` build dependency used to be optional, and it has recently become required unconditionally. See bloomberg/comdb2@f3ba971 Signed-off-by: Sarah Monod <smonod1@bloomberg.net>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v5...v6) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Not fully draining a cursor is usually a programming error, and we want to avoid it from happening. To that end, alarms have been setup and caught this particular test as being an offender. However, in this specific scenario, we do want to leave the cursor undrained, because this is precisely the behavior that we want to test, especially where it relates to the lifecycle of the underlying connection and garbage collection. Therefore, we are marking this test as a false positive to avoid having the alarm raised for this code. Signed-off-by: Sarah Monod <smonod1@bloomberg.net>
Signed-off-by: Sarah Monod <smonod1@bloomberg.net>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v6...v7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v5...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Sarah Monod <smonod1@bloomberg.net>
This is necessary in order to ensure the packages can be installed in the first place. Signed-off-by: Sarah Monod <smonod1@bloomberg.net>
sarahmonod
force-pushed
the
run-tests
branch
2 times, most recently
from
June 10, 2026 15:58
90e58e5 to
c9f6431
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.