• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openvax / varcode / 24671488710

Build:
Build:
LAST BUILD BRANCH: v6.0.0
DEFAULT BRANCH: main
Ran 20 Apr 2026 02:19PM UTC
Jobs 0
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
24671488710

push

github

iskandr
Defer PyVCF3 import to avoid rpy2/R init on every import varcode

Plain `import varcode` was eating hundreds of milliseconds of R init
whenever rpy2 happened to live in the environment. The chain:

    varcode/__init__.py: from .vcf import load_vcf, load_vcf_fast
      varcode/vcf.py:    import vcf as pyvcf  (PyVCF3)
        vcf/filters.py:  try: from rpy2 import robjects

PyVCF3 unconditionally probes rpy2 at module top level, which fully
boots R. Fix: drop the eager `from .vcf import ...` in the package
__init__, and add a PEP 562 __getattr__ so `varcode.load_vcf`,
`from varcode import load_vcf`, and `varcode.load_vcf_fast` still
resolve — they just pay the cost on first access instead of at
import time.

Net effect: `python -c "import varcode"` is silent and fast again.
Regression covered by tests/test_lazy_vcf_import.py — spawns a fresh
subprocess and asserts that varcode.vcf is absent from sys.modules
until an attribute access triggers it.

Closes #302. Unblocks topiary#122.
Bumps to 4.0.6.
Source Files on build 24671488710
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #24671488710
  • 5ec4ae32 on github
  • Prev Build on defer-pyvcf3-import (#24671346541)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc