Skip to content

Commit daced80

Browse files
authored
Merge branch 'main' into jrose_snow_1878542_python_3_12
2 parents f268cb5 + 9d430e4 commit daced80

File tree

698 files changed

+1587
-1199
lines changed

Some content is hidden

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

698 files changed

+1587
-1199
lines changed

.github/workflows/daily_precommit.yml

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -577,75 +577,6 @@ jobs:
577577
.tox/.coverage
578578
.tox/coverage.xml
579579
580-
test-snowpark-disable-multithreading-mode:
581-
name: Test Snowpark Multithreading Disabled py-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
582-
needs: build
583-
runs-on: ${{ matrix.os }}
584-
strategy:
585-
fail-fast: false
586-
matrix:
587-
os: [ubuntu-latest-64-cores]
588-
python-version: ["3.9"]
589-
cloud-provider: [aws]
590-
steps:
591-
- name: Checkout Code
592-
uses: actions/checkout@v4
593-
- name: Set up Python
594-
uses: actions/setup-python@v4
595-
with:
596-
python-version: ${{ matrix.python-version }}
597-
- name: Display Python version
598-
run: python -c "import sys; print(sys.version)"
599-
- name: Decrypt parameters.py
600-
shell: bash
601-
run: .github/scripts/decrypt_parameters.sh
602-
env:
603-
PARAMETER_PASSWORD: ${{ secrets.PARAMETER_PASSWORD }}
604-
CLOUD_PROVIDER: ${{ matrix.cloud-provider }}
605-
- name: Install protoc
606-
shell: bash
607-
run: .github/scripts/install_protoc.sh
608-
- name: Download wheel(s)
609-
uses: actions/download-artifact@v4
610-
with:
611-
name: wheel
612-
path: dist
613-
- name: Show wheels downloaded
614-
run: ls -lh dist
615-
shell: bash
616-
- name: Upgrade setuptools, pip and wheel
617-
run: python -m pip install -U setuptools pip wheel
618-
- name: Install tox
619-
run: python -m pip install tox
620-
- name: Run tests (excluding doctests)
621-
run: python -m tox -e "py${PYTHON_VERSION/\./}-notmultithreaded-ci"
622-
env:
623-
PYTHON_VERSION: ${{ matrix.python-version }}
624-
cloud_provider: ${{ matrix.cloud-provider }}
625-
PYTEST_ADDOPTS: --color=yes --tb=short
626-
TOX_PARALLEL_NO_SPINNER: 1
627-
shell: bash
628-
- name: Run local tests
629-
run: python -m tox -e "py${PYTHON_VERSION/\./}-localnotmultithreaded-ci"
630-
env:
631-
PYTHON_VERSION: ${{ matrix.python-version }}
632-
cloud_provider: ${{ matrix.cloud-provider }}
633-
PYTEST_ADDOPTS: --color=yes --tb=short
634-
TOX_PARALLEL_NO_SPINNER: 1
635-
shell: bash
636-
- name: Combine coverages
637-
run: python -m tox -e coverage --skip-missing-interpreters false
638-
shell: bash
639-
env:
640-
SNOWFLAKE_IS_PYTHON_RUNTIME_TEST: 1
641-
- uses: actions/upload-artifact@v4
642-
with:
643-
include-hidden-files: true
644-
name: coverage_${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}-snowpark-multithreading
645-
path: |
646-
.tox/.coverage
647-
.tox/coverage.xml
648-
649580
combine-coverage:
650581
if: ${{ success() || failure() }}
651582
name: Combine coverage

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
#### Improvements
2020

2121
- Updated README.md to include instructions on how to verify package signatures using `cosign`.
22+
- Added an option `keep_column_order` for keeping original column order in `DataFrame.with_column` and `DataFrame.with_columns`.
2223

2324
#### Bug Fixes
2425

2526
- Fixed a bug in local testing mode that caused a column to contain None when it should contain 0
26-
- Fixed a bug in StructField.from_json that prevented TimestampTypes with tzinfo from being parsed correctly.
27+
- Fixed a bug in `StructField.from_json` that prevented TimestampTypes with tzinfo from being parsed correctly.
28+
- Fixed a bug in function `date_format` that caused an error when the input column was date type or timestamp type.
2729

2830
### Snowpark pandas API Updates
2931

@@ -49,6 +51,7 @@
4951
- %X: Locale’s appropriate time representation.
5052
- %%: A literal '%' character.
5153
- Added support for `Series.between`.
54+
- Added support for `include_groups=False` in `DataFrameGroupBy.apply`.
5255

5356
#### Bug Fixes
5457

@@ -59,8 +62,9 @@
5962
- Updated integration testing for `session.lineage.trace` to exclude deleted objects
6063
- Added documentation for `DataFrame.map`.
6164
- Improve performance of `DataFrame.apply` by mapping numpy functions to snowpark functions if possible.
62-
- Added documentation on the extent of Snowpark pandas interoperability with scikit-learn
65+
- Added documentation on the extent of Snowpark pandas interoperability with scikit-learn.
6366
- Infer return type of functions in `Series.map`, `Series.apply` and `DataFrame.map` if type-hint is not provided.
67+
- Added `call_count` to telemetry that counts method calls including interchange protocol calls.
6468

6569
## 1.26.0 (2024-12-05)
6670

docs/source/modin/supported/groupby_supported.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Function application
3939
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
4040
| ``apply`` | P | ``axis`` other than 0 is not | ``Y`` if the following are true, otherwise ``N``: |
4141
| | | implemented. | - ``func`` is a callable that always returns |
42-
| | | ``include_groups = False`` is | either a pandas DataFrame, a pandas Series, or |
43-
| | | not implemented. | objects that are neither DataFrame nor Series. |
42+
| | | | either a pandas DataFrame, a pandas Series, or |
43+
| | | | objects that are neither DataFrame nor Series. |
4444
| | | | - grouping on axis=0 |
4545
| | | | - Not applying transform to a dataframe with a |
4646
| | | | non-unique index |

license_header.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved.
2+
Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
33

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[build-system]
2+
requires = [
3+
"setuptools",
4+
"protoc-wheel-0==21.1", # Protocol buffer compiler for Snowpark IR
5+
"mypy-protobuf", # used in generating typed Python code from protobuf for Snowpark IR
6+
]
7+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@
5858
"graphviz", # used in plot tests
5959
"pytest-assume", # sql counter check
6060
"decorator", # sql counter check
61-
"protoc-wheel-0==21.1", # Protocol buffer compiler, for Snowpark IR
62-
"mypy-protobuf", # used in generating typed Python code from protobuf for Snowpark IR
6361
"lxml", # used in read_xml tests
62+
"tox", # used for setting up testing environments
6463
]
6564

6665
# read the version

src/conftest.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,27 @@ def pytest_runtest_makereport(item, call):
4141
return tr
4242

4343

44+
# These tests require python packages that are no longer built for python 3.8
45+
PYTHON_38_SKIPS = {
46+
"snowpark.session.Session.replicate_local_environment",
47+
"snowpark.session.Session.table_function",
48+
}
49+
50+
DocTestFinder = doctest.DocTestFinder
51+
52+
53+
class CustomDocTestFinder(DocTestFinder):
54+
def _find(self, tests, obj, name, module, source_lines, globs, seen):
55+
if name in PYTHON_38_SKIPS and sys.version_info < (3, 9):
56+
return
57+
return DocTestFinder._find(
58+
self, tests, obj, name, module, source_lines, globs, seen
59+
)
60+
61+
62+
doctest.DocTestFinder = CustomDocTestFinder
63+
64+
4465
# scope is module so that we ensure we delete the session before
4566
# moving onto running the tests in the tests dir. Having only one
4667
# session is important to certain UDF tests to pass , since they

src/snowflake/snowpark/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
#
3-
# Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved.
3+
# Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
44
#
55

66
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#
2-
# Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved.
2+
# Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
33
#
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#
2-
# Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved.
2+
# Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
33
#

0 commit comments

Comments
 (0)