Releases: civisanalytics/civis-python
Releases · civisanalytics/civis-python
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
retries
has been added tocivis.APIClient
so that
atenacity.Retrying
instance 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 newdescription
keyword argument for the newdescription
attribute
of Civis file objects. (#498, #500) Response
objects are now fully typed through the attribute syntax. (#501)- Both
Response
andPaginatedResponse
are now directly available under thecivis
namespace. (#501) - Added support for Python 3.13. (#501)
- Added the new property
default_database_credential_id
atcivis.APIClient
,
which is going to replace the existingdefault_credential
. (#502)
Changed
- When a
PaginatedResponse
object is returned from an API call,
a user-specifiedlimit
kwarg is now honored to facilitate speeding up the pagination. (#501)
Deprecated
- The method
get_database_credential_id
atcivis.APIClient
has been deprecated
and will be removed at civis-python v3.0.0. There's no replacement for this method. (#502) - The property
default_credential
atcivis.APIClient
has 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
Response
objects 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
Response
object 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
Response
object instantiation, an API response that represents a JSONValue object
now has itsvalue
attribute 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_arguments
to thecivis.io.*
functions that
accept a SQL query, so that the user can run a parameterized SQL script. (#493)
Changed
- Refactored the
civis.parallel
module 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.TransportableException
andjoblib.format_stack.format_exc
,
as well as the substantial changes to the internals ofjoblib.Parallel
). (#488) - Bumped the minimum required version of
joblib
to v1.3.0,
which is the version wherejoblib.parallel_config
was introduced and
joblib.parallel_backend
was deprecated. (#488) - Improved the startup time of
import civis
with a 5x speed boost. (#490, #493) - The downloaded API spec due to the
civis.APIClient
instantiation 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
Response
object with a non-Response
object returnsFalse
now
(this previously raised aTypeError
). (#493)
Fixed
- Fixed
civis.parallel.make_backend_template_factory
so that
keyword arguments are now accepted and passed toclient.scripts.post_custom
. (#488) - For
Response
objects, their "repr" form shows the class name "Response" for both
top-level and nested response objects. (#493)
Security
- Bumped the minimum required version of
requests
to the latest v2.32.3,
due to a security vulnerability for < v2.32.0
(CVE-2024-35195). (#488)
v2.2.0
v2.1.0
Added
- Added
.json()
atcivis.response.Response
to return the original JSON data from Civis API. (#486)
Changed
- Updated the Civis API spec. (#486)
Fixed
- Fixed
civis.response.Response
so that keys that shouldn't be mutated for casing,
specifically those under"arguments"
, are now kept unchanged. (#486)
v2.0.0
Breaking Changes from v1.x.x to v2.0.0
(Changes documented in this section are not repeated in the following sections.)
- A
civis.response.Response
object is no longer mutable.
More concretely, both the "setitem" (e.g.,response["foo"] = "bar"
)
and "setattr" (e.g.,response.foo = "bar"
) operations
would now raise anCivisImmutableResponseError
exception. (#463) - Instantiating a
civis.response.Response
object no longer
accepts the booleansnake_case
keyword argument;
snake-case keys at aResponse
object are now always available (and preferred). (#463) - Parameters for various classes/functions that have long been deprecated are removed:
api_key
,resources
,retry_total
,archive
,headers
.
Also dropped the deprecated methods inServiceClient
. (#472) - The
return_type
parameter of acivis.response.Response
object
no longer has the"pandas"
option. (#473) - When
civis.find
uses kwargs as filters, boolean values are now treated in the same
way as other data types for value equality comparison, rather than the presence or
absence of the key in question. (#474) - To access the API endpoints "MatchTargets" and "RemoteHosts" via
client = civis.APIClient()
,
client.matchtargets
andclient.remotehosts
are no longer available.
Only the names with underscores, i.e.,client.match_targets
andclient.remote_hosts
,
can be used instead. (#479)
Added
- Added error handling of file_id with type string passed to
civis.io.civis_file_to_table
. (#454) - Added support for Python 3.10, 3.11, and 3.12 (#462, #475)
- A
FutureWarning
is now raised when a deprecated Civis API endpoint method is called. (#477) - Added
civis_logger
for logging in Civis Platform scripts. (#478) - Added the stub file
client.pyi
to surface the API endpoints and their type annotations
at acivis.APIClient
instance to IDEs. (#479) - Added the
job_url
property toCivisFuture
objects. (#482) - Added
.readthedocs.yaml
to configure the ReadTheDocs build. (#483)
Changed
- Updated references from 'master' to 'main' (#460)
- Clarified the usage example for
civis.io.civis_to_multifile_csv
. Updated
CircleCI config so dev-requirements is only used when needed. (#452) - Removed unneeded
time.sleep
calls andpytest.mark
calls and mockedtime.sleep
calls to optimize tests. (#453) - Refactored tests to remove dependency on the vcr library. (#456)
- Fixed typo in "Testing Your Code" example of the User Guide (#458)
- Adding
try
-except
to catchJSONDecodeErrors
inCivisAPIError
(#459) civis.io.file_id_from_run_output
now works for all job types (#461)- A nested
civis.response.Response
object now supports both snake-case and camel-case
for key access. Previously, only the non-Pythonic camel-case keys were available. (#463) - Pinned the dependency
joblib
at< 1.3.0
, sincejoblib >= 1.3.0
is incompatible
with the current civis-python codebase. (#469) - Changed
civis.io.civis_file_to_table
to not rely on table IDs for determining a table's existence (#470) - Broke out the "API Resources" documentation page into individual endpoint pages (#471)
- Switched to
pyproject.toml
for packaging. (#475) - CI builds for Windows switched from AppVeyor to CircleCI. (#480)
- Applied the
black
code formatter to the codebase. (#481)