Skip to content

Correctly support 1.20.5 and document 1.20.6 as a stubbed version#4

Merged
newexo merged 1 commit into
masterfrom
reuben/support1.20.5
May 23, 2026
Merged

Correctly support 1.20.5 and document 1.20.6 as a stubbed version#4
newexo merged 1 commit into
masterfrom
reuben/support1.20.5

Conversation

@newexo
Copy link
Copy Markdown
Owner

@newexo newexo commented May 23, 2026

Replace 1.20.6 with 1.20.5; fix broken common() left over from the Pooch

refactor

Why

Two latent issues were hiding behind soft-skipped tests:

  1. 1.20.6 is declared as a supported version but upstream ships no data for
    it.
    The PrismarineJS minecraft-data tarball publishes patch releases like
    1.20.6, 1.20.1, 1.20.4, and 1.21 as stubs — directories containing only
    version.json, because their game data is unchanged from the prior release. So
    get_data_path("1.20.6") returned a directory with no items.json /
    blocks.json / etc., and 5 parametrized tests soft-skipped to hide the gap.
  2. common() was broken by the previous Pooch refactor. It still pointed at
    minecraft_data/data/data/ — a bundled-data directory that no longer exists in
    this repo — so it always raised FileNotFoundError. The test_common_data test
    caught that and skipped, masking the breakage.

Changes

  • SUPPORTED_VERSIONS: ["1.20.6", "1.21.6"]["1.20.5", "1.21.6"].
    1.20.5 is the nearest preceding full-data version in the 1.20 series.
  • __init__.py: common(): now reuses the Pooch-extracted data root via
    get_data_path(SUPPORTED_VERSIONS[0]). Common data is version-independent, so any
    supported version's data root works.
  • test_common_data: removed the try/except FileNotFoundError +
    pytest.skip — it now asserts on the result directly.
  • test_get_data_path_error_message: asserts "1.20.5" instead of "1.20.6"
    appears in the error.
  • README: updated the supported-versions list and added a new section
    "Upstream data availability: full vs. stub versions" documenting which 1.20.x and
    1.21.x versions ship full data vs. stubs.
  • Version: bumped 3.20.23.20.3.

Test impact

33 passed, 6 skipped39 passed, 0 skipped. Five skips disappear because
1.20.5 actually has the data the parametrized tests expect; the sixth disappears
because common() now works.

Not in scope

__call__ still has a # Fallback to bundled data if version not supported by Pooch branch that points at the same non-existent bundled directory. It's
unreachable in practice (any version not in SUPPORTED_VERSIONS raises
ValueError before the fallback runs in the current flow), but it's dead code
from the same refactor. Worth a follow-up.

@newexo newexo merged commit f3ed453 into master May 23, 2026
3 checks passed
@newexo newexo deleted the reuben/support1.20.5 branch May 23, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant