{"id":13790774,"url":"https://github.com/pycqa/modernize","last_synced_at":"2026-04-01T20:44:36.629Z","repository":{"id":10321959,"uuid":"12450145","full_name":"PyCQA/modernize","owner":"PyCQA","description":"Modernizes Python code for eventual Python 3 migration. Built on top of fissix (a fork of lib2to3)","archived":false,"fork":false,"pushed_at":"2025-03-31T20:52:22.000Z","size":392,"stargazers_count":362,"open_issues_count":57,"forks_count":53,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-05-15T00:06:25.715Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://modernize.readthedocs.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PyCQA.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-08-29T02:53:54.000Z","updated_at":"2025-04-04T18:12:26.000Z","dependencies_parsed_at":"2023-09-26T14:51:36.232Z","dependency_job_id":"592bede7-cb15-4238-9d7e-86f47e716b61","html_url":"https://github.com/PyCQA/modernize","commit_stats":{"total_commits":313,"total_committers":33,"mean_commits":9.484848484848484,"dds":0.7635782747603834,"last_synced_commit":"f06b20ad4728267ebcacb96075118529541697cd"},"previous_names":["python-modernize/python-modernize"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fmodernize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fmodernize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fmodernize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fmodernize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyCQA","download_url":"https://codeload.github.com/PyCQA/modernize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T22:00:51.116Z","updated_at":"2025-12-12T00:38:08.293Z","avatar_url":"https://github.com/PyCQA.png","language":"Python","readme":"::\n\n    Python           _              _        \n       _ __  ___  __| |___ _ _ _ _ (_)______ \n      | '  \\/ _ \\/ _` / -_) '_| ' \\| |_ / -_)\n      |_|_|_\\___/\\__,_\\___|_| |_||_|_/__\\___|\n\n\n.. image:: https://img.shields.io/coveralls/github/PyCQA/modernize?label=coveralls\u0026logo=coveralls\n    :alt: Coveralls\n    :target: https://coveralls.io/github/PyCQA/modernize\n.. image:: https://img.shields.io/readthedocs/modernize?logo=read-the-docs\n    :alt: Read the Docs\n    :target: https://modernize.readthedocs.io/en/latest/\n.. image:: https://img.shields.io/github/workflow/status/PyCQA/modernize/CI?label=GitHub%20Actions\u0026logo=github\n    :alt: GitHub Actions\n    :target: https://github.com/PyCQA/modernize\n.. image:: https://img.shields.io/pypi/v/modernize?logo=pypi\n    :alt: PyPI\n    :target: https://pypi.org/project/modernize/\n\nModernize is a Python program that reads Python 2 source code\nand applies a series of fixers to transform it into source code\nthat is valid on both Python 3 and Python 2.7.\n\nThis allows you to run your test suite on Python 2.7 and Python 3\nso you can gradually port your code to being fully Python 3\ncompatible without slowing down development of your Python 2\nproject.\n\nThe ``python -m modernize`` command works like\n``python -m fissix``, see `fissix \u003chttps://github.com/jreese/fissix\u003e`_.\nHere's how you'd rewrite a\nsingle file::\n\n    python -m modernize -w example.py\n\nIt does not guarantee, but it attempts to spit out a codebase compatible\nwith Python 2.6+ or Python 3. The code that it generates has a runtime\ndependency on `six \u003chttps://pypi.python.org/pypi/six\u003e`_, unless the\n``--no-six`` option is used. Version 1.9.0 or later of ``six`` is\nrecommended. Some of the fixers output code that is not compatible with\nPython 2.5 or lower.\n\nOnce your project is ready to run in production on Python 3 it's\nrecommended to drop Python 2.7 support using\n`pyupgrade \u003chttps://pypi.org/project/pyupgrade/\u003e`_\n\n**Documentation:** `modernize.readthedocs.io\n\u003chttps://modernize.readthedocs.io/\u003e`_.\n\nSee the ``LICENSE`` file for the license of ``modernize``.\nUsing this tool does not affect licensing of the modernized code.\n\nThis library is a very thin wrapper around `fissix\n\u003chttps://github.com/jreese/fissix\u003e`_, a fork of lib2to3.\n","funding_links":[],"categories":["By Environment"],"sub_categories":["Python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycqa%2Fmodernize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpycqa%2Fmodernize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycqa%2Fmodernize/lists"}