This repository was archived by the owner on May 6, 2026. It is now read-only.
fix: address failing 2D array compliance tests in DateArray#64
Merged
Conversation
test: add a test session with prerelease versions of dependencies
4 tasks
| return DateArray([None, datetime.date(2022, 1, 27)]) | ||
|
|
||
|
|
||
| class Test2DCompat(base.NDArrayBacked2DTests): |
There was a problem hiding this comment.
Note that this class is only one of the base test classes you can inherit from to test compliance (and actually a class that tests functionality (2D aspect of the EA) that is currently not used in pandas).
You probably want to add the others as well (see https://github.com/pandas-dev/pandas/blob/main/pandas/tests/extension/base/__init__.py for the different classes, and https://github.com/pandas-dev/pandas/blob/main/pandas/tests/extension/decimal/test_decimal.py for an example that uses them)
This makes them consistent with other date/time dtypes, as well as internally consistent with the advertised `dtype.na_value`. BREAKING-CHANGE: dbdate and dbtime dtypes return NaT instead of None for missing values Release-As: 0.4.0
5 tasks
test: add a test session with prerelease versions of dependencies
…googleapis/python-db-dtypes-pandas into issue81-pandas-1.5.0-unit-tests
4 tasks
…into issue28-NDArrayBacked2DTests
4 tasks
leahecole
approved these changes
Mar 22, 2022
leahecole
left a comment
There was a problem hiding this comment.
LGTM for style but perhaps someone from @googleapis/api-bigquery should be a final stamp just to make sure all is well from that end
stephaniewang526
approved these changes
Mar 24, 2022
gcf-merge-on-green Bot
pushed a commit
that referenced
this pull request
Mar 24, 2022
🤖 I have created a release *beep* *boop* --- ## [0.4.0](v0.3.1...v0.4.0) (2022-03-24) ### ⚠ BREAKING CHANGES * * fix: address failing compliance tests in DateArray and TimeArray * * fix: address failing compliance tests in DateArray and TimeArray * * fix: address failing compliance tests in DateArray and TimeArray * * fix: address failing compliance tests in DateArray and TimeArray * * fix: address failing compliance tests in DateArray and TimeArray * * fix: address failing compliance tests in DateArray and TimeArray * dbdate and dbtime dtypes return NaT instead of None for missing values ### Features * dbdate and dbtime support numpy.datetime64 values in array constructor ([1db1357](1db1357)) ### Bug Fixes * address failing 2D array compliance tests in DateArray ([#64](#64)) ([b771e05](b771e05)) * address failing tests with pandas 1.5.0 ([#82](#82)) ([38ac28d](38ac28d)) * allow comparison with scalar values ([#88](#88)) ([7495698](7495698)) * avoid TypeError when using sorted search ([#84](#84)) ([42bc2d9](42bc2d9)) * correct TypeError and comparison issues discovered in DateArray compliance tests ([#79](#79)) ([1e979cf](1e979cf)) * dbdate and dbtime support set item with null values ([#85](#85)) ([1db1357](1db1357)) * use `pandas.NaT` for missing values in dbdate and dbtime dtypes ([#67](#67)) ([f903c2c](f903c2c)) * use public pandas APIs where possible ([#60](#60)) ([e9d41d1](e9d41d1)) ### Tests * add dbtime compliance tests ([#90](#90)) ([f14fb2b](f14fb2b)) * add final dbdate compliance tests and sort ([#89](#89)) ([efe7e6d](efe7e6d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
parthea
pushed a commit
to googleapis/google-cloud-python
that referenced
this pull request
Nov 24, 2025
🤖 I have created a release *beep* *boop* --- ## [0.4.0](googleapis/python-db-dtypes-pandas@v0.3.1...v0.4.0) (2022-03-24) ### ⚠ BREAKING CHANGES * * fix: address failing compliance tests in DateArray and TimeArray * * fix: address failing compliance tests in DateArray and TimeArray * * fix: address failing compliance tests in DateArray and TimeArray * * fix: address failing compliance tests in DateArray and TimeArray * * fix: address failing compliance tests in DateArray and TimeArray * * fix: address failing compliance tests in DateArray and TimeArray * dbdate and dbtime dtypes return NaT instead of None for missing values ### Features * dbdate and dbtime support numpy.datetime64 values in array constructor ([1db1357](googleapis/python-db-dtypes-pandas@1db1357)) ### Bug Fixes * address failing 2D array compliance tests in DateArray ([#64](googleapis/python-db-dtypes-pandas#64)) ([b771e05](googleapis/python-db-dtypes-pandas@b771e05)) * address failing tests with pandas 1.5.0 ([#82](googleapis/python-db-dtypes-pandas#82)) ([38ac28d](googleapis/python-db-dtypes-pandas@38ac28d)) * allow comparison with scalar values ([#88](googleapis/python-db-dtypes-pandas#88)) ([7495698](googleapis/python-db-dtypes-pandas@7495698)) * avoid TypeError when using sorted search ([#84](googleapis/python-db-dtypes-pandas#84)) ([42bc2d9](googleapis/python-db-dtypes-pandas@42bc2d9)) * correct TypeError and comparison issues discovered in DateArray compliance tests ([#79](googleapis/python-db-dtypes-pandas#79)) ([1e979cf](googleapis/python-db-dtypes-pandas@1e979cf)) * dbdate and dbtime support set item with null values ([#85](googleapis/python-db-dtypes-pandas#85)) ([1db1357](googleapis/python-db-dtypes-pandas@1db1357)) * use `pandas.NaT` for missing values in dbdate and dbtime dtypes ([#67](googleapis/python-db-dtypes-pandas#67)) ([f903c2c](googleapis/python-db-dtypes-pandas@f903c2c)) * use public pandas APIs where possible ([#60](googleapis/python-db-dtypes-pandas#60)) ([e9d41d1](googleapis/python-db-dtypes-pandas@e9d41d1)) ### Tests * add dbtime compliance tests ([#90](googleapis/python-db-dtypes-pandas#90)) ([f14fb2b](googleapis/python-db-dtypes-pandas@f14fb2b)) * add final dbdate compliance tests and sort ([#89](googleapis/python-db-dtypes-pandas#89)) ([efe7e6d](googleapis/python-db-dtypes-pandas@efe7e6d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Based on #82
test: add a test session with prerelease versions of dependencies
TODO:
Actually test against TimeArraywill do in subsequent PRsFix issues identified by TimeArray failuresFixes #65 🦕
Towards #28