Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 0 additions & 101 deletions cuda_core/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,104 +144,3 @@ so that they are documented but don't appear in the main index.
### API stability

Reviews should point out where existing public APIs are broken.

### API lifecycle and deprecations

`cuda.core` follows SemVer (see `docs/source/support.rst`):

- **New APIs** may be added at any time (`x.Y.0`). They MUST have a
`@versionadded` decorator, unless the docstring formatting requires it to be
manually-specified.
- **Breaking removals** only happen in **major releases** (`X.0.0`).
- Per the support policy, a deprecation notice must be present for **at least
one minor release** before the API is actually removed. The deprecation notice
should use the `@deprecated` decorator, unless
- Changes should be notated in the code and also in the release notes in the
"Deprecated APIs" section.

**Annotating a new API** — Use the `versionadded` decorator from the vendored
`cuda.core._vendored.deprecated.sphinx` module:

```python

from cuda.core._vendored.deprecated.sphinx import versionadded

@versionadded(version="1.2.0")
def new_feature(...):
"""Short description.
"""
```

Alternatively, if the vagaries of how we implement functions in Cython does not
allow this, you can add the reST `versionadded` directive directly:

```python
def new_feature(...):
"""Short description.

.. versionadded:: 1.2.0
"""
```

**Annotating a changed API** — Use the `versionchanged` decorator from the
vendored `cuda.core._vendored.deprecated.sphinx` module:

```python

from cuda.core._vendored.deprecated.sphinx import versionchanged

@versionchanged(version="1.2.0", reason="The old version was broken because...")
def new_feature(...):
"""Short description.
"""
```

Alternatively, if the vagaries of how we implement functions in Cython does not
allow this, you can add the reST `versionchanged` directive directly:

```python
def new_feature(...):
"""Short description.

.. versionchanged:: 1.2.0
The old version was broken because...
"""
```

**Deprecating an existing API** — use the `@deprecated` decorator from the
vendored `cuda.core._vendored.deprecated.sphinx` module and add a
`.. deprecated::` directive in the docstring. The decorator emits a
`DeprecationWarning` at call time; the docstring directive surfaces it in the
generated docs.

```python
from cuda.core._vendored.deprecated.sphinx import deprecated

@deprecated(version="1.2.0", reason="Use `new_feature` instead.")`
def old_feature(...):
"""Short description.
"""
```

Rules to follow when deprecating:

- The `version=` argument must be the **first** in which the
deprecation appears, not the release in which removal is planned.
- The `reason=` string must name the replacement (if one exists) so users
know what to migrate to.
- Keep the old implementation fully functional — do not change its behavior,
only add the decorator.
- The deprecated API must remain in the codebase for **at least one full minor
release cycle** before it can be removed in a subsequent major release.

**Removing a deprecated API** — removals land in a **major release**. Before
removing, verify that the deprecation has been present since at least the
previous minor release. Remove the decorator, the implementation, and any
`__all__` entry; update `api.rst` and the release notes accordingly.

## Vendored code

The `cuda/core/_vendored` directory contains vendored code from third-party
sources. It should not be modified, except to update the dependency or under
exceptional circumstances, in which case any modifications should be clearly
marked.
29 changes: 0 additions & 29 deletions cuda_core/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,3 @@ DLPack
Copyright (c) 2017 by Contributors
Licensed under the Apache License, Version 2.0.
Source: https://github.com/dmlc/dlpack

Deprecated
Copyright (c) 2017 Laurent LAPORTE
Licensed under the MIT License.
Source: https://github.com/tantale/deprecated

The following license applies to the vendored Deprecated source:

The MIT License (MIT)

Copyright (c) 2017 Laurent LAPORTE

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Empty file.
6 changes: 0 additions & 6 deletions cuda_core/cuda/core/_vendored/deprecated/__init__.py

This file was deleted.

111 changes: 0 additions & 111 deletions cuda_core/cuda/core/_vendored/deprecated/classic.py

This file was deleted.

52 changes: 0 additions & 52 deletions cuda_core/cuda/core/_vendored/deprecated/params.py

This file was deleted.

Loading