feat: Publish a singer-python and pipelinewise-singer-python replacement - #3701
Draft
edgarrmondragon wants to merge 44 commits into
Draft
edgarrmondragon wants to merge 44 commits into
edgarrmondragon wants to merge 44 commits into
Conversation
Contributor
There was a problem hiding this comment.
Sorry @edgarrmondragon, your pull request is larger than the review limit of 150000 diff characters
Documentation build overview
14 files changed ·
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3701 +/- ##
==========================================
+ Coverage 94.35% 94.52% +0.16%
==========================================
Files 74 87 +13
Lines 6294 6462 +168
Branches 770 783 +13
==========================================
+ Hits 5939 6108 +169
+ Misses 266 265 -1
Partials 89 89
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
edgarrmondragon
force-pushed
the
singer-python-package
branch
3 times, most recently
from
July 15, 2026 23:43
f696016 to
4d18542
Compare
The code in singer_sdk/singerlib now lives in packages/meltano-singer-python as the top-level `singer` package, published as the meltano-singer-python distribution. singer-sdk now depends on it and singer_sdk.singerlib re-exports the same objects as a stable alias.
…er package singer.metrics now hosts the meters, points, and exclusion filter, plus legacy singer-python factories (record_counter(endpoint=...), http_request_timer, job_timer). singer_sdk.metrics re-exports the core and keeps the SDK-flavored stream-based factories. BREAKING CHANGE: the metrics logger is now named singer.metrics instead of singer_sdk.metrics, and metric points carry a pid tag. singer.logging hosts ConsoleFormatter/StructuredFormatter, and singer.get_logger configures logging from SINGER_SDK_LOG_CONFIG (dictConfig, as generated by Meltano) or LOGGING_CONF_FILE (INI, pipelinewise-compatible).
Adds singer.bookmarks, singer.metadata, and extends singer.utils (now, load_json, check_config, parse_args) and singer.catalog (Catalog.load/dump) to port the legacy singer-python API. Message classes gain a legacy asdict() alongside to_dict(). singer.__init__ gains write_record/write_schema/write_state/write_version and should_sync_field, matching the legacy top-level API. The deprecated --properties CLI flag is intentionally not supported; use --catalog instead.
singer.batch now hosts BaseBatchFileEncoding and BatchMessage. singer_sdk.helpers._batch keeps SDKBatchMessage as an alias for BatchMessage, plus the fsspec-coupled StorageTarget/BatchConfig and the deprecated JSONLinesEncoding/ParquetEncoding wrappers. BatchFileFormat (jsonl/parquet) is left untouched in the SDK, since encoding.format is already a plain string and taps can pass format='arrow' without any enum change.
Extends the release workflow to build, attest, and publish meltano-singer-python alongside singer-sdk on the same tag. Adds a migration guide for singer-python/pipelinewise-singer-python users, and documents the singer.metrics logger rename.
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
…log.from_entries
write() had regressed to a no-op on breadcrumbs not already present in
the compiled map, silently breaking get_standard_metadata() (which
always starts from an empty mapping) and any first write to a new
stream/field. Restored legacy semantics: create the breadcrumb entry
if missing.
Catalog.from_entries() called cls({"streams": ...}), which invokes
dict.__init__ directly and does not go through from_dict — it built a
single-key mapping instead of one keyed by tap_stream_id. Fixed to
build the catalog the same way from_dict/add_stream do.
… replication-method/view-key-properties CatalogEntry.metadata is a MetadataMapping (already compiled, keyed by breadcrumb, with typed Metadata/StreamMetadata values), not the raw legacy list-of-entries form. Legacy taps calling metadata.to_map(catalog_entry.metadata) — as pipelinewise-singer-python callers do — got a TypeError, since to_map() assumed a raw list. to_map() now also accepts any breadcrumb-keyed mapping and compiles it to the same raw dict-of-dicts shape, converting typed values via to_dict() where available. StreamMetadata had no field for 'replication-method' or 'view-key-properties' (only its own 'forced-replication-method'), so both keys were silently dropped whenever stream metadata passed through Catalog.load()/from_dict() or MetadataMapping.to_list() -- a real data-loss bug for any orchestrator-set replication method. Added replication_method and view_key_properties fields.
Legacy singer-python code (and tests written against it) constructs
CatalogEntry(metadata=[{'breadcrumb': [...], 'metadata': {...}}, ...])
directly, passing the raw list-of-entries form rather than a compiled
MetadataMapping. CatalogEntry.metadata is typed as MetadataMapping, so
this previously left .metadata as a plain list, breaking any code that
expects mapping access (e.g. .root, breadcrumb indexing). __post_init__
now coerces a raw list the same way BatchMessage/BatchConfig already
coerce their dict-shaped fields.
…ard_metadata()
Verified against singer-io/singer-python's metadata.py directly. Two
deviations found and fixed:
- new() returned a defaultdict(dict), which silently auto-vivifies
missing breadcrumbs on any access (e.g. 'x in mdata' or mdata[k]);
upstream returns a plain {} with normal KeyError semantics.
- get_standard_metadata() marked properties in valid_replication_keys
as 'automatic' inclusion in addition to key_properties; upstream
only does this for key_properties.
CompiledMetadata stays as the concrete dict[Breadcrumb, dict[str, Any]]
type: write()/delete()/get()/to_list()/new() all need dict mutation
semantics that a read-only Mapping can't provide, matching upstream's
own plain-dict design for this module.
tap-mysql, the first real consumer of meltano-singer-python, migrated every metadata.to_map()/metadata.get() call site to direct MetadataMapping/Metadata attribute access (catalog_entry.metadata.root.replication_method, catalog_entry.metadata['properties', name].inclusion), since CatalogEntry.metadata is always a MetadataMapping already. Keeping the functional dict-based module around as unused, untested surface added maintenance cost without a real consumer. BREAKING CHANGE: singer.metadata (new/to_map/to_list/write/get/delete/ get_standard_metadata) no longer exists. Use CatalogEntry.metadata (a MetadataMapping) directly instead.
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
edgarrmondragon
force-pushed
the
singer-python-package
branch
from
July 15, 2026 23:54
4d18542 to
20bd215
Compare
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
edgarrmondragon
force-pushed
the
singer-python-package
branch
from
July 17, 2026 01:41
141474f to
89a157a
Compare
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
edgarrmondragon
force-pushed
the
singer-python-package
branch
from
August 28, 2026 03:45
bc3581b to
2b53ae2
Compare
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
This reverts commit 4b0e120.
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.