Changes | Show detailsOverview
- CKAN 2.11 supports Python 3.9 to 3.12
- This version requires a requirements upgrade on source installations
- This version requires a database upgrade. The minimum version required is PostgreSQL 12.
- This version does not require a Solr schema upgrade if you are already using the 2.10 schema,
but it is recommended to upgrade to the 2.11 Solr schema. Users of the
official Docker images
<https://github.com/ckan/ckan-solr> _ can use the ckan/ckan-solr:2.11-solr9 tag.
- Make sure to check the :ref:
migration-notes-2.11
Major features
- Added support for Python 3.11 and 3.12 (
#8357
<https://github.com/ckan/ckan/pull/8357> _)
Table Designer is a form-builder for CKAN DataStore tables with enforced data validation.
Use the :doc:maintaining/table-designer on the resource url/upload control for (#6118 <https://github.com/ckan/ckan/pull/6118> _):
- automatic creation of DataTable view for new Table Designer resources
- add/delete columns and edit schema via Data Dictionary page
- primary keys and required columns fully supported
- add individual rows with an auto-generated form based on the schema
- data validation enforced by PostgreSQL triggers, rendered as friendly errors in forms
- extended DataTables view with “edit row” and “delete rows” buttons for managing data
- automatic API documentation for create/upsert/delete with examples from real data when available
Increased performance:
- Render snippets faster through better use of existing jinja2 tags. Use
{% snippet 'path/to/snippet.html', arg1=test %} instead
of {{ h.snippet('path/to/snippet.html', arg1=test) }} in templates for better performance. (#6146 <https://github.com/ckan/ckan/pull/6146> _)
- Improved start-up performance (
#8219 <https://github.com/ckan/ckan/pull/8219> _)
:py:class:~ckanext.datastore.interfaces.IDataDictionaryForm interface for extending and validating new keys in the
fields dicts of the DataStore API actions. Unlike the info free-form
dict, these new keys are possible to tightly control with a schema. The schema
is built by combining schemas from from all plugins implementing this interface
so plugins implementing different features may all contribute to the same schema.
The underlying storage for data dictionary fields has changed. Use:
ckan datastore upgrade after upgrading to this release. (#7971
<https://github.com/ckan/ckan/pull/7971> _)
Start using htmx (htmx.org <https://htmx.org/> _) to modernize the CKAN frontend. For
more information check :doc:theming/htmx . (#7685
<https://github.com/ckan/ckan/pull/7685> _)
Enabled saving of activities on private datasets. Added
filtering of dataset activities based on user permission
labels.
(#5772 <https://github.com/ckan/ckan/pull/5772> _)
Minor changes
Added user, group, and organization view functions and templates to make
organization/group membership more public.
Group and Organization lists now show the number of members.
Group and Organization lists on a user’s profile and dashboard now display
the role for the group.
Refactor: renamed <group|organization>.members to
<group|organization>.manage_members . <group|organization>.members is no
longer an admin page.
New: read_groups and read_organization view functions and templates for
users. Adds group and organization tabs to a user profile to list the groups
they belong to.
New: member_dump view function. Downloads group/organization members into a
CSV file with headers [Username,Email,Name,Role] (#7007
<https://github.com/ckan/ckan/pull/7007> _)
:py:class:~ckan.plugins.toolkit.BaseModel class for declarative SQLAlchemy
models added to :py:mod:ckan.plugins.toolkit .
Models extending BaseModel class are attached to the SQLAlchemy’s
metadata object automatically (#7351 <https://github.com/ckan/ckan/pull/7351> _)::
from ckan.plugins import toolkit
class ExtModel(toolkit.BaseModel):
__tablename__ = "ext_model"
id = Column(String(50), primary_key=True)
...
The PyUtilib dependency has been removed. All the primitives for the plugin system are
now defined in CKAN. (#7976 <https://github.com/ckan/ckan/pull/7976> _)
- Allow sysadmins to change usernames of other accounts (
#4193
<https://github.com/ckan/ckan/pull/4193> _)
date_str_to_datetime helper accepts values with timezone information.
(#8305 <https://github.com/ckan/ckan/pull/8305> _)
follow_* and unfollow_* APIs will no longer return an error if the user
is already following or not following the entity. (#7685
<https://github.com/ckan/ckan/pull/7685> _)
- JS translations are no longer generated on each server restart. The are
built when starting the development server with
ckan run or explicitly with
ckan translations js (#8219 <https://github.com/ckan/ckan/pull/8219> _)
- Added support for :ref:
ckan.download_proxy to the resourceproxy plugin (#8354 <https://github.com/ckan/ckan/pull/8354> _)
- The
datastore_rw_resource_url_types helper can be overridden to define additional
resource url_type values that can be modified without force=True (#7617
<https://github.com/ckan/ckan/pull/7617> _)
datastore_create now allows removing fields when passing a new list of fields
and delete_fields=True (#7622 <https://github.com/ckan/ckan/pull/7622> _) (#7919
<https://github.com/ckan/ckan/pull/7919> _)
- New
reset_redis and clean_redis test fixtures for removing data from
Redis. (#7630 <https://github.com/ckan/ckan/pull/7630> _)
ckan generate fake-data accepts --user option that is used as
context["user"] .
Some factories(api-token for example), have a special meaning for the
user parameter and do not pass it to context. (#7635
<https://github.com/ckan/ckan/pull/7635> _)
- Add tooltips when links are truncated, to show the full text. (
#7742
<https://github.com/ckan/ckan/pull/7742> _)
datastore_create , datastore_upsert now include a records_row number when an
error occurs while inserting, upserting or updating records (#7748
<https://github.com/ckan/ckan/pull/7748> _)
- Added processing and pre-processing indicators to Datatables Views. (
#7900
<https://github.com/ckan/ckan/pull/7900> _)
- Adds button to delete a Resource’s datastore table in ckanext-datapusher
(
#7902 <https://github.com/ckan/ckan/pull/7902> _)
datastore_create : Add a delete_fields flag that must be set to True to delete
any existing fields not passed in the fields list
- Introducing a new parameter to the
user_create action with_apitoken .
When set, this parameter triggers the creation of an API token for the user.
(#7932 <https://github.com/ckan/ckan/pull/7932> _)
ckan db upgrade CLI command automatically applies migrations from
plugins. Use ckan db upgrade --skip-plugins if this behavior does not fit
into your deployment process. (#7961
<https://github.com/ckan/ckan/pull/7961> _)
- Added
bytes property to the test CKANResponse class which returns bytes
from the response data. (#7982 <https://github.com/ckan/ckan/pull/7982> _)
- Activity plugin now tracks new, changed, and deleted resource views. (
#8043
<https://github.com/ckan/ckan/pull/8043> _)
datastore_records_delete action now calls the datastore_delete action
via the toolkit for better frameworking. (#8101
<https://github.com/ckan/ckan/pull/8101> _)
- Use a definition list for the Data Dictionary view on resource pages to allow
extra information for each field. Update
example_idatadictionaryform plugin
to display extra information. (#8110
<https://github.com/ckan/ckan/pull/8110> _)
- Add reCAPTCHA protection on login and password reset (
#8121
<https://github.com/ckan/ckan/pull/8121> _)
- Resource view list items now have an additional
view-item class. (#8154
<https://github.com/ckan/ckan/pull/8154> _)
- Add
ckan.logic.schema.validator_args and ckan.logic.validate
decorators to toolkit. (#8215 <https://github.com/ckan/ckan/pull/8215> _)
- fix profile cli, add
--cold and --best-of options.
By default cli profile will now run the request once (cold), then give the
best of the next 3 (hot) runs. Use --cold --best-of=1 for the old cli profile
behavior. (#8223 <https://github.com/ckan/ckan/pull/8223> _)
- Sysadmins can now search by
email in the user_autocomplete component.
(#8228 <https://github.com/ckan/ckan/pull/8228> _)
- add
ckan generate migration --autogenerate option, sync models with
migrations (#8238 <https://github.com/ckan/ckan/pull/8238> _)
- Integrate flask-multistatic extension into the CKAN code base and remove it
from requirements. (
#7244 <https://github.com/ckan/ckan/pull/7244> _)
- Added
--disable-debugger option to CKAN cli run command. (#7278
<https://github.com/ckan/ckan/pull/7278> _)
Added new datastore_records_delete action.
Functions the same as datastore_delete action, but will never drop the
database table. (#7341 <https://github.com/ckan/ckan/pull/7341> _)
datastore_search sort parameters now support nulls first and nulls last
(#7356 <https://github.com/ckan/ckan/pull/7356> _)
datastore_upsert : Treat empty strings as null for non-text types (#7358
<https://github.com/ckan/ckan/pull/7358> _)
- Add a new optional parameter to the
datastore_dictionary helper that filters the
columns returned and fix a datatablesview show-columns bug with it (#7387
<https://github.com/ckan/ckan/pull/7387> _)
- update documenatation for CKAN SHELL command. (
#7402
<https://github.com/ckan/ckan/pull/7402> _)
- Improve CKAN Data API dialog with syntax highlighting, multiple client
languages and jinja2 blocks for expansion (
#7573
<https://github.com/ckan/ckan/pull/7573> _)
- Added
ckan.datatables.null_label config option and h.datatablesview_null_label helper.
Datatables Views will now show blank cells
for NoneType field values by default. (#7574
<https://github.com/ckan/ckan/pull/7574> _)
- faster navigation between dataset and resource edit pages (
#7586
<https://github.com/ckan/ckan/pull/7586> _)
user_logged_in and user_logged_out signals added to the ckan namespace
(#7608 <https://github.com/ckan/ckan/pull/7608> _)
- Store JS translation files in the storage folder rather than the source, to
avoid permission problems (
#7585 <https://github.com/ckan/ckan/pull/7585> _)
- Hide full helpers dict to tidy flask debug template listing (
#7668
<https://github.com/ckan/ckan/pull/7668> _)
- Because of a new version of Sphinx, the command to rebuild the documentation
is now
sphinx-build doc build/sphinx (#7808
<https://github.com/ckan/ckan/pull/7808> _)
- Hide
Add new resource button in the resource list while viewing activity
history. (#7814 <https://github.com/ckan/ckan/pull/7814> _)
- Serve i18n js faster with LazyJSONObject. Generate compact json instead of
pretty-printed json to send less data
(
#7852 <https://github.com/ckan/ckan/pull/7852> _)
- Show existing resource navigation on new resource page (
#7889
<https://github.com/ckan/ckan/pull/7889> _)
- Use object-group icon for Embed button (
#7890
<https://github.com/ckan/ckan/pull/7890> _)
- Note that md5 use in tracking is not a security context (
#7906
<https://github.com/ckan/ckan/pull/7906> _)
- Remove mentions of username change in documentation (
#8000
<https://github.com/ckan/ckan/pull/8000> _)
- Fix an old remainder in the documentation about permanent deletion of
organizations and groups (
#8022 <https://github.com/ckan/ckan/pull/8022> _)
- Allow preventing users from changing their passwords by hidding the
password1 and
password2 fields in the user edit form. (#8208
<https://github.com/ckan/ckan/pull/8208> _)
ckan db init is now alias of ckan db upgrade , which provides better
support for includuing plugin migrations (#8339
<https://github.com/ckan/ckan/pull/8339> _)
- Use case sensitive email unique validator (
#7934
<https://github.com/ckan/ckan/pull/7934> _)
It is now possible to extend interface classes directly when implementing
plugins, which provides better integration with development tools, e.g. (#7976 <https://github.com/ckan/ckan/pull/7976> _)::
class Plugin(p.SingletonPlugin, IClick):
pass
This is equivalent to::
class Plugin(p.SingletonPlugin):
p.implements(p.IClick, inherit=True)
- New
ckan config docs command, support for config options Markdown documentation (#8397
<https://github.com/ckan/ckan/pull/8397> _)
Bug fixes
CVE-2024-43371 <https://github.com/ckan/ckan/security/advisories/GHSA-g9ph-j5vj-f8wm> _: SSRF prevention mechanisms.
Added support for the :ref:ckan.download_proxy setting in the Resource Proxy <https://docs.ckan.org/en/latest/maintaining/data-viewer.html#resource-proxy> _ plugin.
CVE-2024-41674 <https://github.com/ckan/ckan/security/advisories/GHSA-2rqw-cfhc-35fh> _: fixed
Solr credentials leak via error message in package_search action.
CVE-2024-41675 <https://github.com/ckan/ckan/security/advisories/GHSA-r3jc-vhf4-6v32> _: fixed
XSS vector in DataTables view.
- Add support for custom resource_view auth in view templates (
#5909
<https://github.com/ckan/ckan/pull/5909> _)
- datastore_search_sql returns correct numeric data (
#5753
<https://github.com/ckan/ckan/pull/5753> _)
- Use
resource_delete auth function in views.resource.DeleteView . (#7131
<https://github.com/ckan/ckan/pull/7131> _)
- Fix
member_list action to exclude deleted user(when state deleted is not
updated in member table) (#7170 <https://github.com/ckan/ckan/pull/7170> _)
- Fixes a bug causing
ckan.datasets_per_page config not being used.
limit parameter in group/organization view has been removed in favor of the
config. (#7254 <https://github.com/ckan/ckan/pull/7254> _)
- Create user using one line command. (
#7343
<https://github.com/ckan/ckan/pull/7343> _)
- Fixes
datastore_active flagging during the datastore_delete action
when an empty filters dict is passed. (#7345
<https://github.com/ckan/ckan/pull/7345> _)
- Fix 500 error caused from passing null to a field using the
ckanext.datastore.logic.schema.json_validator in its schema (#7346
<https://github.com/ckan/ckan/pull/7346> _)
- Create user reference added in Installing CKAN from source (
#7366
<https://github.com/ckan/ckan/pull/7366> _)
- Fixed links and labels on dashboard/organization page. (
#7432
<https://github.com/ckan/ckan/pull/7432> _)
- Fix exception in
license_list action (#7454
<https://github.com/ckan/ckan/pull/7454> _)
- In tests, templates from
ckan.plugins set by the config file are used
even
if these plugins are disabled for the test via
pytest.mark.ckan_config("ckan.plugins", "") (#7483
<https://github.com/ckan/ckan/pull/7483> _)
- Fix usage of
defer_commit in context in create actions for users,
datasets, organizations and groups. model.Dashboard.get() no longer creates a dashboard object under the
hood if it does not exist in the database (#7487
<https://github.com/ckan/ckan/pull/7487> _)
- “Groups” link in the header is not translated. (
#7500
<https://github.com/ckan/ckan/pull/7500> _)
- Remove unnecessary use of add_public_directory from core extensions.
Standardize on assets directory as the convention for extension web assets.
(
#7504 <https://github.com/ckan/ckan/pull/7504> _)
- Redirect dashboard news feed to login page if not logged in (
#7507
<https://github.com/ckan/ckan/pull/7507> _)
- Fixed context in
set_datastore_active_flag to
solve possible solr errors during index_package (#7571
<https://github.com/ckan/ckan/pull/7571> _)
ckan generate fake-data --factory-class x.y.z:Factory does not accept field
values. (#7607 <https://github.com/ckan/ckan/pull/7607> _)
- Source files for webassets with identical names loaded from the wrong path.
(
#7610 <https://github.com/ckan/ckan/pull/7610> _)
- Context requires type-casting when
model passed explicitly. (#7611
<https://github.com/ckan/ckan/pull/7611> _)
- POST request to GET-only endpoint causes 500 error (
#7616
<https://github.com/ckan/ckan/pull/7616> _)
- Plugins randomly change their order during test session and somethimes they
work even without
with_plugins fixture. (#7638
<https://github.com/ckan/ckan/pull/7638> _)
- datastore_upsert method=insert: prevent 500 on invalid data datastore_create
datastore_create: invalid data errors now reported against records value (not
“message”) (
#7683 <https://github.com/ckan/ckan/pull/7683> _)
- Don’t rely on stable ordering from unstable
model.Package.resources list
(#7749 <https://github.com/ckan/ckan/pull/7749> _)
- Updated the
ckan.plugins.toolkit.check_ckan_version() to use
packaging.version for version comparison/testing,
Remove ckan.plugins.toolkit._version_str_2_list() method because of no use.
(#7777 <https://github.com/ckan/ckan/pull/7777> _)
- Use current CKAN version in cookiecutter tests runner template (
#7938
<https://github.com/ckan/ckan/pull/7938> _)
- URLs in activities always points to
/organization/* but custom org types
requeres /custom-organization/* URLs. This fixes those links. (#7943
<https://github.com/ckan/ckan/pull/7943> _)
- Fixed issues with the
ckan views create CLI sub-command. (#7944
<https://github.com/ckan/ckan/pull/7944> _)
- Add missing translations to aria-label attributes (
#7945
<https://github.com/ckan/ckan/pull/7945> _)
- libmagic error when CKAN 2.10.3 is installed from source (
#7986
<https://github.com/ckan/ckan/pull/7986> _)
- Populate email notification checkbox from the profile it’s on, not from the
logged-in user (
#8124 <https://github.com/ckan/ckan/pull/8124> _)
use_default_schema in package_show is now evaluated as boolean.
(#8130 <https://github.com/ckan/ckan/pull/8130> _)
- Allow using
. in Solr local parser parameters (#8138
<https://github.com/ckan/ckan/pull/8138> _)
- Hide invite user form if the user can’t create users (
#8141
<https://github.com/ckan/ckan/pull/8141> _)
- Add error notification when rebuilding the search index via the cli when the
requested package can’t be found. (
#8148
<https://github.com/ckan/ckan/pull/8148> _)
- Correct package_patch docstring re: updating resources (
#8179
<https://github.com/ckan/ckan/pull/8179> _)
- Fix exception in
group_list / organization_list when passing the
groups / organizations parameters (#8210
<https://github.com/ckan/ckan/pull/8210> _)
- Set license model
od_conformance and osd_conformance attributes’ default
values to False to prevent errors. (#8268
<https://github.com/ckan/ckan/pull/8268> _)
- Prevent exception in Datatables view when the size field is missing (
#8284
<https://github.com/ckan/ckan/pull/8284> _)
- Remove mutable global state usage in group blueprint (
#8359
<https://github.com/ckan/ckan/pull/8359> _)
- Added back
header_extra and body_extra template blocks (#8264
<https://github.com/ckan/ckan/pull/8264> _)
.. _migration-notes-2.11:
Migration notes
Starting from CKAN 2.11, the :ref:SECRET_KEY configuration option is
required to start CKAN. This is the secret token that is used by security
related tasks by CKAN and its extensions. Previous CKAN versions relied on
the beaker.session.secret config option for this.
The ckan generate config command generates a unique value for this option
each time it generates a config file. Alternatively, you can generate one
manually with the following command::
python -c “import secrets; print(secrets.token_urlsafe(20))”
Note that all the following secret configuration options will fallback to the
SECRET_KEY value if not defined in your ini file (#7781 <https://github.com/ckan/ckan/pull/7781> _):
- :ref:
WTF_CSRF_SECRET_KEY
- :ref:
api_token.jwt.encode.secret
- :ref:
api_token.jwt.decode.secret
The sessions handling has been refactored, dropping the Beaker library in
favour of Flask-Session <https://flask-session.readthedocs.io/en/latest/config.html> _.
Note that the default session backend for new sites remains the client-side
browser cookie based. See :ref:SESSION_TYPE for alternative backends available.
The following configuration options need to be updated (#7893 <https://github.com/ckan/ckan/pull/7893> _) :
================================= ==============================================
Old configuration key New configuration key
================================= ==============================================
beaker.session.type :ref:SESSION_TYPE
beaker.session.key :ref:SESSION_COOKIE_NAME
beaker.session.cookie_expires :ref:SESSION_PERMANENT (with opposite value)
beaker.session.timeout :ref:PERMANENT_SESSION_LIFETIME
beaker.session.cookie_domain :ref:SESSION_COOKIE_DOMAIN
beaker.session.secure :ref:SESSION_COOKIE_SECURE
beaker.session.httponly :ref:SESSION_COOKIE_HTTPONLY
beaker.session.samesite :ref:SESSION_COOKIE_SAMESITE
================================= ==============================================
When parsing the configuration file, the default behaviour starting from
CKAN 2.11 is the old strict mode, where CKAN will not
start unless all config options are valid according to the validators
defined in the :ref:configuration declaration <declare-config-options> . For every invalid
config option,
an error will be printed to the output stream. (#7776
<https://github.com/ckan/ckan/pull/7776> _)
- If using the DataStore, the underlying storage for data dictionary fields
has changed. Use
ckan datastore upgrade after upgrading to this release
to migrate it (#7971 <https://github.com/ckan/ckan/pull/7971> _)
- When the
activity plugin is enabled, every action that creates an activity
recored(i.e. package_create , package_update , package_delete , group_* ,
organization_* , user_* , bulk_update_* ) requires a context['user'] and
raises ValidationError if it’s missing or empty. (#7627
<https://github.com/ckan/ckan/pull/7627> _)
- The configuration option to customize the authorization header name has been
renamed to :ref:
apitoken_header_name from apikey_header_name .
- Only sysadmins can now set the
id field of Datasets, Groups,
Organizations, Users, Resource Views and Extras (#8069 <https://github.com/ckan/ckan/pull/8069> _)
- If provided, the value of the
id field needs to be a valid UUID string.
Sites using custom ids that are not UUIDs can extend the relevant
schema or validate methods to override the validation on the id field,
but are strongly encouraged to use a separate custom field to store the
custom id instead. (#8069 <https://github.com/ckan/ckan/pull/8069> _)
- The
form_to_db_* and db_to_form_* methods of the IGroupForm
interface are now deprecated, and have been replaced
bycreate_group_schema() , update_group_schema() and
show_group_schema() . (#8069 <https://github.com/ckan/ckan/pull/8069> _)
Tests performing requests using the test client should authenticate users
sending the default Authorization header with a valid token, as opposed
to sending the user name in environ_overrides (or the older
extra_environ ) (#7841 <https://github.com/ckan/ckan/pull/7841> _)
Before::
def test_dataset_new(app):
user = factories.User()
app.get(url_for("dataset.new"), environ_overrides={"REMOTE_USER": user["name"]})
After::
def test_dataset_new(app):
user = factories.UserWithToken()
app.get(url_for("dataset.new"), headers={"Authorization": user["token"]})
- Only sysadmins can now set the
id field of Datasets, Groups,
Organizations, Users, Resource Views and Extras
- If provided, the value of the
id field needs to be a valid UUID v4
string. Sites using custom ids that are not UUIDs can extend the relevant
schema or validate methods to override the validation on the id field,
but are strongly encouraged to use a separate custom field to store the
custom id instead.
The following interfaces are iterated in reverse order when using
:py:class:~ckan.plugins.core.PluginImplementations(interface) (#7609 <https://github.com/ckan/ckan/pull/7609> _):
IConfigDeclaration
IConfigurer
ITranslation
IValidators
:py:meth:~ckanext.datastore.interfaces.IDatastore.datastore_search of
:py:class:~ckanext.datastore.interfaces.IDatastore interface is not
completely
compatible with old version.
where key of the query_dict returned from this method has a different
format. Before it was a collection of tuples with an SQL where-clause with
positional/named % -style placeholders on the first position, followed by
arbitrary number of parameters::
return {
…,
“where”: [(‘“age” BETWEEN %s AND %s’, param1, param2, …), …]
}
Now every element of collection must be a tuple that contains SQL
where-clause
with named : -style placeholders and a dict with the values for all
the
placeholders::
return {
…,
“where”: [(
‘“age” BETWEEN :my_ext_min AND :my_ext_max’,
{“my_ext_min”: age_between[0], “my_ext_max”: age_between[1]},
)]
}
In order to avoid name conflicts with placeholders from different plugin,
don’t
use simple names, i.e. val , min , name , and add unique prefix to
all
the placeholders. (#7583 <https://github.com/ckan/ckan/pull/7583> _)
snippet/organization.html has been moved to
organization/snippets/info.html for consistency with Groups/Packages/Users.
(#7685 <https://github.com/ckan/ckan/pull/7685> _)
- Tracking feature has been moved to its own core extension. Therefore,
ckan.tracking_enabled configuration option should be changed to adding
tracking to CKAN’s plugins list. g.tracking_enabled attribute no
longer exist. tracking_summary info will be returned if the extension is enabled.
include_tracking parameter is no longer required. (#7772
<https://github.com/ckan/ckan/pull/7772> _)
Removals and deprecations
PackageExtra and GroupExtra models will be removed in the next release
and replaced by Package.extras and Group.extras JSONB fields. Code that
accesses these models directly will need to be updated to use the
Package.extras and Group.extras dicts for updating and JSON queries like
query(Package, Package.extras['name'] == '"value"') . (#8288 <https://github.com/ckan/ckan/pull/8288> _)
- All revision tables will be removed from the database in the next
release. If you are upgrading from a ckan older than 2.9 and want to
keep the history of changes this release is the last chance to run the
migrate_package_activity.py script as described in the 2.9.0
:ref:migration-notes-2.9 . (#8320 <https://github.com/ckan/ckan/pull/8320> _)
- The
form_to_db_* and db_to_form_* methods of the IGroupForm
interface are now deprecated, and have been replaced
bycreate_group_schema() , update_group_schema() and
show_group_schema() . (#8069 <https://github.com/ckan/ckan/pull/8069> _)
- Removes
dataset-form and dataset-resource-form classes from our HTML
templates since they do not exist in our CSS files. (#7164
<https://github.com/ckan/ckan/pull/7164> _)
- The
resource blueprint will be removed in the future. The blueprint
<package_type>_resource is preferred.
E.g. use dataset_resource.read instead of resource.read (#7373
<https://github.com/ckan/ckan/pull/7373> _)
- Removes all calls and references to the deprecated
check_data_dict method.
(#7420 <https://github.com/ckan/ckan/pull/7420> _)
- The
site_read authz function has been removed since it always returned True.
(#7544 <https://github.com/ckan/ckan/pull/7544> _)
SQLAlchemy’s Metadata object (:py:attr:ckan.model.meta.metadata ) is no
longer bound the the DB engine. A number of operations <https://docs.sqlalchemy.org/en/14/changelog/migration_20.html#implicit-and-connectionless-execution-bound-metadata-removed> _
such as table.exists() , table.create() , metadata.create_all() ,
metadata.reflect() , now produce an :py:class:sqlalchemy.exc.UnboundExecutionError error (#7583
<https://github.com/ckan/ckan/pull/7583> _) .
Depending on the situation, the following changes may be required:
- Instead of creating tables via custom CLI command or during application
startup, use
Alembic migrations <https://docs.ckan.org/en/2.11/extensions/best-practices.html#use-migrations-when-introducing-new-models> _
- If there is no other way, change
table.create() /table.exists() to
table.create(engine) /table.exists() . Get engine by calling
:py:func:~ckan.model.ensure_engine .
- The Boostrap 3 based templates have been removed. (
#7637
<https://github.com/ckan/ckan/pull/7637> _)
template_head_end and template_footer_end config options have been
removed. You can achieve the same effect by extending the base.html
template. (#7672 <https://github.com/ckan/ckan/pull/7672> _)
ckan.dumps_url and ckan.dumps_format config options have been removed.
You can achieve the same effect by extending package/search.html . (#7673
<https://github.com/ckan/ckan/pull/7673> _)
The build_extra_admin_nav helper and ckan.admin_tabs config have been
removed. To achieve the same result it is possible to add a nav icon by extending the content_primary_nav
block in ckan/templates/admin/base.html (#7674 <https://github.com/ckan/ckan/pull/7674> _) ::
{% ckan_extends %}
{% block content_primary_nav %}
{{ super() }}
{{ h.build_nav_icon(‘example_extension.endpoint’, _(‘My Cool Feature’), icon=’trophy’) }}
{% endblock %}
The ckan.homepage_style configuration options and the homepage_style
variable have been removed. layout1.html code has been moved into
home/index.html , as it will be the only layout available. (#7677
<https://github.com/ckan/ckan/pull/7677> _)
- The Recline-based view plugins (
recline_view , recline_grid_view ,
recline_map_view , etc) have been removed and are no longer available.
Users are encouraged to use the DataTables-based view (datatables_view )
or some of the community maintained alternatives
<https://docs.ckan.org/en/2.11/maintaining/data-viewer.html#other-view-plugins> _
#7918 <https://github.com/ckan/ckan/pull/7918> _)
- Move datastore-specific download logic from
ckan/templates/package/resource_read.html
to ckanext/datastore/templates/package/resource_read.html (#7927
<https://github.com/ckan/ckan/pull/7927> _)
- The deprecated methods with the form
after_<action> and
before_<action> of the
:py:class:~ckan.plugins.interfaces.IPackageController and
:py:class:~ckan.plugins.interfaces.IResourceController interfaces have been
removed. The form after_<type>_<action> must be used from now on. E.g.
after_create() -> after_dataset_create() or
after_resource_create() . (#7976 <https://github.com/ckan/ckan/pull/7976> _)
All plugins need to be instances of p.SingletonPlugin, they can’t inherit
from a base class that is an instance itself. For example, you need to move
from this (#7976 <https://github.com/ckan/ckan/pull/7976> _) ::
class FirstPlugin(p.SingletonPlugin):
p.implements(ISomething)
def some_method(self):
pass
class SecondPlugin(FirstPlugin):
p.implements(IAnything)
To this::
class BasePlugin():
def some_method(self):
pass
class FirstPlugin(p.SingletonPlugin, BasePlugin):
p.implements(ISomething)
class SecondPlugin(p.SingletonPlugin, BasePlugin):
p.implements(IAnything)
|