Metadata-Version: 2.4
Name: iaweb.privacy
Version: 2.0.0
Summary: Privacy rules for IMIO web projects
Author-email: Martin Peeters <support@imio.be>
License-Expression: GPL-2.0-only
Project-URL: PyPI, https://pypi.org/project/iaweb.privacy
Project-URL: Source, https://github.com/IMIO/iaweb.privacy
Project-URL: Issues, https://github.com/IMIO/iaweb.privacy/issues
Project-URL: Changelog, https://github.com/IMIO/iaweb.privacy/blob/master/CHANGES.md
Keywords: Python,Plone
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Plone
Classifier: Framework :: Plone :: 6.1
Classifier: Framework :: Plone :: 6.2
Classifier: Framework :: Plone :: Addon
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.GPL
License-File: LICENSE.md
Requires-Dist: Products.GenericSetup
Requires-Dist: Zope
Requires-Dist: collective.privacy
Requires-Dist: plone.app.upgrade
Requires-Dist: plone.base
Requires-Dist: z3c.jbot
Provides-Extra: test
Requires-Dist: plone.app.testing; extra == "test"
Requires-Dist: plone.browserlayer; extra == "test"
Requires-Dist: zest.releaser[recommended]; extra == "test"
Requires-Dist: zestreleaser.towncrier; extra == "test"
Requires-Dist: zope.testrunner; extra == "test"
Dynamic: license-file

# iaweb.privacy

[![Tests](https://github.com/IMIO/iaweb.privacy/actions/workflows/test-matrix.yml/badge.svg)](https://github.com/IMIO/iaweb.privacy/actions/workflows/test-matrix.yml)
[![Meta](https://github.com/IMIO/iaweb.privacy/actions/workflows/meta.yml/badge.svg)](https://github.com/IMIO/iaweb.privacy/actions/workflows/meta.yml)

This package implements collective.privacy rules for IMIO web projects.

Installing it loads the minimal rule (`rules/minimal.zcml`, basic cookies). The
other rules are opt-in: include the files you need from your own package, for
example `<include package="iaweb.privacy.rules" file="analytics.zcml" />`.

| File | Rules |
|---|---|
| `minimal.zcml` | `all_basic_cookies` |
| `analytics.zcml` | `basic_analytics` |
| `embed.zcml` | `show_genetic_embed` |
| `media.zcml` | `show_youtube_media_embed`, `show_vimeo_media_embed` |
| `multilingual.zcml` | `language_preference` |
| `social.zcml` | `show_facebook_share`, `show_twitter_share` |
| `all.zcml` | All of the above, except `minimal.zcml` |

Version 2.x supports Plone 6.1 on Python 3.10 to 3.13, and Plone 6.2 on Python
3.10 to 3.14.
For older Plone versions, use iaweb.privacy 1.0a2.


## Installation

Add `iaweb.privacy` to the dependencies of your project (`pyproject.toml`, or
`requirements.txt` with the Plone constraints), install it, restart Plone and
activate the add-on in *Site Setup* > *Add-ons*. This also installs
collective.privacy.


## Development

Requires [uv](https://docs.astral.sh/uv/). This installs Plone 6.2.3 in `.venv`
(use `PLONE_VERSION=6.1.6 make install` for another version), checks out the
`plone62` branch of collective.privacy in `sources/` (see `mx.ini`) and installs
the prek git hook:

```shell
make install
make start          # Plone on http://localhost:8080 (admin / admin)
```

Create a Classic UI site from the browser, then activate iaweb.privacy.

### Tests

Tests run through tox, as the CI does:

```shell
make test                                   # Plone 6.2.3
uvx --with tox-uv tox -e py312-plone61      # one Plone / Python combination
make test-all                               # lint, every combination, dependencies
```

Without tox:

```shell
.venv/bin/zope-testrunner --test-path=src -s iaweb.privacy
```

### Lint

```shell
make check          # format then lint (pyupgrade, isort, black, zpretty, flake8...)
```

### Translations

```shell
make i18n           # rebuild the iaweb.privacy and collective.privacy catalogs
```

`.editorconfig`, `.flake8`, `.gitignore`, `.pre-commit-config.yaml`, `tox.ini`,
`.github/` and the tool sections of `pyproject.toml` are generated by
[plone.meta](https://github.com/plone/meta): change `.meta.toml`, then run
`uvx --from plone.meta config-package --no-commit --branch current .`.


## Contribute

- Issue Tracker: https://github.com/IMIO/iaweb.privacy/issues
- Source Code: https://github.com/IMIO/iaweb.privacy


## License

The project is licensed under the GPLv2.

# Contributors

- Martin Peeters, mpeeters [original author]

# Changelog

<!-- towncrier release notes start -->

## 2.0.0 (2026-11-19)


- Breaking: replace the `pkg_resources` namespace of `iaweb` with a PEP 420
  native namespace. Support Plone 6.1 only on Python 3.10 to 3.13, and Plone
  6.2 on Python 3.10 to 3.14. Use 1.0a2 for older Plone versions.
  [remdub]

- Import `INonInstallable` from `plone.base` instead of the alias Plone 6.2
  deprecates, and port the setup tests from `portal_quickinstaller` to
  `get_installer`.
  [remdub]

- Include the CMFCore permissions in `configure.zcml`, so the package also
  loads when it is included before Plone (`zcml_package_includes`).
  [remdub]

- Fix `rules/all.zcml`, which included a nonexistent `medial.zcml`.
  [remdub]

- Configure the package with plone.meta 2.12.0 (test matrix on Plone 6.2.3
  and 6.1), move its metadata to `pyproject.toml`, convert the documentation
  to Markdown and run the development environment on Plone 6.2.3 with uv
  instead of buildout. Drop the broken `update_locale` console script.
  [remdub]


## 1.0a2 (2022-01-19)


- SUP-21477: Change default cookies texts
  [laulaz]


## 1.0a1 (2021-12-13)


- Initial release.
  [mpeeters]
