pessimist


Namepessimist JSON
Version 0.9.3 PyPI version JSON
download
home_pagehttps://github.com/python-packaging/pessimist/
SummaryEnsures your dependencies work with minimum version
upload_time2022-05-23 21:00:47
maintainer
docs_urlNone
authorTim Hatch
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pessimist

The name "optimist" was already taken?

Given your listed requirements, and how to run your tests, tries various
versions to ensure the minimums are accurate.


## Usage

```
python -m pessimist [-c 'make test'] [--fast] [--extend=name[,name...]] [--requirements=requirements*.txt] /path/to/repo
```

* `-c` -- command to run.  If you're using a src/ layout you can use `cd src;
  python -m unittest` or so.
* `--fast` -- only verify min and max versions
* `--extend` -- ignore specifiers entirely for the listed canonical names;
  intended to let you go back past `==` and may be improved to do something more
  like that in the future.  Also allows `*` as a name to mean all names that are
  "variable"
* `--requirements` -- comma-separated globs which represented "fixed"
  requirements.
* `--verbose` -- show logs as it's working


## Fixed and variable

* Fixed requirements are from `requirements*.txt`.  If these match more than one
  version, only the newest is kept.
* Variable requirements are from your setup.py/setup.cfg/etc that make it into
  the metadata.  These are the ones we're interested in trying.
* If a name is in both sets, the variable logic is followed.


## Strategy

1. Try newest versions of everything. Bail if this fails to pass.
2. For each dep independently, try progressively older versions.
3. Try oldest versions of all.  Bail if this fails to pass.

I subscribe to the "requirements.txt should be concrete versions you want to
use in CI" school of thought; the constraints in setup.py/setup.cfg/pyproject.toml
should be `>=` the minimum version that works, and `<` the next major version
("compatible", in poetry terms).

My goal in creating this is to have an automated check that we haven't broken
compatibility with an older version unintentionally.  You could have a simpler
version of this that does `sed -e 's/>=/==/` on your requirements files, but if
that fails, finding the new minimum is still a research projct that's automated
by this one.


# License

pessimist is copyright [Tim Hatch](https://timhatch.com/), and licensed under
the MIT license.  I am providing code in this repository to you under an open
source license.  This is my personal repository; the license you receive to
my code is from me and not from my employer. See the `LICENSE` file for details.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/python-packaging/pessimist/",
    "name": "pessimist",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Tim Hatch",
    "author_email": "tim@timhatch.com",
    "download_url": "https://files.pythonhosted.org/packages/36/9e/50a29c11bcb571c12497a929bf599a5cc264440b584052517652b8beace4/pessimist-0.9.3.tar.gz",
    "platform": null,
    "description": "# pessimist\n\nThe name \"optimist\" was already taken?\n\nGiven your listed requirements, and how to run your tests, tries various\nversions to ensure the minimums are accurate.\n\n\n## Usage\n\n```\npython -m pessimist [-c 'make test'] [--fast] [--extend=name[,name...]] [--requirements=requirements*.txt] /path/to/repo\n```\n\n* `-c` -- command to run.  If you're using a src/ layout you can use `cd src;\n  python -m unittest` or so.\n* `--fast` -- only verify min and max versions\n* `--extend` -- ignore specifiers entirely for the listed canonical names;\n  intended to let you go back past `==` and may be improved to do something more\n  like that in the future.  Also allows `*` as a name to mean all names that are\n  \"variable\"\n* `--requirements` -- comma-separated globs which represented \"fixed\"\n  requirements.\n* `--verbose` -- show logs as it's working\n\n\n## Fixed and variable\n\n* Fixed requirements are from `requirements*.txt`.  If these match more than one\n  version, only the newest is kept.\n* Variable requirements are from your setup.py/setup.cfg/etc that make it into\n  the metadata.  These are the ones we're interested in trying.\n* If a name is in both sets, the variable logic is followed.\n\n\n## Strategy\n\n1. Try newest versions of everything. Bail if this fails to pass.\n2. For each dep independently, try progressively older versions.\n3. Try oldest versions of all.  Bail if this fails to pass.\n\nI subscribe to the \"requirements.txt should be concrete versions you want to\nuse in CI\" school of thought; the constraints in setup.py/setup.cfg/pyproject.toml\nshould be `>=` the minimum version that works, and `<` the next major version\n(\"compatible\", in poetry terms).\n\nMy goal in creating this is to have an automated check that we haven't broken\ncompatibility with an older version unintentionally.  You could have a simpler\nversion of this that does `sed -e 's/>=/==/` on your requirements files, but if\nthat fails, finding the new minimum is still a research projct that's automated\nby this one.\n\n\n# License\n\npessimist is copyright [Tim Hatch](https://timhatch.com/), and licensed under\nthe MIT license.  I am providing code in this repository to you under an open\nsource license.  This is my personal repository; the license you receive to\nmy code is from me and not from my employer. See the `LICENSE` file for details.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Ensures your dependencies work with minimum version",
    "version": "0.9.3",
    "project_urls": {
        "Homepage": "https://github.com/python-packaging/pessimist/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ca4fe644106a9442e16c11e3f37c68fc6600e58657f12c5d90267c3e972e551",
                "md5": "50ace9865218fdae00ee972c0a07c7d3",
                "sha256": "bd074b0d207a89f4e88a34ea6a4d7f1a6ca685dbe9a91cc3bd90858870357018"
            },
            "downloads": -1,
            "filename": "pessimist-0.9.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "50ace9865218fdae00ee972c0a07c7d3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 9990,
            "upload_time": "2022-05-23T21:00:45",
            "upload_time_iso_8601": "2022-05-23T21:00:45.766446Z",
            "url": "https://files.pythonhosted.org/packages/8c/a4/fe644106a9442e16c11e3f37c68fc6600e58657f12c5d90267c3e972e551/pessimist-0.9.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "369e50a29c11bcb571c12497a929bf599a5cc264440b584052517652b8beace4",
                "md5": "12b85091d582830b96a6e5b7a7004471",
                "sha256": "a9c9be7ec8133fd188d73359d12b9346e97e5c675491557f3c7d0ae29888448a"
            },
            "downloads": -1,
            "filename": "pessimist-0.9.3.tar.gz",
            "has_sig": false,
            "md5_digest": "12b85091d582830b96a6e5b7a7004471",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 14179,
            "upload_time": "2022-05-23T21:00:47",
            "upload_time_iso_8601": "2022-05-23T21:00:47.920748Z",
            "url": "https://files.pythonhosted.org/packages/36/9e/50a29c11bcb571c12497a929bf599a5cc264440b584052517652b8beace4/pessimist-0.9.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-05-23 21:00:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "python-packaging",
    "github_project": "pessimist",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pessimist"
}
        
Elapsed time: 0.45469s