merge3
Python implementation of 3-way merge
Decision gist · record as of 2026-08-14
Yes, if you need 3-way merge logic and accept the GPL-2.0-or-later copyleft constraint. The package is actively maintained, has no dependencies, and works across modern Python versions. It's a solid choice for tools that must resolve text conflicts programmatically. No if your project cannot adopt copyleft licensing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low friction: pure Python wheel with no runtime dependencies.
- Actively maintained with recent commits and broad Python version support from 3.9 through 3.14.
License · maintenance · safety
GPL-2.0-or-later (copyleft) — GPL-2.0-or-later copyleft license: any derivative work or distribution must be released under compatible terms. Review your project's licensing model before integrating.
last release 2025-10-15 (303 days) · last repo commit 2026-03-11 · 11 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 90,017 downloads/mo, #13,621 on PyPI
Alternatives
Verify before relying
import merge3
m3 = merge3.Merge3(
['common\n', 'base\n'],
['common\n', 'a\n'],
['common\n', 'b\n']
)
result = list(m3.merge_annotated())- Whether conflict markers are customizable or follow a fixed format
- Performance characteristics on large text sequences or files
- Whether the package handles binary data or is text-only
What it is and what it does
merge3 is a pure-Python implementation of the 3-way merge algorithm used in version control systems. It takes three text sequences—a common base and two independent modifications—and produces a merged result that incorporates both changes. When changes conflict, it marks the conflicting regions with annotated conflict markers so you can see which branch contributed which lines.
The package works with sequences of lines (typically strings) rather than raw files, giving you control over how to split and process text. It can be used as a library from Python code or invoked as a command-line tool. With no external dependencies and support for modern Python versions, it's lightweight and straightforward to integrate into tools that need to resolve text merges programmatically.
Use it for
- Implement merge logic in a custom version control or document collaboration tool
- Resolve text conflicts when merging branches in a non-Git workflow
- Build a three-way diff viewer that shows how changes from two sources combine
- Automate merging of configuration or data files from multiple sources
- Test merge behavior in applications that handle concurrent text edits
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need 3-way merge logic and accept the GPL-2.0-or-later copyleft constraint.
The package is actively maintained, has no dependencies, and works across modern Python versions. It's a solid choice for tools that must resolve text conflicts programmatically. No if your project cannot adopt copyleft licensing.
Install
merge3 on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent commits and broad Python version support from 3.9 through 3.14.
Requires Python 3.9 or later.
License in practice
GPL-2.0-or-later copyleft license: any derivative work or distribution must be released under compatible terms. Review your project's licensing model before integrating.
Quickstart
import merge3
m3 = merge3.Merge3(
['common\n', 'base\n'],
['common\n', 'a\n'],
['common\n', 'b\n']
)
result = list(m3.merge_annotated())
Verify before relying
- Whether conflict markers are customizable or follow a fixed format
- Performance characteristics on large text sequences or files
- Whether the package handles binary data or is text-only
Package facts
| License | GPL-2.0-or-later copyleft |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 303 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,017 / month, #13,621 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaOperating System :: POSIXProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: merge3-0.0.16-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “3-way merge text”
- merge3Implements 3-way merge of text sequences, combining changes from two…
- daffCompares two tables and produces a diff summary that can be used as a…
- docx-mailmergePerforms mail merge operations on docx files by replacing merge…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also deepmerge · mergedeep · textdistance · fastdiff · ansimarkup · jsonmerge · pytest-html-merger · diff-match-patch · django-linear-migrations