{"id":24709,"library":"three-merge","title":"three-merge","description":"A simple library for merging two strings with respect to a base one, performing three-way string merge. Current version: 0.1.1 (stable, minor bug fixes). No regular release cadence; developed by Spyder IDE.","status":"active","version":"0.1.1","language":"python","source_language":"en","source_url":"https://github.com/spyder-ide/three-merge","tags":["merge","string","three-way","diff","spyder"],"install":[{"cmd":"pip install three-merge","lang":"bash","label":"pip"}],"dependencies":[],"imports":[{"note":"Wrong: merge is a function, not a submodule. Use from three_merge import merge.","wrong":"from three_merge.merge import merge","symbol":"merge","correct":"from three_merge import merge"}],"quickstart":{"code":"from three_merge import merge\n\nbase = \"Hello world\"\na = \"Hello beautiful world\"\nb = \"Hello cruel world\"\nresult = merge(base, a, b)\nprint(result)","lang":"python","description":"Merges strings a and b with respect to base, handling conflicts."},"warnings":[{"fix":"Wrap in try-except: from three_merge import MergeConflict; try: result = merge(...); except MergeConflict as e: ...","message":"The merge function raises a `MergeConflict` exception if it cannot resolve conflicts. You must handle this exception.","severity":"gotcha","affected_versions":"all"},{"fix":"Always use latest version (0.1.1) to avoid known bugs.","message":"No deprecated features known. Version 0.1.0 vs 0.1.1: 0.1.1 fixed corner cases with PRESERVED strings and longer source texts.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Import with underscore: import three_merge","cause":"The library name uses a hyphen but the Python module uses an underscore.","error":"ModuleNotFoundError: No module named 'three_merge'"},{"fix":"Import it explicitly: from three_merge import MergeConflict","cause":"MergeConflict is not imported; it's in the three_merge module.","error":"NameError: name 'MergeConflict' is not defined"},{"fix":"Use: from three_merge import merge","cause":"Trying to access merge as a module attribute incorrectly.","error":"AttributeError: module 'three_merge' has no attribute 'merge'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}