Civis

Latest version: v2.3.0

Safety actively analyzes 641049 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

2.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 the `civis.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` and `joblib.format_stack.format_exc`,
as well as the substantial changes to the internals of `joblib.Parallel`). (488)
- Bumped the minimum required version of `joblib` to v1.3.0,
which is the version where `joblib.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`, and `ModelFuture`) 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 returns `False` now
(this previously raised a `TypeError`). (493)

Fixed
- Fixed `civis.parallel.make_backend_template_factory` so that
keyword arguments are now accepted and passed to `client.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](https://nvd.nist.gov/vuln/detail/CVE-2024-35195)). (#488)

2.2.0

Not secure
Added
- `civis.response.Response` has its own "repr" and pretty-print format,
instead of the previous dict-like representation that would incorrectly suggest immutability. (487)
- Added the `--version` flag to the command line interface. (487)

Fixed
- Fixed API response objects' `.json()` for lists. (487)
- Fixed `civis_logger` for always having the attribute `propagate` attribute set to `False`
so that it can also be used for notebooks and services/apps on Civis Platform. (487)

2.1.0

Not secure
Added
- Added `.json()` at `civis.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)

2.0.0

Not secure
(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 an `CivisImmutableResponseError` exception. (463)
- Instantiating a `civis.response.Response` object no longer
accepts the boolean `snake_case` keyword argument;
snake-case keys at a `Response` 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 in `ServiceClient`. (472)
- The `return_type` parameter of a `civis.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` and `client.remotehosts` are no longer available.
Only the names with underscores, i.e., `client.match_targets` and `client.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 a `civis.APIClient` instance to IDEs. (479)
- Added the `job_url` property to `CivisFuture` 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 and `pytest.mark` calls and mocked `time.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 catch `JSONDecodeErrors` in `CivisAPIError` (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`, since `joblib >= 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)

Removed
- Dropped support for Python 3.7 and 3.8 (462, 475)

Security
- Added the `pip-audit` check to CI
for potential security vulnerabilities of Python dependencies. (476, 485)

1.16.1

Not secure
Changed
- Changed `civis.io.civis_file_to_table` to not rely on table IDs for determining a table's existence (464)

1.16.0

Not secure
Added
- Added documentation around testing code using mocking (447)
- Added the type of `civis.response.Response` and `civis.response.PaginatedResponse`
returned in the API resources documentation (438)
- Added job ID and run ID as custom headers in API calls (437)
- Added support for Python 3.9 (436)
- Added job ID and run ID to the exception message of `CivisJobFailure`
coming from a `CivisFuture` object (426)
- Added the `encoding` parameter to both `civis.io.read_civis` and `civis.io.read_civis_sql`,
so that these two functions can retrieve non-UTF-8 data when `use_pandas` is `False`. (424)
- `ContainerFuture` propagates error messages from logs (416)
- Added EmptyResultError to `civis.io.read_civis` docs (412)
- Added default values from swagger in client method's signature (417)

Changed
- Added a warning message when using `civis.io.file_to_civis` with file size of 0 bytes (451)
- Specified that `civis.io.civis_file_to_table` can handle compressed files (450)
- Explicitly stated CSV-like civis file format requirement in
`civis.io.civis_file_to_table`'s docstring (445)
- Called out the fact that `joblib.Parallel`'s `pre_dispatch` defaults to `"2*n_jobs"`
in the Sphinx docs (443)
- Updated `civis_api_spec.json`, moved it to under `civis/resources/`, and checked in
a script to facilitate updating it again (440, 441)
- Bumped version numbers for dependencies to allow their latest major releases (436)
- Switched from TravisCI to CircleCI (432)
- Moved the changes from 416 for propagating error messages
from `ContainerFuture` to `CivisFuture` (426)
- Updated the docstrings for `file_to_civis` (for `buf` and `expires_at`),
`dataframe_to_file` (for `expires_at`), and `json_to_file` (for `expires_at`). (427)
- Ability to use joblib 1.1.x (429)

Fixed
- Relaxed SQL type checking in `civis.io.civis_file_to_table` by casting to `VARCHAR`
when type inconsistency is detected for a given column and at least one input file
has `VARCHAR` (439)
- Updated info about MacOS shell configuration file to be `~/.zshrc` (444)
- Fixed the Sphinx docs to show details of multi-word API endpoints (442)
- Dropped the buggy/unnecessary `_get_headers` in `civis.io.read_civis_sql` (415)
- Clarified the `table_columns` parameter in `civis.io.*` functions (434)
- Warned about the `retry_total` parameter of `civis.APIClient` being inactive and deprecated (431)
- Converted `assert` statements in non-test code into proper error handling (430, 435)
- Handled the index-out-of-bounds error when CSV preprocessing fails in `civis_file_to_table`
by raising a more informative exception (428)
- Corrected camel to snake case for "sql_type" in `io` docstrings, and added an input check to catch misspellings in the `table_columns` input (419).

Removed
- Dropped support for Python 3.6 (436)
- Removed no-longer-used PubNub code (425)
- Removed no-longer-supported Python 2 option for notebook creation in the CLI (421)

Security
- Turned on `safety` and `bandit` checks at CircleCI builds (446)

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.