Title: Remove `mergedeep` dependency by Copilot · Pull Request #1437 · usethis-python/usethis-python · GitHub
Open Graph Title: Remove `mergedeep` dependency by Copilot · Pull Request #1437 · usethis-python/usethis-python
X Title: Remove `mergedeep` dependency by Copilot · Pull Request #1437 · usethis-python/usethis-python
Description: mergedeep has been unmaintained since 2021. The only usage was 4 calls to mergedeep.merge() (default Strategy.REPLACE) in the TOML and YAML file I/O modules. Changes pyproject.toml: Removed mergedeep>=1.3.4 from dependencies src/usethis/_file/merge.py: New module containing a single _deep_merge helper using collections.abc.MutableMapping, replacing the mergedeep dependency src/usethis/_file/toml/io_.py and src/usethis/_file/yaml/io_.py: Import _deep_merge from usethis._file.merge .importlinter: Added merge to the _file layers to satisfy exhaustive = true tests/usethis/_file/test_merge.py: Unit tests for _deep_merge covering basic merge, nested dicts, replacement of non-dict values, in-place mutation semantics, and disjoint keys The replacement mirrors mergedeep's Strategy.REPLACE semantics exactly — recurse into nested mappings, replace everything else: def _deep_merge( target: MutableMapping[Any, Any], source: MutableMapping[Any, Any] ) -> MutableMapping[Any, Any]: for key, value in source.items(): if key in target and isinstance(target[key], MutableMapping) and isinstance(value, MutableMapping): _deep_merge(target[key], value) else: target[key] = value return target mergedeep remains in requirements.txt / docs/requirements.txt as a transitive dependency of mkdocs — this only removes it as a direct usethis dependency. Original prompt Start implementation The user has attached the following file paths as relevant context: AGENTS.md [Chronological Review: The conversation began with the user requesting to remove the `mergedeep` dependency from the `pyproject.toml` file, citing the motivation to reduce dependencies and the package's apparent abandonment. The user then requested to start the implementation of this change.] [Intent Mapping: User Request 1: "Remove mergedeep as a dependency #576" - The user wants to eliminate the mergedeep package from the project. User Request 2: "Start implementation" - The user is ready to begin the actual coding work to remove the dependency.] [Technical Inventory: Dependency: mergedeep - A package that the user wants to remove due to its lack of updates and perceived abandonment.] [Code Archaeology: File: pyproject.toml - The user is currently working on this file to remove the mergedeep dependency.] [Progress Assessment: Completed Tasks: The user has identified the dependency to be removed and has expressed motivation for this change. Partially Complete Work: The implementation of the removal has not yet been executed.] [Context Validation: The user has clearly stated their intention to remove a specific dependency and has initiated the process to implement this change.] [Recent Commands Analysis: Last Agent Commands: The user requested to "Start implementation," indicating readiness to proceed with the removal of mergedeep. Tool Results Summary: No specific tool results were generated as the user has not yet executed any commands related to the implementation. Pre-Summary State: The agent was preparing to assist the user in implementing the removal of the mergedeep dependency from the pyproject.toml file. Operation Context: The commands executed were directly related to the user's goal of reducing dependencies in the project.] 1. Conversation Overview: - Primary Objectives: The user aims to "remove mergedeep as a dependency" to reduce the number of dependencies and due to the package's abandonment. - Session Context: The conversation has focused on the user's intent to eliminate a specific dependency from their project, leading to a request to start the implementation. - User Intent Evolution: The user has clearly articulated their goal and is now ready to proceed with the implementation. Technical Foundation: Dependency: mergedeep - The user wishes to remove this dependency due to its lack of updates since 2021. Codebase Status: File Name: pyproject.toml Purpose: This file manages the project's dependencies. Current State: The user is in the process of modifying this file to remove the mergedeep dependency. Key Code Segments: Not applicable yet as the implementation has not been executed. Dependencies: The removal of mergedeep will affect how the project manages its dependencies. Problem Resolution: Issues Encountered: The user has identified mergedeep as an unnecessary dependency. Solutions Implemented: The user has not yet implemented any solutions as the actual code changes are pending. Debugging Context: No ongoing troubleshooting efforts have been noted yet. Lessons Learned: The user recognizes the importance of maintaining an updated and minimal set of dependencies. Progress Tracking: Completed Tasks: The user has identified the dependency to be removed. Partially Complete Work: The implementation of the removal is pending. Validated Outcomes: No features or code have been confirmed working through testing yet. Active Work State: Current Focus: The user is focused on removing the mergedeep dependency from the pyproject.toml file. Recent Context: The user has expressed readiness to start the implementation of the removal. Working Code: No specific code snippets have been modified yet. Immediate Context: The user is preparing to implement the removal of the mergedeep dependency. Recent Operations: Last Agent Commands: The user executed the command "Start implementation." Tool Results Summary: No tool results were generated as the implementation has not yet been executed. Pre-Summary State: The agent was ready to assist the user in implementing the removal of the mergedeep dependency. Operation Context: The user's commands are directly aligned with their goal of reducing project dependencies. Continuation Plan: Pending Task 1: Implement the removal of mergedeep from pyproject.toml. Pending Task 2: Ensure that the project functions correctly without the mergedeep dependency. Priority Information: The immediate next step is to modify the pyproject.toml file to remove the dependency. Next Action: The user should proceed with editing the pyproject.toml file to remove mergedeep. Created from VS Code. 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Open Graph Description: mergedeep has been unmaintained since 2021. The only usage was 4 calls to mergedeep.merge() (default Strategy.REPLACE) in the TOML and YAML file I/O modules. Changes pyproject.toml: Removed merged...
X Description: mergedeep has been unmaintained since 2021. The only usage was 4 calls to mergedeep.merge() (default Strategy.REPLACE) in the TOML and YAML file I/O modules. Changes pyproject.toml: Removed merged...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1437
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ec0d0b49-90d0-35d5-3731-22d5b28bbc07 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E70C:3073D:E97B6E:14AD6D3:6A4CAEF5 |
| html-safe-nonce | 88126e80809e6a7a8279d42b7640c83d50467614e029ba93daab1b2093ec3d7d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzBDOjMwNzNEOkU5N0I2RToxNEFENkQzOjZBNENBRUY1IiwidmlzaXRvcl9pZCI6IjMwMzcyNzM4NzU2MjY2MzQ5OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2f3698b9c45fc8942776ef988275c2b20742668989113f693f1ca2931cbdc456 |
| hovercard-subject-tag | pull_request:3426763732 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/usethis-python/usethis-python/pull/1437/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | mergedeep has been unmaintained since 2021. The only usage was 4 calls to mergedeep.merge() (default Strategy.REPLACE) in the TOML and YAML file I/O modules. Changes pyproject.toml: Removed merged... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ae90d426644ca15e89bacceb72e51f4e9dbf85f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width