Registry / serialization / three-merge

three-merge

JSON →
library0.1.1pypypi✓ verified 86d ago

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.

pip install three-merge
INSTALL
IMPORT
SIG · THREE-MERGE
T
three-merge
serializationpythonv0.1.1
Install
1.6s avg
Import
12ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.014s · 18.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.010s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

merge
from three_merge import merge
from three_merge.merge import merge
Wrong: merge is a function, not a submodule. Use from three_merge import merge.

Merges strings a and b with respect to base, handling conflicts.

from three_merge import merge base = "Hello world" a = "Hello beautiful world" b = "Hello cruel world" result = merge(base, a, b) print(result)
Debug
Known issues
gotchaThe merge function raises a `MergeConflict` exception if it cannot resolve conflicts. You must handle this exception.
fix
Wrap in try-except: from three_merge import MergeConflict; try: result = merge(...); except MergeConflict as e: ...
affects: all
deprecatedNo deprecated features known. Version 0.1.0 vs 0.1.1: 0.1.1 fixed corner cases with PRESERVED strings and longer source texts.
fix
Always use latest version (0.1.1) to avoid known bugs.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'three_merge'
The library name uses a hyphen but the Python module uses an underscore.
fix
Import with underscore: import three_merge
NameError: name 'MergeConflict' is not defined
MergeConflict is not imported; it's in the three_merge module.
fix
Import it explicitly: from three_merge import MergeConflict
AttributeError: module 'three_merge' has no attribute 'merge'
Trying to access merge as a module attribute incorrectly.
fix
Use: from three_merge import merge
Upgrade
Version history
0.1.1latest on PyPI · released Jul 22, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
three-merge — pip install three-merge · libregistry