{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/14"}],"enrichment":{"capability":"Provides Python 2.7's random module implementation for Python 3, ensuring identical random sequences when using the same seed across Python versions.","skillfed_tags":["python-2-compat","reproducibility","testing"],"use_cases":["Porting Python 2 test suites to Python 3 while keeping random-number expectations unchanged.","Running stochastic simulations or Monte Carlo code that was originally written for Python 2 and requires identical results.","Comparing random-number behavior between Python 2 and Python 3 implementations of the same algorithm.","Reproducing historical results from Python 2 code that relied on specific random sequences."],"what_it_does":"Random2 is a backport of Python 2.7's random module to Python 3. It exists to solve a specific compatibility problem: Python 3 changed the implementation of randrange(), so even with an identical seed, Python 2 and Python 3 produce different random sequences. This breaks reproducibility in test suites and other code that depends on stable, predictable random output across Python versions.\n\nThe package provides a drop-in replacement that generates the same sequence as Python 2.7 when given the same seed. It has no external dependencies and installs as a pure Python wheel. It is most useful for porting legacy test code or simulations from Python 2 to Python 3 without having to rewrite all the expected random outputs.","worth_installing":"Yes, if you are porting Python 2 code to Python 3 and need deterministic random sequences to remain stable. No, if you are writing new Python 3 code\u2014use the native random module instead. The package is dormant but stable, carries no known vulnerabilities, and has minimal friction. It solves a narrow, real problem for legacy code migration."},"id":"random2","links":{"html":"https://skillfed.io/packages/random2","md":"https://skillfed.io/packages/random2.md","pypi":"https://pypi.org/project/random2/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2023-12-18","license_spdx":null,"license_treatment":"permissive","name":"random2","python_support":"unspecified","summary":"Python 3 compatible Python 2 `random` Module."},"popularity":{"monthly_downloads":171150,"position":10379,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.0.2"}
