Releases: civisanalytics/civis-python
Releases · civisanalytics/civis-python
v2.7.1
v2.7.0
v2.6.0
Added
- Added the keyword argument
clienttocivis.utils.job_logs(). (#518) - Implemented
ListResponseas a list ofcivis.Responseobjects that has "headers"
information from a Civis API call. (#518) - The
civis.io.*functions for dataframes support polars in addition to pandas. (#515)- For
civis.io.read_civis_sqlandcivis.io.read_civis:
The new kwargreturn_ashas been added. It defaults to"list"to maintain
the same return behavior as civis-python <= v2.5.0.
To return a dataframe, setreturn_asto either"pandas"or"polars". - For
civis.io.dataframe_to_fileandcivis.io.dataframe_to_civis:
Either a pandas or polars dataframe can now be directly used as input. - For
civis.io.file_to_dataframe:
The new kwargreturn_ashas been added. It defaults to"pandas"to maintain
the same return behavior as civis-python <= v2.5.0.
To return a polars dataframe, setreturn_asto"polars".
- For
- Added examples to
civis.utils.job_logs()docstring (#510)
Changed
- Updated Civis parallel backend's internals for refactored joblib's backend. (#513)
- Updated the Sphinx docs for
ListResponseand the Civis API. (#519)
Deprecated
- The kwarg
use_pandasatcivis.io.read_civis_sqlandcivis.io.read_civis
has been deprecated and will be removed at civis-python v3.0.0 (no release timeline yet).
Its continued usage is discouraged, and please use the new kwargreturn_asinstead
(see notes under the "added" section above). - The property
feature_flagsat acivis.APIClientinstance is now deprecated.
client.users.list_me()["feature_flags"]should be used instead. (#516)
Fixed
- Switched from a pool to the concurrent.futures API in the file multipart upload
implementation. (#520) - Fixed
civis_loggerfor needing a user-provided__name__as best practice. (#512)
Security
- Updated
docs/requirements.txtdue to a security advisory for jinja2. See GHSA-cpwx-vrp4-4pq7 (#510)
v2.5.0
v2.4.3
v2.4.2
Changed
- Refactored
docs/since thedocs/source/subdirectory is no longer needed. (#506)
Fixed
- Fixed the tool for checking if the upstream Civis API spec has changed. (#505)
Security
- In docs build, bumped the transitive dependency
jinja2's version from 3.1.4 to 3.1.5,
due to CVE-2024-56326. (#506)
v2.4.1
v2.4.0
Added
- The new kwarg
retrieshas been added tocivis.APIClientso that
atenacity.Retryinginstance can be provided to customize retries. (#495) - Added
civis.workflows.validate_workflow_yaml
to validate a Civis Platform workflow YAML definition. (#497, #499) - The helper I/O functions that create a Civis file
(i.e.,civis.io.file_to_civis,civis.io.dataframe_to_file, andcivis.io.json_to_file)
accept a newdescriptionkeyword argument for the newdescriptionattribute
of Civis file objects. (#498, #500) Responseobjects are now fully typed through the attribute syntax. (#501)- Both
ResponseandPaginatedResponseare now directly available under thecivisnamespace. (#501) - Added support for Python 3.13. (#501)
- Added the new property
default_database_credential_idatcivis.APIClient,
which is going to replace the existingdefault_credential. (#502)
Changed
- When a
PaginatedResponseobject is returned from an API call,
a user-specifiedlimitkwarg is now honored to facilitate speeding up the pagination. (#501)
Deprecated
- The method
get_database_credential_idatcivis.APIClienthas been deprecated
and will be removed at civis-python v3.0.0. There's no replacement for this method. (#502) - The property
default_credentialatcivis.APIClienthas been deprecated
and will be removed at civis-python v3.0.0,
in favor of the new propertydefault_database_credential_id. (#502)
Removed
- Dropped support for Python 3.9. (#499)
Fixed
- The repr form of
Responseobjects is now the dict-basedResponse({‘spam’: 123})
instead of the dataclass-basedResponse(spam=123), since response object keys can
be invalid Python identifiers. (#501) - In
Responseobject instantiation, object keys that originate from environment variables
are now preserved for their (customarily upper-) case even in the default snake-case setting. (#501) - In
Responseobject instantiation, an API response that represents a JSONValue object
now has itsvalueattribute unmodified as the Python object representation
of the deserialized JSON form (as opposed to being converted to aResponse-based form). (#501)
v2.3.0
Added
- Added a script for checking if the Civis API spec is up-to-date. (#489)
- Added a new keyword argument
sql_params_argumentsto thecivis.io.*functions that
accept a SQL query, so that the user can run a parameterized SQL script. (#493)
Changed
- Refactored the
civis.parallelmodule and related unit tests due to major changes
of joblib from v1.2.0 to v1.3.0 (API-breaking changes for dropping
joblib.my_exceptions.TransportableExceptionandjoblib.format_stack.format_exc,
as well as the substantial changes to the internals ofjoblib.Parallel). (#488) - Bumped the minimum required version of
joblibto v1.3.0,
which is the version wherejoblib.parallel_configwas introduced and
joblib.parallel_backendwas deprecated. (#488) - Improved the startup time of
import civiswith a 5x speed boost. (#490, #493) - The downloaded API spec due to the
civis.APIClientinstantiation is now
a time-to-live cache in memory (15 minutes for interactive Python, or 24 hours in scripts). (#491) - Polling at
PollableResult(and consequently its subclasses as well:CivisFuture,
ContainerFuture, andModelFuture) now defaults to geometrically increased polling
intervals. Short-running jobs'future.result()can now return faster, while
longer-running jobs have a capped polling interval of 15 seconds. (#492) - Comparing a
Responseobject with a non-Responseobject returnsFalsenow
(this previously raised aTypeError). (#493)
Fixed
- Fixed
civis.parallel.make_backend_template_factoryso that
keyword arguments are now accepted and passed toclient.scripts.post_custom. (#488) - For
Responseobjects, their "repr" form shows the class name "Response" for both
top-level and nested response objects. (#493)
Security
- Bumped the minimum required version of
requeststo the latest v2.32.3,
due to a security vulnerability for < v2.32.0
(CVE-2024-35195). (#488)