<commit_before>.. _migration-guide:

pycsw Migration Guide
=====================

This page provides migration support across pycsw versions
over time to help with pycsw change management.

pycsw 2.x to 3.0 Migration
--------------------------

- the default endpoint is now powered by ``pycsw/wsgi_flask.py`` (based on Flask),
  which supports ALL pycsw supported APIs
- the default endpoint ``/`` is now OARec
- the CSW endpoint is now ``/csw``
- the OAI-PMH endpoint is now ``/oaipmh``
- the OpenSearch endpoint is now ``/opensearch``
- the SRU endpoint is now ``/sru``


pycsw 1.x to 2.0 Migration
--------------------------

- the default CSW version is now 3.0.0.  CSW clients need to explicitly specify
  ``version=2.0.2`` for CSW 2 behaviour.  Also, pycsw administrators can use a
  WSGI wrapper to the pycsw API to force ``version=2.0.2`` on init of
  ``pycsw.server.Csw`` from the server.  See :ref:`csw-support` for more information.

- ``pycsw.server.Csw.dispatch_wsgi()`` previously returned the response
  content as a string.  2.0.0 introduces a compatability break to
  additionally return the HTTP status code along with the response as a list<commit_msg>Update migration guide<commit_after>.. _migration-guide:

pycsw Migration Guide
=====================

This page provides migration support across pycsw versions
over time to help with pycsw change management.

pycsw 2.x to 3.0 Migration
--------------------------

- the default endpoint for standalone deployments is now powered by ``pycsw/wsgi_flask.py`` (based on Flask) which supports ALL pycsw supported APIs. Make sure to use ``requirements-standalone.txt`` on top of ``requirements.txt`` to install Flask along other standalone requirements.
- the previously used ``pycsw/wsgi.py`` can still be used for CSW only deployments or for applications that need to integrate pycsw as a library (e.g. Django applications). Pypi installations still use ``requirements.txt`` which is not installing Flask by default.
- the default endpoint ``/`` is now OARec
- the CSW endpoint is now ``/csw``
- the OAI-PMH endpoint is now ``/oaipmh``
- the OpenSearch endpoint is now ``/opensearch``
- the SRU endpoint is now ``/sru``


pycsw 1.x to 2.0 Migration
--------------------------

- the default CSW version is now 3.0.0.  CSW clients need to explicitly specify
  ``version=2.0.2`` for CSW 2 behaviour.  Also, pycsw administrators can use a
  WSGI wrapper to the pycsw API to force ``version=2.0.2`` on init of
  ``pycsw.server.Csw`` from the server.  See :ref:`csw-support` for more information.

- ``pycsw.server.Csw.dispatch_wsgi()`` previously returned the response
  content as a string.  2.0.0 introduces a compatability break to
  additionally return the HTTP status code along with the response as a list
{'fraction_non_alphanumeric': 0.13467770975873244, 'fraction_numerical': 0.013683831472812387, 'mean_word_length': 3.3817034700315456, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1273763', 'n_tokens_mistral': 850, 'n_tokens_neox': 804, 'n_words': 360}