Skip to content

Commit fd8acc3

Browse files
authoredFeb 27, 2025··
Merge pull request #1500 from AnswerDotAI/warn
Add Deprecation Warning For Conda
2 parents 0f86c7b + 846198b commit fd8acc3

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed
 

‎nbdev/release.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/api/18_release.ipynb.
44

55
# %% auto 0
6-
__all__ = ['GH_HOST', 'Release', 'changelog', 'release_git', 'release_gh', 'pypi_json', 'latest_pypi', 'pypi_details',
7-
'conda_output_path', 'write_conda_meta', 'write_requirements', 'anaconda_upload', 'release_conda',
8-
'chk_conda_rel', 'release_pypi', 'release_both', 'bump_version', 'nbdev_bump_version']
6+
__all__ = ['GH_HOST', 'CONDA_WARNING', 'Release', 'changelog', 'release_git', 'release_gh', 'pypi_json', 'latest_pypi',
7+
'pypi_details', 'conda_output_path', 'write_conda_meta', 'write_requirements', 'anaconda_upload',
8+
'release_conda', 'chk_conda_rel', 'release_pypi', 'release_both', 'bump_version', 'nbdev_bump_version']
99

1010
# %% ../nbs/api/18_release.ipynb
1111
from fastcore.all import *
@@ -251,8 +251,11 @@ def write_requirements(path:str=''):
251251
(d/'requirements.txt').mk_write(req)
252252

253253
# %% ../nbs/api/18_release.ipynb
254+
CONDA_WARNING='Conda support for nbdev is deprecated and scheduled for removal in a future version.'
255+
254256
def anaconda_upload(name, loc=None, user=None, token=None, env_token=None):
255257
"Upload `name` to anaconda"
258+
warn(CONDA_WARNING)
256259
user = f'-u {user} ' if user else ''
257260
if env_token: token = os.getenv(env_token)
258261
token = f'-t {token} ' if token else ''
@@ -271,6 +274,7 @@ def release_conda(
271274
upload_user:str=None # Optional user to upload package to
272275
):
273276
"Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it"
277+
warn(CONDA_WARNING)
274278
name = get_config().lib_name
275279
write_conda_meta(path)
276280
out = f"Done. Next steps:\n```\ncd {path}\n"""

‎nbs/api/18_release.ipynb

+4
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,11 @@
632632
"outputs": [],
633633
"source": [
634634
"#| export\n",
635+
"CONDA_WARNING='Conda support for nbdev is deprecated and scheduled for removal in a future version.'\n",
636+
"\n",
635637
"def anaconda_upload(name, loc=None, user=None, token=None, env_token=None):\n",
636638
" \"Upload `name` to anaconda\"\n",
639+
" warn(CONDA_WARNING)\n",
637640
" user = f'-u {user} ' if user else ''\n",
638641
" if env_token: token = os.getenv(env_token)\n",
639642
" token = f'-t {token} ' if token else ''\n",
@@ -668,6 +671,7 @@
668671
" upload_user:str=None # Optional user to upload package to\n",
669672
"):\n",
670673
" \"Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it\"\n",
674+
" warn(CONDA_WARNING)\n",
671675
" name = get_config().lib_name\n",
672676
" write_conda_meta(path)\n",
673677
" out = f\"Done. Next steps:\\n```\\ncd {path}\\n\"\"\"\n",

0 commit comments

Comments
 (0)
Please sign in to comment.