sklearn


Namesklearn JSON
Version 0.0.post1 PyPI version JSON
download
home_page
Summarydeprecated sklearn package, use scikit-learn instead
upload_time2022-11-07 14:32:56
maintainer
docs_urlNone
author
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Goal

This repo implements the brownout strategy for deprecating the `sklearn`
package on PyPI.

# How to fix the error for the main use cases

- use `pip install scikit-learn` rather than `pip install sklearn`
- replace `sklearn` by `scikit-learn` in your pip requirements files
  (`requirements.txt`, `setup.py,` `setup.cfg`, `Pipfile`, etc ...)
- if the `sklearn` package is used by one of your dependencies
  it would be great if you take some time to track which package uses
  `sklearn` instead of `scikit-learn` and report it to their issue tracker
- as a last resort, set the environment variable
  `SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True` to avoid this error

# Brownout schedule

The following table shows the dates and time windows, where an exception will be
raised if you attempt to install the `sklearn` package from PyPI.

| Dates                                 | Window(s)                      |
|---------------------------------------|--------------------------------|
| 2022 December 1st - 2023 January 31st | :00-:05 every hour             |
| 2023 February 1st - March 31st        | :00-:10 every hour             |
| 2023 April 1st - May 31st             | :00-:15 every hour             |
| 2023 June 1st - July 31st             | :00-:10 and :30-:40 every hour |
| 2023 August 1st - September 30th      | :00-:15 and :30-45 every hour  |
| 2023 October 1st - November 30th      | :00-:20 and :00-50 every hour  |
| 2023 December 1st onwards             | always raise an exception      |

# How to test whether a package will be affected by the `sklearn` deprecation

If you want to test whether a package has `sklearn` in its dependencies
independently of the brownout schedule, you can do:

```
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=False \
    pip install package-to-test-goes-here
```

If you get an error that means that the package has `sklearn` in one of its
dependencies. It would be greatly appreciated if you track which package it is,
and if you report it to the appropriate project issue tracker to make them
aware of the `sklearn` deprecation.

# Reason for the deprecation

`sklearn` package on PyPI exists to prevent malicious actors from using the
`sklearn` package, since `sklearn` (the import name) and `scikit-learn` (the
project name) are sometimes used interchangeably. `scikit-learn` is the actual
package name and should be used with pip, e.g. for:
- pip commands: `pip install scikit-learn`
- pip requirement files (`requirements.txt`, `setup.py,` `setup.cfg`,
  `Pipfile`, etc ...)

At the time of writing (October 2022) `sklearn` downloads is about 1/5 of the
`scikit-learn` downloads on PyPI so a lot of people are using it.

There are some edge cases with the way the PyPI `sklearn` package is
implemented:
- `pip install sklearn==1.1.3` will say that the 1.1.3 version does not exist,
  which is confusing. The only available version at the time of writing of
  `sklearn` is 0.0.
- `pip uninstall sklearn` will actually not uninstall `scikit-learn`, you can
  still do `import sklearn` afterwards
- it can be confusing to have both `sklearn` and `scikit-learn` in the `pip
  list` output, prompting questions like "why do I have scikit-learn 1.1.3 and
  sklearn 0.0, and what does it even mean"?


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "sklearn",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/db/1e/af4e9cded5093a92e60d4ae7149a02c7427661b2db66c8ea4d34b17864a2/sklearn-0.0.post1.tar.gz",
    "platform": null,
    "description": "# Goal\n\nThis repo implements the brownout strategy for deprecating the `sklearn`\npackage on PyPI.\n\n# How to fix the error for the main use cases\n\n- use `pip install scikit-learn` rather than `pip install sklearn`\n- replace `sklearn` by `scikit-learn` in your pip requirements files\n  (`requirements.txt`, `setup.py,` `setup.cfg`, `Pipfile`, etc ...)\n- if the `sklearn` package is used by one of your dependencies\n  it would be great if you take some time to track which package uses\n  `sklearn` instead of `scikit-learn` and report it to their issue tracker\n- as a last resort, set the environment variable\n  `SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True` to avoid this error\n\n# Brownout schedule\n\nThe following table shows the dates and time windows, where an exception will be\nraised if you attempt to install the `sklearn` package from PyPI.\n\n| Dates                                 | Window(s)                      |\n|---------------------------------------|--------------------------------|\n| 2022 December 1st - 2023 January 31st | :00-:05 every hour             |\n| 2023 February 1st - March 31st        | :00-:10 every hour             |\n| 2023 April 1st - May 31st             | :00-:15 every hour             |\n| 2023 June 1st - July 31st             | :00-:10 and :30-:40 every hour |\n| 2023 August 1st - September 30th      | :00-:15 and :30-45 every hour  |\n| 2023 October 1st - November 30th      | :00-:20 and :00-50 every hour  |\n| 2023 December 1st onwards             | always raise an exception      |\n\n# How to test whether a package will be affected by the `sklearn` deprecation\n\nIf you want to test whether a package has `sklearn` in its dependencies\nindependently of the brownout schedule, you can do:\n\n```\nSKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=False \\\n    pip install package-to-test-goes-here\n```\n\nIf you get an error that means that the package has `sklearn` in one of its\ndependencies. It would be greatly appreciated if you track which package it is,\nand if you report it to the appropriate project issue tracker to make them\naware of the `sklearn` deprecation.\n\n# Reason for the deprecation\n\n`sklearn` package on PyPI exists to prevent malicious actors from using the\n`sklearn` package, since `sklearn` (the import name) and `scikit-learn` (the\nproject name) are sometimes used interchangeably. `scikit-learn` is the actual\npackage name and should be used with pip, e.g. for:\n- pip commands: `pip install scikit-learn`\n- pip requirement files (`requirements.txt`, `setup.py,` `setup.cfg`,\n  `Pipfile`, etc ...)\n\nAt the time of writing (October 2022) `sklearn` downloads is about 1/5 of the\n`scikit-learn` downloads on PyPI so a lot of people are using it.\n\nThere are some edge cases with the way the PyPI `sklearn` package is\nimplemented:\n- `pip install sklearn==1.1.3` will say that the 1.1.3 version does not exist,\n  which is confusing. The only available version at the time of writing of\n  `sklearn` is 0.0.\n- `pip uninstall sklearn` will actually not uninstall `scikit-learn`, you can\n  still do `import sklearn` afterwards\n- it can be confusing to have both `sklearn` and `scikit-learn` in the `pip\n  list` output, prompting questions like \"why do I have scikit-learn 1.1.3 and\n  sklearn 0.0, and what does it even mean\"?\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "deprecated sklearn package, use scikit-learn instead",
    "version": "0.0.post1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "f09984569a9ef5a9fd63a8f15c153567",
                "sha256": "76b9ed1623775168657b86b5fe966d45752e5c87f528de6240c38923b94147c5"
            },
            "downloads": -1,
            "filename": "sklearn-0.0.post1.tar.gz",
            "has_sig": false,
            "md5_digest": "f09984569a9ef5a9fd63a8f15c153567",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3640,
            "upload_time": "2022-11-07T14:32:56",
            "upload_time_iso_8601": "2022-11-07T14:32:56.766101Z",
            "url": "https://files.pythonhosted.org/packages/db/1e/af4e9cded5093a92e60d4ae7149a02c7427661b2db66c8ea4d34b17864a2/sklearn-0.0.post1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-11-07 14:32:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "sklearn"
}
        
Elapsed time: 0.02517s