release: 2.3.2-rc2 - #248
Conversation
There was a problem hiding this comment.
HackerOne Code Security Review
🟢 Scan Complete: 84 Issue(s)
🟢 Validation Complete: Any Issues detected were validated by one of our engineers. None were determined to require immediate action.
Here's how the code changes were interpreted and info about the tools used for scanning.
📖 Summary of Changes
The update involves a minor release candidate revision (2.3.2-rc1 to 2.3.2-rc2) with significant changes to type handling. The library refactored its type system by replacing `NOT_GIVEN` with `not_given` and introducing `Omit` and `omit`. Changes span multiple files, focusing on improving type hints, parameter handling, and adding deprecation warnings for certain methods. Pydantic dependencies were also updated.| File | Summary |
|---|---|
| .release-please-manifest.json | Version number updated from 2.3.2-rc1 to 2.3.2-rc2, indicating a minor release candidate revision. |
| .stats.yml | The OpenAPI specification URL and associated hashes have been updated, indicating a new version of the specification with different content and configuration. |
| CHANGELOG.md | The changelog shows updates to the library, including manual API updates, internal improvements to pydantic compatibility, type handling changes, and minor chores like updating dependencies and configuration. The primary changes are in API methods, type definitions, and internal tooling. |
| pyproject.toml | The version number was updated from "2.3.2-rc1" to "2.3.2-rc2" in the project metadata section, with no other changes observed in the file. |
| requirements-dev.lock | The lockfile was updated with version changes for pydantic and pydantic-core, and a new dependency typing-inspection was added to the typing-extensions section. |
| requirements.lock | The lockfile was updated with changes to pydantic versions (2.10.3 to 2.11.9 and pydantic-core 2.27.1 to 2.33.2), and a new dependency typing-inspection was added. |
| scripts/bootstrap | The script now includes an interactive prompt for Homebrew dependency installation on macOS, with an added option to skip installation via the SKIP_BREW environment variable and an interactive confirmation check. |
| src/writerai/init.py | Added not_given and omit to imported types from _types and included them in the __all__ list, expanding the available utility functions for type handling. |
| src/writerai/_base_client.py | The primary changes in this file involve replacing NOT_GIVEN with not_given in multiple locations, which appears to be a renaming of a constant. This change is consistent throughout the file, affecting import statements, method signatures, and default parameter values. |
| src/writerai/_client.py | The changes include removing the Union import, replacing NOT_GIVEN with not_given, and modifying the timeout parameter type hints to use not_given instead of NOT_GIVEN in both Writer and AsyncWriter classes. |
| src/writerai/_models.py | The changes include updates to the model_dump and model_dump_json methods in the Pydantic V1 compatibility layer, adding support for additional parameters like by_alias with a default of False and new parameters like fallback which raise a ValueError. |
| src/writerai/_qs.py | The changes involve replacing NOT_GIVEN with not_given and modifying type hints for array_format and nested_format parameters to use a union with NotGiven instead of the previous NotGivenOr type. |
| src/writerai/_types.py | The changes include updating the NotGiven class docstring, introducing a new not_given variable, adding an omit variable, and slightly modifying the comments and documentation for the NotGiven and Omit classes. |
| src/writerai/_utils/_transform.py | The changes include a minor text modification in comments, replacing "we don't need to include NotGiven values" with "we don't need to include omitted values" in two locations within the async and sync transform methods. |
| src/writerai/_utils/_utils.py | The changes include adding support for the Omit type in the is_given() function and modifying its type signature to handle Omit alongside NotGiven. The import for Omit was also added to the import statement from _types. |
| src/writerai/_version.py | The version number was updated from "2.3.2-rc1" to "2.3.2-rc2" in the version attribute, indicating a minor release candidate revision. |
| src/writerai/lib/_parsing/_completions.py | The changes involve replacing NOT_GIVEN with Omit and omit, which appear to be new type and value imports. The functionality and structure of the code remain largely unchanged, with only type-related substitutions throughout the file. |
| src/writerai/lib/streaming/chat/_completions.py | The primary change is replacing NotGiven with Omit throughout the file, which appears to be a type-related modification. The code structure and functionality remain largely unchanged. |
| src/writerai/resources/applications/applications.py | The file has been updated to replace NOT_GIVEN with not_given and introduce a new Omit type, which appears to be a refactoring of how optional parameters are handled in the library's type system. |
| src/writerai/resources/applications/graphs.py | The file was updated to replace NOT_GIVEN with not_given in import and type hint contexts, and remove an unused import of NOT_GIVEN. The core functionality and structure of the code remain unchanged. |
| src/writerai/resources/applications/jobs.py | The file has been updated to replace NOT_GIVEN with not_given and add new imports for Omit and omit. The changes also modify some method signatures to use Omit instead of NotGiven for optional parameters like limit, offset, and status. |
| src/writerai/resources/chat.py | The file has been updated to replace NOT_GIVEN with omit and is_given(tools) instead of tools is not NOT_GIVEN. These changes appear to be related to improving type handling and parameter omission in the library's chat resource implementation. |
| src/writerai/resources/completions.py | The file has been updated to replace NOT_GIVEN with omit and not_given in type hints and default parameter values, and to import these new constants from the types module. |
| src/writerai/resources/files.py | The changes include replacing NOT_GIVEN with not_given and adding Omit and omit imports and usage in method signatures, particularly in the list method parameters for both sync and async classes. |
| src/writerai/resources/graphs.py | The changes involve replacing NOT_GIVEN with omit and not_given in type hints and function signatures, and updating import statements to include these new types. The core functionality and structure of the code remain largely unchanged. |
| src/writerai/resources/models.py | The file changes include replacing NOT_GIVEN with not_given in import and method signatures, and removing the explicit import of NOT_GIVEN from .._types. The core functionality and structure of the file remain unchanged. |
| src/writerai/resources/tools/comprehend.py | The file has been updated with a deprecation decorator for the medical method in both sync and async classes, added type ignore comments for deprecated methods, and replaced NOT_GIVEN with not_given. The changes primarily relate to method deprecation and minor import adjustments. |
| src/writerai/resources/tools/tools.py | The file has been updated with deprecation warnings for several methods using typing_extensions.deprecated decorator. Changes include adding deprecation messages to ai_detect, context_aware_splitting, parse_pdf, and web_search methods, and adding pyright ignore comments for deprecated method handling. |
| src/writerai/resources/translation.py | The file has been updated with a deprecation decorator for the translate method in both sync and async resources, suggesting the method will be removed in a future release and recommending migration to a different translation approach. |
| src/writerai/resources/vision.py | The changes include replacing NOT_GIVEN with not_given in import and method signatures for both synchronous and asynchronous vision resource classes, while maintaining the overall structure and functionality of the file. |
| src/writerai/types/shared/graph_data.py | The file has been updated to include new classes: ReferencesFile, ReferencesWeb, and References. The GraphData class now includes a new optional references attribute. Additional import and type annotations were added, and docstrings were expanded for better clarity. |
| src/writerai/types/shared_params/graph_data.py | The updated file introduces new TypedDict classes for References, including ReferencesFile and ReferencesWeb, and adds a references field to the GraphData class. The changes expand source tracking capabilities with more detailed metadata about file and web-based references. |
ℹ️ Issues Detected
NOTE: These may not require action!
Below are unvalidated results from the Analysis Tools that ran during the latest scan for transparency. We investigate each of these for accuracy and relevance before surfacing them as a potential problem.
How will I know if something is a problem?
When validation completes, any concerns that warrant attention prior to merge will be posted as inline comments. These will show up in 2 ways:
- Expert review (most cases): Issues will be posted by experts who manually reviewed and validated them. These are real HackerOne engineers (not bots) reviewing through an integrated IDE-like tool. You can communicate with them like any other reviewer. They'll stay assigned and get notified with commit & comment updates.
- Automatically: In cases where our validation checks have highest confidence the problem is legitimate and urgent. These will include a description of contextual reasoning why & actionable next steps.
| File & Line | Issue |
|---|---|
src/writerai/lib/streaming/chat/_completions.py Line 306 |
self._rich_response_format: type |
src/writerai/lib/streaming/chat/_completions.py Line 302 |
self.__choice_event_states: list[ChoiceEventState] is a built-in function and should be avoided as a variable name. Using language-provided function names as variable names can complicate future development since any attempt to call that specific function within this scope may result in unintended behaviors. |
tests/api_resources/test_tools.py Line 256 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_translation.py Line 126 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/tools/test_comprehend.py Line 85 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 92 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 356 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 220 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 231 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/tools/test_comprehend.py Line 97 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 366 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 236 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 268 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 43 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_translation.py Line 110 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 357 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_translation.py Line 50 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/tools/test_comprehend.py Line 53 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 312 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 219 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 294 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 307 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_translation.py Line 109 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_tools.py Line 136 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
tests/api_resources/test_translation.py Line 51 |
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. |
🧰 Analysis tools
- [ ✅ ] [HackerOne AI Code Analysis](https://www.pullrequest.com/blog/harnessing-ai-to-pinpoint-security-hotspots-in-code-review-a-deep-dive/) - [ ✅ ] [HackerOne AI Code Validation](https://www.hackerone.com/blog/ai-triage-code-validation-security) - [ ✅ ] [semgrep](https://semgrep.dev?&utm_source=hackerone&utm_campaign=pullrequest) - [ ✅ ] rubocop - [ ✅ ] bandit⏱️ Latest scan covered changes up to commit acedbfe (latest)
There was a problem hiding this comment.
✅ Graham C reviewed all the included code changes and associated automation findings and determined that there were no immediately actionable security flaws. Note that they will continue to be notified of any new commits or comments and follow up as needed throughout the duration of this pull request's lifecycle.
Reviewed with ❤️ by PullRequest
3b1dcf9 to
8fa6786
Compare
8fa6786 to
9fb0a57
Compare
9fb0a57 to
1fe9201
Compare
1fe9201 to
045d441
Compare
045d441 to
28fb6c0
Compare
28fb6c0 to
c86c2c6
Compare
Release version edited manuallyThe Pull Request version has been manually set to If you instead want to use the version number |
c86c2c6 to
7172ba1
Compare
7172ba1 to
35f063d
Compare
35f063d to
acedbfe
Compare
|
🤖 Release is at https://github.com/writer/writer-python/releases/tag/v2.3.2-rc2 🌻 |
Automated Release PR
2.3.2-rc2 (2025-10-01)
Full Changelog: v2.3.2-rc1...v2.3.2-rc2
Features
Chores
Documentation
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions