<commit_before>=========
Upgrading
=========


When upgrading from an older version, you might encounter some backwards
incompatibility. The ``webassets`` API is not stable yet.


In development version
~~~~~~~~~~~~~~~~~~

- The :class:`Resolver` API has changed. Rather than being bound to an
  environment via the constructor, the individual methods now receive
  a ``ctx` object, which allows access to the environment's settings.

  See :ref:`the page on implementing resolvers <custom_resolver>`.


In 0.9
~~~~~~

- Python 2.5 is no longer supported.

- The API of the BaseCache.get() method has changed. It no longer receives
  a ``python`` keyword argument. This only affects you if you have
  implemented a custom cache class.

- The :meth:`Bundle.build` and :meth:`Bundle.url` methods no longer accept
  an environment argument. To work with a Bundle that is not attached to
  an environment already, use the following syntax instead::

      with bundle.bind(env):
          bundle.build()

- Filters can no longer access a ``self.env`` attribute. It has been renamed
  to ``self.ctx``, which provides a compatible object.


In 0.8
~~~~~~

- **django-assets is no longer included!**
  You need to install it's package separately. See the current
  `development version <https://github.com/miracle2k/django-assets>`_.

  .. warning::
    When upgrading, you need to take extra care to rid yourself of the old
    version of webassets before installing the separate ``django-assets``
    package. This is to avoid that Python still finds the old ``django_assets``
    module that used to be included with ``webassets``.

    In some cases, even ``pip uninstall webassets`` is not enough, and old
    ``*.pyc`` files are kept around. I recommend that you delete your old
    webassets install manually from the filesystem. To find out where it is
    stored, open a Python shell and do::

        >>> import webassets<commit_msg>Move incompat changes to right section in docs.<commit_after>=========
Upgrading
=========


When upgrading from an older version, you might encounter some backwards
incompatibility. The ``webassets`` API is not stable yet.


In development version
~~~~~~~~~~~~~~~~~~

- The :class:`Resolver` API has changed. Rather than being bound to an
  environment via the constructor, the individual methods now receive
  a ``ctx` object, which allows access to the environment's settings.

  See :ref:`the page on implementing resolvers <custom_resolver>`.

- The :meth:`Bundle.build` and :meth:`Bundle.url` methods no longer accept
  an environment argument. To work with a Bundle that is not attached to
  an environment already, use the following syntax instead::

      with bundle.bind(env):
          bundle.build()

- Filters can no longer access a ``self.env`` attribute. It has been renamed
  to ``self.ctx``, which provides a compatible object.


In 0.9
~~~~~~

- Python 2.5 is no longer supported.

- The API of the BaseCache.get() method has changed. It no longer receives
  a ``python`` keyword argument. This only affects you if you have
  implemented a custom cache class.


In 0.8
~~~~~~

- **django-assets is no longer included!**
  You need to install it's package separately. See the current
  `development version <https://github.com/miracle2k/django-assets>`_.

  .. warning::
    When upgrading, you need to take extra care to rid yourself of the old
    version of webassets before installing the separate ``django-assets``
    package. This is to avoid that Python still finds the old ``django_assets``
    module that used to be included with ``webassets``.

    In some cases, even ``pip uninstall webassets`` is not enough, and old
    ``*.pyc`` files are kept around. I recommend that you delete your old
    webassets install manually from the filesystem. To find out where it is
    stored, open a Python shell and do::

        >>> import webassets
{'fraction_non_alphanumeric': 0.09805427547363031, 'fraction_numerical': 0.0035842293906810036, 'mean_word_length': 3.724304715840387, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '5748877', 'n_tokens_mistral': 1044, 'n_tokens_neox': 986, 'n_words': 518}