Skip to content

Commit d927323

Browse files
authored
chore(migration): Migrate code from googleapis/python-db-dtypes-pandas into packages/db-dtypes (#16012)
See #11017. This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.
2 parents b3d80f4 + 4b2f7ea commit d927323

50 files changed

Lines changed: 6460 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.librarian/state.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:160860d189ff1c2f7515638478823712fa5b243e27ccc33a2728669fa1e2ed0c
22
libraries:
3+
- id: db-dtypes
4+
version: 1.5.0
5+
last_generated_commit: ""
6+
apis: []
7+
source_roots:
8+
- packages/db-dtypes
9+
preserve_regex: []
10+
remove_regex: []
11+
tag_format: '{id}-v{version}'
312
- id: google-ads-admanager
413
version: 0.8.0
514
last_generated_commit: effe5c4fa816021e724ca856d5640f2e55b14a8b

packages/db-dtypes/.coveragerc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright 2024 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Generated by synthtool. DO NOT EDIT!
18+
[run]
19+
branch = True
20+
omit =
21+
google/__init__.py
22+
db_dtypes/requirements.py
23+
24+
[report]
25+
fail_under = 100
26+
show_missing = True
27+
exclude_lines =
28+
# Re-enable the standard pragma
29+
pragma: NO COVER
30+
# Ignore debug-only repr
31+
def __repr__
32+
# Ignore abstract methods
33+
raise NotImplementedError
34+
omit =
35+
*/gapic/*.py
36+
*/proto/*.py
37+
*/core/*.py
38+
*/site-packages/*.py
39+
db_dtypes/requirements.py

packages/db-dtypes/.flake8

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright 2024 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Generated by synthtool. DO NOT EDIT!
18+
[flake8]
19+
ignore = E203, E231, E266, E501, W503
20+
exclude =
21+
# Exclude generated code.
22+
**/proto/**
23+
**/gapic/**
24+
**/services/**
25+
**/types/**
26+
*_pb2.py
27+
28+
# Standard linting exemptions.
29+
**/.nox/**
30+
__pycache__,
31+
.git,
32+
*.pyc,
33+
conf.py
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "db-dtypes",
3+
"name_pretty": "Pandas Data Types for SQL systems (BigQuery, Spanner)",
4+
"product_documentation": "https://pandas.pydata.org/pandas-docs/stable/ecosystem.html#ecosystem-extensions",
5+
"client_documentation": "https://googleapis.dev/python/db-dtypes/latest/index.html",
6+
"release_level": "stable",
7+
"language": "python",
8+
"library_type": "INTEGRATION",
9+
"repo": "googleapis/google-cloud-python",
10+
"distribution_name": "db-dtypes",
11+
"api_id": "bigquery.googleapis.com",
12+
"default_version": "",
13+
"codeowner_team": "@googleapis/python-core-client-libraries",
14+
"api_description": "Pandas extension data types for data from SQL systems such as BigQuery."
15+
}

packages/db-dtypes/AUTHORS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This is the list of db-dtypes's significant contributors.
2+
#
3+
# This does not necessarily list everyone who has contributed code,
4+
# especially since many employees of one corporation may be contributing.
5+
# To see the full list of contributors, see the revision history in
6+
# source control.
7+
Google LLC
8+
Jim Fulton
9+
Tim Swast (tswast)

packages/db-dtypes/CHANGELOG.md

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
# Changelog
2+
3+
[PyPI History][1]
4+
5+
[1]: https://pypi.org/project/db-dtypes/#history
6+
7+
## [1.5.0](https://github.com/googleapis/google-cloud-python/compare/db-dtypes-v1.4.3...db-dtypes-v1.5.0) (2025-12-15)
8+
9+
10+
### Features
11+
12+
* Add support for Python 3.14 (#380) ([c164a47be909203606cf982d6f0becc6c8efdb09](https://github.com/googleapis/google-cloud-python/commit/c164a47be909203606cf982d6f0becc6c8efdb09))
13+
14+
## [1.4.4](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.4.3...v1.4.4) (2025-09-08)
15+
16+
17+
### Dependencies
18+
19+
* Adds limits to numpy installs under 3.10 for dataproc ([#370](https://github.com/googleapis/python-db-dtypes-pandas/issues/370)) ([6d79280](https://github.com/googleapis/python-db-dtypes-pandas/commit/6d79280f54b662accd80a571412ac0fcae206abb))
20+
21+
## [1.4.3](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.4.2...v1.4.3) (2025-05-12)
22+
23+
24+
### Bug Fixes
25+
26+
* Remove setup.cfg configuration for creating universal wheels ([#333](https://github.com/googleapis/python-db-dtypes-pandas/issues/333)) ([44a5aa2](https://github.com/googleapis/python-db-dtypes-pandas/commit/44a5aa24ef3219849e9e0bedeeaebc4b9ee53d9e))
27+
* Updates noxfile with pip freeze and pandas 1.2 ([#331](https://github.com/googleapis/python-db-dtypes-pandas/issues/331)) ([5eb2a85](https://github.com/googleapis/python-db-dtypes-pandas/commit/5eb2a85acc8292e00eea994e5e5ab54d7d037fda))
28+
29+
30+
### Dependencies
31+
32+
* Drop support for Python 3.7 and 3.8 ([66f3f0b](https://github.com/googleapis/python-db-dtypes-pandas/commit/66f3f0bed9ed0aa317519f039e8623b0715af38e))
33+
* Updates deprecation warning to FutureWarning re: 3.7 and 3.8 ([#338](https://github.com/googleapis/python-db-dtypes-pandas/issues/338)) ([158243b](https://github.com/googleapis/python-db-dtypes-pandas/commit/158243b2e039db108cec3fa395d3391161042c4e))
34+
35+
## [1.4.2](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.4.1...v1.4.2) (2025-03-04)
36+
37+
38+
### Bug Fixes
39+
40+
* Remove unbox json functionality from JSONArrowType ([#325](https://github.com/googleapis/python-db-dtypes-pandas/issues/325)) ([60deef1](https://github.com/googleapis/python-db-dtypes-pandas/commit/60deef1636ba3e4f88725db8b9ce23b634168ac2))
41+
42+
## [1.4.1](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.4.0...v1.4.1) (2025-01-30)
43+
44+
45+
### Bug Fixes
46+
47+
* Re-add ModuleNotFoundError handler for pandas_backports ([#319](https://github.com/googleapis/python-db-dtypes-pandas/issues/319)) ([931ff8a](https://github.com/googleapis/python-db-dtypes-pandas/commit/931ff8a0f15fb376f77954affb48d1c953094dee))
48+
49+
## [1.4.0](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.3.1...v1.4.0) (2025-01-21)
50+
51+
52+
### Features
53+
54+
* Add __hash__ property for JSONArrowType ([#316](https://github.com/googleapis/python-db-dtypes-pandas/issues/316)) ([7073e37](https://github.com/googleapis/python-db-dtypes-pandas/commit/7073e37d1fe76c2078550a8c7f0e45e3fad26809))
55+
* Add Arrow types for efficient JSON data representation in pyarrow ([#312](https://github.com/googleapis/python-db-dtypes-pandas/issues/312)) ([d9992fc](https://github.com/googleapis/python-db-dtypes-pandas/commit/d9992fc6120351cb8ccb2dd86bd57e8097004285))
56+
57+
## [1.3.1](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.3.0...v1.3.1) (2024-11-12)
58+
59+
60+
### Bug Fixes
61+
62+
* Dbjson serialization with most compact JSON representation ([#299](https://github.com/googleapis/python-db-dtypes-pandas/issues/299)) ([c5e9a10](https://github.com/googleapis/python-db-dtypes-pandas/commit/c5e9a101022844e735099d5f2c645ce0cc46f7f8))
63+
* Support correct numpy construction for dbjson dtype in pandas 1.5 ([#297](https://github.com/googleapis/python-db-dtypes-pandas/issues/297)) ([f413f35](https://github.com/googleapis/python-db-dtypes-pandas/commit/f413f3527941fe52af7e19e2954a936bb3de8394))
64+
* Support dbjson type on pandas version 1.5 ([#295](https://github.com/googleapis/python-db-dtypes-pandas/issues/295)) ([4b84e4a](https://github.com/googleapis/python-db-dtypes-pandas/commit/4b84e4a6fada5ecfa7f910dca61e6de714abdb9d))
65+
66+
## [1.3.0](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.2.0...v1.3.0) (2024-08-08)
67+
68+
69+
### Features
70+
71+
* Create db_dtypes JSONDtype and JSONArray ([#284](https://github.com/googleapis/python-db-dtypes-pandas/issues/284)) ([76790a8](https://github.com/googleapis/python-db-dtypes-pandas/commit/76790a8c67ae8fa9687a4e6a6f950b15e6f34c6f))
72+
73+
74+
### Documentation
75+
76+
* Add summary_overview template ([#264](https://github.com/googleapis/python-db-dtypes-pandas/issues/264)) ([a97c341](https://github.com/googleapis/python-db-dtypes-pandas/commit/a97c34198cbed37c8ff8ea683d485ebe36b804d7))
77+
78+
## [1.2.0](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.1.1...v1.2.0) (2023-12-10)
79+
80+
81+
### Features
82+
83+
* Add support for Python 3.12 ([#223](https://github.com/googleapis/python-db-dtypes-pandas/issues/223)) ([1338425](https://github.com/googleapis/python-db-dtypes-pandas/commit/1338425ad765be4613bcf3fcfa7f6ce964de04a3))
84+
85+
86+
### Bug Fixes
87+
88+
* Adds xfail marks to tests that are known to fail ([#189](https://github.com/googleapis/python-db-dtypes-pandas/issues/189)) ([4a56b76](https://github.com/googleapis/python-db-dtypes-pandas/commit/4a56b766b0ccba900a555167863f1081a76c4c0d))
89+
90+
91+
### Documentation
92+
93+
* Update pandas extension link ([#210](https://github.com/googleapis/python-db-dtypes-pandas/issues/210)) ([668988f](https://github.com/googleapis/python-db-dtypes-pandas/commit/668988f0f1c25a9d50a7ad5523933e42553b5210))
94+
95+
## [1.1.1](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.1.0...v1.1.1) (2023-03-30)
96+
97+
98+
### Bug Fixes
99+
100+
* Out-of-bounds datetime.date raises OutOfBoundsDatetime ([#180](https://github.com/googleapis/python-db-dtypes-pandas/issues/180)) ([4f3399e](https://github.com/googleapis/python-db-dtypes-pandas/commit/4f3399e3103c8ad8063b047c7718bcb5621038ca))
101+
102+
## [1.1.0](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.0.5...v1.1.0) (2023-03-29)
103+
104+
105+
### Features
106+
107+
* Support pandas 2.0 release candidate ([#179](https://github.com/googleapis/python-db-dtypes-pandas/issues/179)) ([daa6852](https://github.com/googleapis/python-db-dtypes-pandas/commit/daa685234d283bc2f3c87a6127fd734d8a037ad6))
108+
109+
110+
### Bug Fixes
111+
112+
* Adds bounds checking because pandas now handles microsecond reso… ([#166](https://github.com/googleapis/python-db-dtypes-pandas/issues/166)) ([357a315](https://github.com/googleapis/python-db-dtypes-pandas/commit/357a3156a3eb37eede2edb7fc84e93fe32967f11))
113+
114+
## [1.0.5](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.0.4...v1.0.5) (2022-12-05)
115+
116+
117+
### Dependencies
118+
119+
* remove upper bound on pyarrow version ([388e082](https://github.com/googleapis/python-db-dtypes-pandas/commit/388e082a47d9515a14e20ffd87705c71712087ab))
120+
121+
## [1.0.4](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.0.3...v1.0.4) (2022-09-19)
122+
123+
124+
### Bug Fixes
125+
126+
* Avoid out-of-range nanoseconds field in pandas 1.5.x ([#148](https://github.com/googleapis/python-db-dtypes-pandas/issues/148)) ([2a477ca](https://github.com/googleapis/python-db-dtypes-pandas/commit/2a477ca42033867fbf76f0a818677b04d4d66f8f))
127+
* **deps:** Remove python version upper bound ([#145](https://github.com/googleapis/python-db-dtypes-pandas/issues/145)) ([a361806](https://github.com/googleapis/python-db-dtypes-pandas/commit/a361806026b0358270d101e9eff362d08a971076))
128+
129+
## [1.0.3](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.0.2...v1.0.3) (2022-08-05)
130+
131+
132+
### Bug Fixes
133+
134+
* **deps:** allow pyarrow < 10 ([#130](https://github.com/googleapis/python-db-dtypes-pandas/issues/130)) ([508564f](https://github.com/googleapis/python-db-dtypes-pandas/commit/508564f1b898ec1ad7cae4c826ab3ad4b9a5349e))
135+
* require python 3.7+ ([#125](https://github.com/googleapis/python-db-dtypes-pandas/issues/125)) ([bce01df](https://github.com/googleapis/python-db-dtypes-pandas/commit/bce01dfe92815ea478e1db4166e629062ec5ff97))
136+
137+
## [1.0.2](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.0.1...v1.0.2) (2022-06-03)
138+
139+
140+
### Documentation
141+
142+
* fix changelog header to consistent size ([#111](https://github.com/googleapis/python-db-dtypes-pandas/issues/111)) ([145f875](https://github.com/googleapis/python-db-dtypes-pandas/commit/145f8750682fb007343a57c7c94bc5e7fa5b63ab))
143+
144+
## [1.0.1](https://github.com/googleapis/python-db-dtypes-pandas/compare/v1.0.0...v1.0.1) (2022-05-07)
145+
146+
147+
### Bug Fixes
148+
149+
* **deps:** allow pyarrow v8 ([#109](https://github.com/googleapis/python-db-dtypes-pandas/issues/109)) ([fb30adf](https://github.com/googleapis/python-db-dtypes-pandas/commit/fb30adfd427d3df9919df00b096210ba1eb1b91d))
150+
151+
## [1.0.0](https://github.com/googleapis/python-db-dtypes-pandas/compare/v0.4.0...v1.0.0) (2022-03-25)
152+
153+
154+
### Features
155+
156+
* label package as generally available ([#92](https://github.com/googleapis/python-db-dtypes-pandas/issues/92)) ([0363e87](https://github.com/googleapis/python-db-dtypes-pandas/commit/0363e8725b322881c1fe1e89bdeadd0f67317d22))
157+
158+
## [0.4.0](https://github.com/googleapis/python-db-dtypes-pandas/compare/v0.3.1...v0.4.0) (2022-03-24)
159+
160+
161+
### ⚠ BREAKING CHANGES
162+
163+
* dbdate and dbtime dtypes return NaT instead of None for missing values
164+
165+
### Features
166+
167+
* dbdate and dbtime support numpy.datetime64 values in array constructor ([1db1357](https://github.com/googleapis/python-db-dtypes-pandas/commit/1db1357186b234a28b2ced10174bbd06e2f0ab73))
168+
169+
170+
### Bug Fixes
171+
172+
* address failing 2D array compliance tests in DateArray ([#64](https://github.com/googleapis/python-db-dtypes-pandas/issues/64)) ([b771e05](https://github.com/googleapis/python-db-dtypes-pandas/commit/b771e050acd2bdbf469a97f7477036c159b500f8))
173+
* address failing tests with pandas 1.5.0 ([#82](https://github.com/googleapis/python-db-dtypes-pandas/issues/82)) ([38ac28d](https://github.com/googleapis/python-db-dtypes-pandas/commit/38ac28d8b16f9b86b5029c85e45e9f2e034159b7))
174+
* allow comparison with scalar values ([#88](https://github.com/googleapis/python-db-dtypes-pandas/issues/88)) ([7495698](https://github.com/googleapis/python-db-dtypes-pandas/commit/7495698b3be3b7e8055ae450e24cd0e366b1b72a))
175+
* avoid TypeError when using sorted search ([#84](https://github.com/googleapis/python-db-dtypes-pandas/issues/84)) ([42bc2d9](https://github.com/googleapis/python-db-dtypes-pandas/commit/42bc2d90174d152dfed782acf77016da55dbdaca))
176+
* correct TypeError and comparison issues discovered in DateArray compliance tests ([#79](https://github.com/googleapis/python-db-dtypes-pandas/issues/79)) ([1e979cf](https://github.com/googleapis/python-db-dtypes-pandas/commit/1e979cf360eb586e77b415f7b710a8a41c22e981))
177+
* dbdate and dbtime support set item with null values ([#85](https://github.com/googleapis/python-db-dtypes-pandas/issues/85)) ([1db1357](https://github.com/googleapis/python-db-dtypes-pandas/commit/1db1357186b234a28b2ced10174bbd06e2f0ab73))
178+
* use `pandas.NaT` for missing values in dbdate and dbtime dtypes ([#67](https://github.com/googleapis/python-db-dtypes-pandas/issues/67)) ([f903c2c](https://github.com/googleapis/python-db-dtypes-pandas/commit/f903c2c68da1629241cf3bf37e1226babae669f4))
179+
* use public pandas APIs where possible ([#60](https://github.com/googleapis/python-db-dtypes-pandas/issues/60)) ([e9d41d1](https://github.com/googleapis/python-db-dtypes-pandas/commit/e9d41d17b5d6a7d83c46e2497feb8e314545adcb))
180+
181+
182+
### Tests
183+
184+
* add dbtime compliance tests ([#90](https://github.com/googleapis/python-db-dtypes-pandas/issues/90)) ([f14fb2b](https://github.com/googleapis/python-db-dtypes-pandas/commit/f14fb2bf78d8427b9546db4cdad1d893c1b1e5e1))
185+
* add final dbdate compliance tests and sort ([#89](https://github.com/googleapis/python-db-dtypes-pandas/issues/89)) ([efe7e6d](https://github.com/googleapis/python-db-dtypes-pandas/commit/efe7e6d8953ebf8d2b4d9468c7c92638ea2ec9f9))
186+
187+
## [0.3.1](https://www.github.com/googleapis/python-db-dtypes-pandas/compare/v0.3.0...v0.3.1) (2021-12-04)
188+
189+
190+
### Bug Fixes
191+
192+
* raise ValueError if date is out-of-bounds ([#46](https://www.github.com/googleapis/python-db-dtypes-pandas/issues/46)) ([4253358](https://www.github.com/googleapis/python-db-dtypes-pandas/commit/4253358b673965f7d2823b750f56553f6627e130))
193+
194+
## [0.3.0](https://www.github.com/googleapis/python-db-dtypes-pandas/compare/v0.2.0...v0.3.0) (2021-11-08)
195+
196+
197+
### Features
198+
199+
* support conversion from pyarrow RecordBatch to pandas DataFrame ([#39](https://www.github.com/googleapis/python-db-dtypes-pandas/issues/39)) ([facc7b0](https://www.github.com/googleapis/python-db-dtypes-pandas/commit/facc7b0897e27c5ba99399b7d453818c5b4aeca7))
200+
* support Python 3.10 ([#40](https://www.github.com/googleapis/python-db-dtypes-pandas/issues/40)) ([a31d55d](https://www.github.com/googleapis/python-db-dtypes-pandas/commit/a31d55db57b2f5655b1fee4230a930d5bee4b1c9))
201+
202+
## [0.2.0](https://www.github.com/googleapis/python-db-dtypes-pandas/compare/v0.1.1...v0.2.0) (2021-10-14)
203+
204+
205+
### Features
206+
207+
* rename dbtime and dbdate dtypes to avoid future conflicts with pandas ([#32](https://www.github.com/googleapis/python-db-dtypes-pandas/issues/32)) ([50ea0f7](https://www.github.com/googleapis/python-db-dtypes-pandas/commit/50ea0f798548aa2f0516f6afc93ba6e80cc0e6d9))
208+
209+
210+
### Documentation
211+
212+
* add how-to guide and include API reference ([#33](https://www.github.com/googleapis/python-db-dtypes-pandas/issues/33)) ([878dce4](https://www.github.com/googleapis/python-db-dtypes-pandas/commit/878dce48bd6714706a2a829775ce00e61724fc7a))
213+
214+
## [0.1.1](https://www.github.com/googleapis/python-db-dtypes-pandas/compare/v0.1.0...v0.1.1) (2021-10-04)
215+
216+
217+
### Bug Fixes
218+
219+
* avoid rounding problems with microseconds ([#20](https://www.github.com/googleapis/python-db-dtypes-pandas/issues/20)) ([0ff7371](https://www.github.com/googleapis/python-db-dtypes-pandas/commit/0ff737120344602f49889596b1efa69a6a18a057))
220+
221+
## 0.1.0 (2021-09-29)
222+
223+
224+
### Features
225+
226+
* add `time` and `date` dtypes ([f104171](https://www.github.com/googleapis/python-db-dtypes-pandas/commit/f10417111642e8f5f4b9af790367af930d15a056))
227+
228+
229+
### Bug Fixes
230+
231+
* support converting empty `time` Series to pyarrow Array ([#11](https://www.github.com/googleapis/python-db-dtypes-pandas/issues/11)) ([7675b15](https://www.github.com/googleapis/python-db-dtypes-pandas/commit/7675b157feb842628fa731cc6a472aa9e6b92903))
232+
* support Pandas 0.24 ([#8](https://www.github.com/googleapis/python-db-dtypes-pandas/issues/8)) ([e996883](https://www.github.com/googleapis/python-db-dtypes-pandas/commit/e996883bc9c76fe5f593e9c19a9d2a1c13501f5e))

0 commit comments

Comments
 (0)