You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(63) |
Aug
(394) |
Sep
(418) |
Oct
(485) |
Nov
(251) |
Dec
(109) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(213) |
Feb
(151) |
Mar
(84) |
Apr
(140) |
May
(296) |
Jun
(277) |
Jul
(111) |
Aug
(134) |
Sep
(589) |
Oct
(405) |
Nov
(413) |
Dec
(497) |
| 2004 |
Jan
(600) |
Feb
(408) |
Mar
(402) |
Apr
(350) |
May
(223) |
Jun
(123) |
Jul
(121) |
Aug
(73) |
Sep
(46) |
Oct
(131) |
Nov
(116) |
Dec
(100) |
| 2005 |
Jan
(74) |
Feb
(63) |
Mar
(333) |
Apr
(476) |
May
(277) |
Jun
(325) |
Jul
(365) |
Aug
(285) |
Sep
(110) |
Oct
(228) |
Nov
(158) |
Dec
(294) |
| 2006 |
Jan
(218) |
Feb
(242) |
Mar
(212) |
Apr
(214) |
May
(282) |
Jun
(243) |
Jul
(162) |
Aug
(409) |
Sep
(265) |
Oct
(243) |
Nov
(216) |
Dec
(378) |
| 2007 |
Jan
(122) |
Feb
(1195) |
Mar
(713) |
Apr
(628) |
May
(459) |
Jun
(508) |
Jul
(618) |
Aug
(634) |
Sep
(472) |
Oct
(398) |
Nov
(485) |
Dec
(491) |
| 2008 |
Jan
(433) |
Feb
(488) |
Mar
(590) |
Apr
(385) |
May
(337) |
Jun
(320) |
Jul
(599) |
Aug
(545) |
Sep
(216) |
Oct
(397) |
Nov
(501) |
Dec
(500) |
| 2009 |
Jan
(791) |
Feb
(569) |
Mar
(880) |
Apr
(487) |
May
(557) |
Jun
(509) |
Jul
(561) |
Aug
(1223) |
Sep
(605) |
Oct
(924) |
Nov
(1194) |
Dec
(571) |
| 2010 |
Jan
(894) |
Feb
(825) |
Mar
(1195) |
Apr
(806) |
May
(490) |
Jun
(666) |
Jul
(887) |
Aug
(1188) |
Sep
(889) |
Oct
(649) |
Nov
(759) |
Dec
(513) |
| 2011 |
Jan
(593) |
Feb
(689) |
Mar
(480) |
Apr
(932) |
May
(935) |
Jun
(725) |
Jul
(631) |
Aug
(352) |
Sep
(670) |
Oct
(181) |
Nov
(440) |
Dec
(284) |
| 2012 |
Jan
(701) |
Feb
(657) |
Mar
(933) |
Apr
(732) |
May
(1253) |
Jun
(667) |
Jul
(709) |
Aug
(996) |
Sep
(1549) |
Oct
(1921) |
Nov
(790) |
Dec
(651) |
| 2013 |
Jan
(2005) |
Feb
(618) |
Mar
(1150) |
Apr
(1511) |
May
(1195) |
Jun
(720) |
Jul
(1053) |
Aug
(834) |
Sep
(1016) |
Oct
(831) |
Nov
(611) |
Dec
(153) |
| 2014 |
Jan
(360) |
Feb
(796) |
Mar
(543) |
Apr
(535) |
May
(227) |
Jun
(369) |
Jul
(257) |
Aug
(299) |
Sep
(336) |
Oct
(541) |
Nov
(1156) |
Dec
(727) |
| 2015 |
Jan
(1398) |
Feb
(1428) |
Mar
(2304) |
Apr
(1435) |
May
(1616) |
Jun
(1106) |
Jul
(2093) |
Aug
(1363) |
Sep
(3408) |
Oct
(1804) |
Nov
(913) |
Dec
(1088) |
| 2016 |
Jan
(1363) |
Feb
(2423) |
Mar
(1573) |
Apr
(1675) |
May
(2333) |
Jun
(1057) |
Jul
(868) |
Aug
(1338) |
Sep
(1493) |
Oct
(1503) |
Nov
(1027) |
Dec
(789) |
| 2017 |
Jan
(890) |
Feb
(1762) |
Mar
(1477) |
Apr
(1372) |
May
(1273) |
Jun
(917) |
Jul
(1032) |
Aug
(63) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(68) |
| 2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(110) |
Nov
(42) |
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(52) |
2
(23) |
3
(4) |
|
4
(29) |
5
(30) |
6
(154) |
7
(160) |
8
(145) |
9
(69) |
10
(3) |
|
11
(3) |
12
(48) |
13
(71) |
14
(9) |
15
(91) |
16
(65) |
17
(7) |
|
18
(25) |
19
(26) |
20
(77) |
21
(50) |
22
(9) |
23
(22) |
24
(1) |
|
25
(7) |
26
(33) |
27
(67) |
28
(58) |
29
(53) |
30
(102) |
|
|
From: Steve M. <je...@pl...> - 2016-09-30 22:30:28
|
Repository: ansible.plone_server Branch: refs/heads/master Date: 2016-09-30T15:30:03-07:00 Author: Steve McMahon (smcmahon) <st...@dc...> Commit: https://github.com/plone/ansible.plone_server/commit/3420734aa025a7339cbe5acb0321fda2af68aff5 Prepare 1.2.12 Files changed: M HISTORY.txt M version.txt diff --git a/HISTORY.txt b/HISTORY.txt index 98a85d8..8b3c9d9 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,4 +1,4 @@ -1.2.12 unreleased +1.2.12 2016-09-30 - Switch to use Posix xX distinction in chmod rather than find/exec strategy. [djowett] diff --git a/version.txt b/version.txt index 47822d7..8ffacd4 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.2.9 2016-07-08 \ No newline at end of file +1.2.12 2016-09-30 \ No newline at end of file |
|
From: Steve M. <je...@pl...> - 2016-09-30 22:26:40
|
Repository: ansible.plone_server Branch: refs/heads/master Date: 2016-09-30T15:26:10-07:00 Author: Steve McMahon (smcmahon) <st...@dc...> Commit: https://github.com/plone/ansible.plone_server/commit/c97784298d5f4346bb95745e193c86f53f562e7f Add chmod change to history Files changed: M HISTORY.txt diff --git a/HISTORY.txt b/HISTORY.txt index 62b2cc7..98a85d8 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,13 +1,20 @@ 1.2.12 unreleased +- Switch to use Posix xX distinction in chmod rather than find/exec strategy. + [djowett] + - Update default version to 5.0.6. Add 20160830 hotfix. + [smcmahon] - Use jinja2's version_compare when comparing complex version numbers. Fixes #95. + [smcmahon] - Default Vagrant box: trusty -> xenial. + [smcmahon] - Add a provisioning mechanism that creates vbox_host.cfg during vagrant provisioning. This makes it easier to use Ansible directly against the newer generation of Vagrant boxes that don't have insecure keys. + [smcmahon] 1.2.11 2016-07-18 |
|
From: Steve M. <je...@pl...> - 2016-09-30 22:26:39
|
Repository: ansible.plone_server Branch: refs/heads/master Date: 2016-09-30T14:57:31-07:00 Author: Steve McMahon (smcmahon) <st...@dc...> Commit: https://github.com/plone/ansible.plone_server/commit/7d163de6fb94266b569cc4bd5997474bb9bb672b Merge branch 'tidy-up-setpermissions' of https://github.com/jowent/ansible.plone_server into jowent-tidy-up-setpermissions Files changed: M templates/buildout.cfg.j2 diff --git a/templates/buildout.cfg.j2 b/templates/buildout.cfg.j2 index 40446ff..b51e9d3 100644 --- a/templates/buildout.cfg.j2 +++ b/templates/buildout.cfg.j2 @@ -218,11 +218,9 @@ command = # Dummy references to force this to execute after referenced parts echo ${backup:location} > /dev/null chmod 600 .installed.cfg - # Make sure anything we've created in var is r/w by our group - find ${buildout:var-dir} -type d -exec chmod 770 {} \; 2> /dev/null - find ${buildout:var-dir} -type f -exec chmod 660 {} \; 2> /dev/null - find ${buildout:backups-dir} -type d -exec chmod 770 {} \; 2> /dev/null - find ${buildout:backups-dir} -type f -exec chmod 660 {} \; 2> /dev/null + # Make sure anything we've created in var is r/w by our group, but no-one else + chmod -R ug+rwX,o-rwx ${buildout:var-dir} + chmod -R ug+rwX,o-rwx ${buildout:backups-dir} chmod 754 ${buildout:directory}/bin/* update-command = ${:command} |
|
From: Daniel J. <je...@pl...> - 2016-09-30 22:26:39
|
Repository: ansible.plone_server Branch: refs/heads/master Date: 2016-08-09T18:07:46+01:00 Author: Daniel Jowett (djowett) <da...@jo...> Commit: https://github.com/plone/ansible.plone_server/commit/9b00c3ee590f0c875559f5208c7ad2158389eb1d Tidy up setpermissions (and perhaps speed it up too) See http://superuser.com/a/91966 for info on why we can use chown -R to replace the 'find -exec chown' thing Files changed: M templates/buildout.cfg.j2 diff --git a/templates/buildout.cfg.j2 b/templates/buildout.cfg.j2 index 06305db..e87fa23 100644 --- a/templates/buildout.cfg.j2 +++ b/templates/buildout.cfg.j2 @@ -203,11 +203,9 @@ command = # Dummy references to force this to execute after referenced parts echo ${backup:location} > /dev/null chmod 600 .installed.cfg - # Make sure anything we've created in var is r/w by our group - find ${buildout:var-dir} -type d -exec chmod 770 {} \; 2> /dev/null - find ${buildout:var-dir} -type f -exec chmod 660 {} \; 2> /dev/null - find ${buildout:backups-dir} -type d -exec chmod 770 {} \; 2> /dev/null - find ${buildout:backups-dir} -type f -exec chmod 660 {} \; 2> /dev/null + # Make sure anything we've created in var is r/w by our group, but no-one else + chmod -R ug+rwX,o-rwx ${buildout:var-dir} + chmod -R ug+rwX,o-rwx ${buildout:backups-dir} chmod 754 ${buildout:directory}/bin/* update-command = ${:command} |
|
From: GitHub <je...@pl...> - 2016-09-30 21:33:30
|
Repository: ansible.plone_server Branch: refs/heads/master Date: 2016-09-30T14:33:15-07:00 Author: Steve McMahon (smcmahon) <st...@dc...> Commit: https://github.com/plone/ansible.plone_server/commit/7f6113a7c882e1057b4604417e1e8b37cd24664e Merge pull request #97 from plone/write_vbox New vbox strategy Files changed: M HISTORY.txt M Vagrantfile M defaults/main.yml M templates/buildout.cfg.j2 M vbox_host.cfg diff --git a/HISTORY.txt b/HISTORY.txt index 61f30c3..62b2cc7 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,10 +1,13 @@ 1.2.12 unreleased +- Update default version to 5.0.6. Add 20160830 hotfix. + - Use jinja2's version_compare when comparing complex version numbers. Fixes #95. - Default Vagrant box: trusty -> xenial. -- Disable Vagrant's replacement of default insecure key, as it makes use with Windows very difficult. +- Add a provisioning mechanism that creates vbox_host.cfg during vagrant provisioning. + This makes it easier to use Ansible directly against the newer generation of Vagrant boxes that don't have insecure keys. 1.2.11 2016-07-18 diff --git a/Vagrantfile b/Vagrantfile index 1750822..d7f9775 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -3,11 +3,54 @@ VAGRANTFILE_API_VERSION = "2" -Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| +# We use this provisioner to write the vbox_host.cfg ansible inventory file, +# which makes it easier to use ansible-playbook directly. +module AnsibleInventory + class Config < Vagrant.plugin("2", :config) + attr_accessor :machine + end + + class Plugin < Vagrant.plugin("2") + name "write_vbox_cfg" + + config(:write_vbox_cfg, :provisioner) do + Config + end - # Use insecure key, which makes it easier to run test scripts. - # Change this if your guest box is outside-accessible. - config.ssh.insert_key = false + provisioner(:write_vbox_cfg) do + Provisioner + end + end + + class Provisioner < Vagrant.plugin("2", :provisioner) + def provision + # get the output ov vagrant ssh-config <machine> + require 'open3' + stdin, stdout, stderr, wait_thr = Open3.popen3('vagrant', 'ssh-config', config.machine) + output = stdout.gets(nil) + stdout.close + stderr.gets(nil) + stderr.close + exit_code = wait_thr.value.exitstatus + if exit_code == 0 + # parse out the key variables + /HostName (?<host>.+)/ =~ output + /Port (?<port>.+)/ =~ output + /User (?<user>.+)/ =~ output + /IdentityFile (?<keyfile>.+)/ =~ output + # write an ansible inventory file + contents = "myhost ansible_ssh_port=#{port} ansible_ssh_host=#{host} ansible_ssh_user=#{user} ansible_ssh_private_key_file=#{keyfile}\n" + File.open("vbox_host.cfg", "w") do |aFile| + aFile.puts(contents) + end + end + result = exit_code + end + end +end + + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.provider "virtualbox" do |v| v.memory = 1024 @@ -17,6 +60,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "wheezy", autostart: false do |wheezy| wheezy.vm.box = "debian/wheezy64" wheezy.vm.synced_folder ".", "/vagrant", disabled: true + wheezy.vm.provision "write_vbox_cfg", machine: "wheezy" wheezy.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end @@ -25,14 +69,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "jessie", autostart: false do |jessie| jessie.vm.box = "debian/jessie64" jessie.vm.synced_folder ".", "/vagrant", disabled: true - jessie.vm.provision "ansible" do |ansible| - ansible.playbook = "test.yml" - end + jessie.vm.provision "write_vbox_cfg", machine: "jessie" + jessie.vm.provision "ansible", playbook:"test.yml" end config.vm.define "precise", autostart: false do |precise| precise.vm.box = "bento/ubuntu-12.04" precise.vm.synced_folder ".", "/vagrant", disabled: true + precise.vm.provision "write_vbox_cfg", machine: "precise" precise.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end @@ -41,6 +85,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "trusty", primary: false, autostart: false do |trusty| trusty.vm.box = "ubuntu/trusty64" trusty.vm.synced_folder ".", "/vagrant", disabled: true + trusty.vm.provision "write_vbox_cfg", machine: "trusty" trusty.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end @@ -49,22 +94,25 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "wily", autostart: false do |wily| wily.vm.box = "ubuntu/wily64" wily.vm.synced_folder ".", "/vagrant", disabled: true + wily.vm.provision "write_vbox_cfg", machine: "wily" wily.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end end config.vm.define "xenial", primary: true, autostart: true do |myhost| - myhost.vm.box = "ubuntu/xenial64" - myhost.vm.provision "shell", inline: "apt-get install -y python" - myhost.vm.provision "ansible" do |ansible| - ansible.playbook = "test.yml" - end + myhost.vm.box = "ubuntu/xenial64" + myhost.vm.provision "shell", inline: "apt-get install -y python" + myhost.vm.provision "write_vbox_cfg", machine: "xenial" + myhost.vm.provision "ansible" do |ansible| + ansible.playbook = "test.yml" + end end config.vm.define "centos6", primary: false, autostart: false do |centos6| centos6.vm.box = "bento/centos-6.7" centos6.vm.synced_folder ".", "/vagrant", disabled: true + centos6.vm.provision "write_vbox_cfg", machine: "centos6" centos6.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end @@ -73,6 +121,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "centos7", primary: false, autostart: false do |centos7| centos7.vm.box = "centos/7" centos7.vm.synced_folder ".", "/vagrant", disabled: true + centos7.vm.provision "write_vbox_cfg", machine: "centos7" centos7.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end diff --git a/defaults/main.yml b/defaults/main.yml index 8def75e..6841315 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,7 +2,7 @@ ansible_ssh_pipelining: true -plone_version: '5.0.5' +plone_version: '5.0.6' plone_major_version: "{{ plone_version|truncate(3, killwords=true, end='') }}" diff --git a/templates/buildout.cfg.j2 b/templates/buildout.cfg.j2 index 3a3f17c..40446ff 100644 --- a/templates/buildout.cfg.j2 +++ b/templates/buildout.cfg.j2 @@ -47,7 +47,22 @@ buildout-user = {{ instance_config.plone_buildout_user }} eggs = Plone Pillow +{% if instance_config.plone_version >= '5.0' %} +{% if instance_config.plone_version | version_compare('5.0.6', '<=') %} + Products.PloneHotfix20160830 +{% endif %} +{% if instance_config.plone_version | version_compare('5.0.5', '<=') %} Products.PloneHotfix20160419 +{% endif %} +{% endif %} +{% if instance_config.plone_version < '5.0' %} +{% if instance_config.plone_version | version_compare('4.3.11', '<=') %} + Products.PloneHotfix20160830 +{% endif %} +{% if instance_config.plone_version | version_compare('4.3.10', '<=') %} + Products.PloneHotfix20160419 +{% endif %} +{% endif %} {% if instance_config.plone_version | version_compare('4.3.8', '<') %} plone4.csrffixes {% endif %} @@ -237,6 +252,8 @@ buildout.sanitycheck = 1.0.2 collective.recipe.backup = 2.20 plone.recipe.command = 1.1 plone.recipe.precompiler = 0.6 +Products.PloneHotfix20160830 = 1.3 +Products.PloneHotfix20160419 = 1.0 {% if instance_config.plone_version < '5.0' %} setuptools = 7.0 {% if instance_config.plone_version | version_compare('4.3.8', '<') %} diff --git a/vbox_host.cfg b/vbox_host.cfg index e70851d..6959489 100644 --- a/vbox_host.cfg +++ b/vbox_host.cfg @@ -1,5 +1 @@ -# a specification for the Vagrant/VirtualBox host. -# use: -# ansible-playbook -i vbox_host.cfg playbook.yml - -myhost ansible_ssh_port=2222 ansible_ssh_host=127.0.0.1 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key +myhost ansible_ssh_port=2222 ansible_ssh_host=127.0.0.1 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=/home/steve/ssd/ansible_playbook/ansible-playbook/roles/plone.plone_server/.vagrant/machines/xenial/virtualbox/private_key |
|
From: Steve M. <je...@pl...> - 2016-09-30 21:33:29
|
Repository: ansible.plone_server Branch: refs/heads/master Date: 2016-09-30T14:11:05-07:00 Author: Steve McMahon (smcmahon) <st...@dc...> Commit: https://github.com/plone/ansible.plone_server/commit/2a10ff3f64f08eec59ef61153d83b969653557f1 New vbox strategy Files changed: M HISTORY.txt M Vagrantfile M defaults/main.yml M templates/buildout.cfg.j2 M vbox_host.cfg diff --git a/HISTORY.txt b/HISTORY.txt index 61f30c3..62b2cc7 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,10 +1,13 @@ 1.2.12 unreleased +- Update default version to 5.0.6. Add 20160830 hotfix. + - Use jinja2's version_compare when comparing complex version numbers. Fixes #95. - Default Vagrant box: trusty -> xenial. -- Disable Vagrant's replacement of default insecure key, as it makes use with Windows very difficult. +- Add a provisioning mechanism that creates vbox_host.cfg during vagrant provisioning. + This makes it easier to use Ansible directly against the newer generation of Vagrant boxes that don't have insecure keys. 1.2.11 2016-07-18 diff --git a/Vagrantfile b/Vagrantfile index 1750822..d7f9775 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -3,11 +3,54 @@ VAGRANTFILE_API_VERSION = "2" -Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| +# We use this provisioner to write the vbox_host.cfg ansible inventory file, +# which makes it easier to use ansible-playbook directly. +module AnsibleInventory + class Config < Vagrant.plugin("2", :config) + attr_accessor :machine + end + + class Plugin < Vagrant.plugin("2") + name "write_vbox_cfg" + + config(:write_vbox_cfg, :provisioner) do + Config + end - # Use insecure key, which makes it easier to run test scripts. - # Change this if your guest box is outside-accessible. - config.ssh.insert_key = false + provisioner(:write_vbox_cfg) do + Provisioner + end + end + + class Provisioner < Vagrant.plugin("2", :provisioner) + def provision + # get the output ov vagrant ssh-config <machine> + require 'open3' + stdin, stdout, stderr, wait_thr = Open3.popen3('vagrant', 'ssh-config', config.machine) + output = stdout.gets(nil) + stdout.close + stderr.gets(nil) + stderr.close + exit_code = wait_thr.value.exitstatus + if exit_code == 0 + # parse out the key variables + /HostName (?<host>.+)/ =~ output + /Port (?<port>.+)/ =~ output + /User (?<user>.+)/ =~ output + /IdentityFile (?<keyfile>.+)/ =~ output + # write an ansible inventory file + contents = "myhost ansible_ssh_port=#{port} ansible_ssh_host=#{host} ansible_ssh_user=#{user} ansible_ssh_private_key_file=#{keyfile}\n" + File.open("vbox_host.cfg", "w") do |aFile| + aFile.puts(contents) + end + end + result = exit_code + end + end +end + + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.provider "virtualbox" do |v| v.memory = 1024 @@ -17,6 +60,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "wheezy", autostart: false do |wheezy| wheezy.vm.box = "debian/wheezy64" wheezy.vm.synced_folder ".", "/vagrant", disabled: true + wheezy.vm.provision "write_vbox_cfg", machine: "wheezy" wheezy.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end @@ -25,14 +69,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "jessie", autostart: false do |jessie| jessie.vm.box = "debian/jessie64" jessie.vm.synced_folder ".", "/vagrant", disabled: true - jessie.vm.provision "ansible" do |ansible| - ansible.playbook = "test.yml" - end + jessie.vm.provision "write_vbox_cfg", machine: "jessie" + jessie.vm.provision "ansible", playbook:"test.yml" end config.vm.define "precise", autostart: false do |precise| precise.vm.box = "bento/ubuntu-12.04" precise.vm.synced_folder ".", "/vagrant", disabled: true + precise.vm.provision "write_vbox_cfg", machine: "precise" precise.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end @@ -41,6 +85,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "trusty", primary: false, autostart: false do |trusty| trusty.vm.box = "ubuntu/trusty64" trusty.vm.synced_folder ".", "/vagrant", disabled: true + trusty.vm.provision "write_vbox_cfg", machine: "trusty" trusty.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end @@ -49,22 +94,25 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "wily", autostart: false do |wily| wily.vm.box = "ubuntu/wily64" wily.vm.synced_folder ".", "/vagrant", disabled: true + wily.vm.provision "write_vbox_cfg", machine: "wily" wily.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end end config.vm.define "xenial", primary: true, autostart: true do |myhost| - myhost.vm.box = "ubuntu/xenial64" - myhost.vm.provision "shell", inline: "apt-get install -y python" - myhost.vm.provision "ansible" do |ansible| - ansible.playbook = "test.yml" - end + myhost.vm.box = "ubuntu/xenial64" + myhost.vm.provision "shell", inline: "apt-get install -y python" + myhost.vm.provision "write_vbox_cfg", machine: "xenial" + myhost.vm.provision "ansible" do |ansible| + ansible.playbook = "test.yml" + end end config.vm.define "centos6", primary: false, autostart: false do |centos6| centos6.vm.box = "bento/centos-6.7" centos6.vm.synced_folder ".", "/vagrant", disabled: true + centos6.vm.provision "write_vbox_cfg", machine: "centos6" centos6.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end @@ -73,6 +121,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "centos7", primary: false, autostart: false do |centos7| centos7.vm.box = "centos/7" centos7.vm.synced_folder ".", "/vagrant", disabled: true + centos7.vm.provision "write_vbox_cfg", machine: "centos7" centos7.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end diff --git a/defaults/main.yml b/defaults/main.yml index 8def75e..6841315 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,7 +2,7 @@ ansible_ssh_pipelining: true -plone_version: '5.0.5' +plone_version: '5.0.6' plone_major_version: "{{ plone_version|truncate(3, killwords=true, end='') }}" diff --git a/templates/buildout.cfg.j2 b/templates/buildout.cfg.j2 index 3a3f17c..40446ff 100644 --- a/templates/buildout.cfg.j2 +++ b/templates/buildout.cfg.j2 @@ -47,7 +47,22 @@ buildout-user = {{ instance_config.plone_buildout_user }} eggs = Plone Pillow +{% if instance_config.plone_version >= '5.0' %} +{% if instance_config.plone_version | version_compare('5.0.6', '<=') %} + Products.PloneHotfix20160830 +{% endif %} +{% if instance_config.plone_version | version_compare('5.0.5', '<=') %} Products.PloneHotfix20160419 +{% endif %} +{% endif %} +{% if instance_config.plone_version < '5.0' %} +{% if instance_config.plone_version | version_compare('4.3.11', '<=') %} + Products.PloneHotfix20160830 +{% endif %} +{% if instance_config.plone_version | version_compare('4.3.10', '<=') %} + Products.PloneHotfix20160419 +{% endif %} +{% endif %} {% if instance_config.plone_version | version_compare('4.3.8', '<') %} plone4.csrffixes {% endif %} @@ -237,6 +252,8 @@ buildout.sanitycheck = 1.0.2 collective.recipe.backup = 2.20 plone.recipe.command = 1.1 plone.recipe.precompiler = 0.6 +Products.PloneHotfix20160830 = 1.3 +Products.PloneHotfix20160419 = 1.0 {% if instance_config.plone_version < '5.0' %} setuptools = 7.0 {% if instance_config.plone_version | version_compare('4.3.8', '<') %} diff --git a/vbox_host.cfg b/vbox_host.cfg index e70851d..6959489 100644 --- a/vbox_host.cfg +++ b/vbox_host.cfg @@ -1,5 +1 @@ -# a specification for the Vagrant/VirtualBox host. -# use: -# ansible-playbook -i vbox_host.cfg playbook.yml - -myhost ansible_ssh_port=2222 ansible_ssh_host=127.0.0.1 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key +myhost ansible_ssh_port=2222 ansible_ssh_host=127.0.0.1 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=/home/steve/ssd/ansible_playbook/ansible-playbook/roles/plone.plone_server/.vagrant/machines/xenial/virtualbox/private_key |
|
From: GitHub <je...@pl...> - 2016-09-30 21:12:57
|
Repository: documentation Branch: refs/heads/gforcada-patch-1 Date: 2016-09-30T23:12:44+02:00 Author: Gil Forcada Codinachs (gforcada) <gil...@gm...> Commit: https://github.com/plone/documentation/commit/c2bd34c83b8bb6b8748431e61754eeb8ef25b7a4 Update links to point to github Files changed: M develop/plone/members/member_profile.rst diff --git a/develop/plone/members/member_profile.rst b/develop/plone/members/member_profile.rst index 9ec8bf6..4f15323 100644 --- a/develop/plone/members/member_profile.rst +++ b/develop/plone/members/member_profile.rst @@ -17,10 +17,10 @@ can edit himself on his user account page. For more info, see: ``MemberDataTool`` - http://svn.zope.org/Products.CMFCore/trunk/Products/CMFCore/MemberDataTool.py?rev=110418&view=auto + https://github.com/zopefoundation/Products.CMFCore/blob/master/Products/CMFCore/MemberDataTool.py ``MemberData`` class - http://svn.zope.org/Products.CMFCore/trunk/Products/CMFCore/MemberDataTool.py?rev=110418&view=auto + https://github.com/zopefoundation/Products.CMFCore/blob/master/Products/CMFCore/MemberDataTool.py PlonePAS subclasses and extends MemberData and MemberDataTool. |
|
From: Steve M. <je...@pl...> - 2016-09-30 21:12:32
|
Repository: ansible.plone_server Branch: refs/heads/write_vbox Date: 2016-09-30T14:11:05-07:00 Author: Steve McMahon (smcmahon) <st...@dc...> Commit: https://github.com/plone/ansible.plone_server/commit/2a10ff3f64f08eec59ef61153d83b969653557f1 New vbox strategy Files changed: M HISTORY.txt M Vagrantfile M defaults/main.yml M templates/buildout.cfg.j2 M vbox_host.cfg diff --git a/HISTORY.txt b/HISTORY.txt index 61f30c3..62b2cc7 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,10 +1,13 @@ 1.2.12 unreleased +- Update default version to 5.0.6. Add 20160830 hotfix. + - Use jinja2's version_compare when comparing complex version numbers. Fixes #95. - Default Vagrant box: trusty -> xenial. -- Disable Vagrant's replacement of default insecure key, as it makes use with Windows very difficult. +- Add a provisioning mechanism that creates vbox_host.cfg during vagrant provisioning. + This makes it easier to use Ansible directly against the newer generation of Vagrant boxes that don't have insecure keys. 1.2.11 2016-07-18 diff --git a/Vagrantfile b/Vagrantfile index 1750822..d7f9775 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -3,11 +3,54 @@ VAGRANTFILE_API_VERSION = "2" -Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| +# We use this provisioner to write the vbox_host.cfg ansible inventory file, +# which makes it easier to use ansible-playbook directly. +module AnsibleInventory + class Config < Vagrant.plugin("2", :config) + attr_accessor :machine + end + + class Plugin < Vagrant.plugin("2") + name "write_vbox_cfg" + + config(:write_vbox_cfg, :provisioner) do + Config + end - # Use insecure key, which makes it easier to run test scripts. - # Change this if your guest box is outside-accessible. - config.ssh.insert_key = false + provisioner(:write_vbox_cfg) do + Provisioner + end + end + + class Provisioner < Vagrant.plugin("2", :provisioner) + def provision + # get the output ov vagrant ssh-config <machine> + require 'open3' + stdin, stdout, stderr, wait_thr = Open3.popen3('vagrant', 'ssh-config', config.machine) + output = stdout.gets(nil) + stdout.close + stderr.gets(nil) + stderr.close + exit_code = wait_thr.value.exitstatus + if exit_code == 0 + # parse out the key variables + /HostName (?<host>.+)/ =~ output + /Port (?<port>.+)/ =~ output + /User (?<user>.+)/ =~ output + /IdentityFile (?<keyfile>.+)/ =~ output + # write an ansible inventory file + contents = "myhost ansible_ssh_port=#{port} ansible_ssh_host=#{host} ansible_ssh_user=#{user} ansible_ssh_private_key_file=#{keyfile}\n" + File.open("vbox_host.cfg", "w") do |aFile| + aFile.puts(contents) + end + end + result = exit_code + end + end +end + + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.provider "virtualbox" do |v| v.memory = 1024 @@ -17,6 +60,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "wheezy", autostart: false do |wheezy| wheezy.vm.box = "debian/wheezy64" wheezy.vm.synced_folder ".", "/vagrant", disabled: true + wheezy.vm.provision "write_vbox_cfg", machine: "wheezy" wheezy.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end @@ -25,14 +69,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "jessie", autostart: false do |jessie| jessie.vm.box = "debian/jessie64" jessie.vm.synced_folder ".", "/vagrant", disabled: true - jessie.vm.provision "ansible" do |ansible| - ansible.playbook = "test.yml" - end + jessie.vm.provision "write_vbox_cfg", machine: "jessie" + jessie.vm.provision "ansible", playbook:"test.yml" end config.vm.define "precise", autostart: false do |precise| precise.vm.box = "bento/ubuntu-12.04" precise.vm.synced_folder ".", "/vagrant", disabled: true + precise.vm.provision "write_vbox_cfg", machine: "precise" precise.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end @@ -41,6 +85,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "trusty", primary: false, autostart: false do |trusty| trusty.vm.box = "ubuntu/trusty64" trusty.vm.synced_folder ".", "/vagrant", disabled: true + trusty.vm.provision "write_vbox_cfg", machine: "trusty" trusty.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end @@ -49,22 +94,25 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "wily", autostart: false do |wily| wily.vm.box = "ubuntu/wily64" wily.vm.synced_folder ".", "/vagrant", disabled: true + wily.vm.provision "write_vbox_cfg", machine: "wily" wily.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end end config.vm.define "xenial", primary: true, autostart: true do |myhost| - myhost.vm.box = "ubuntu/xenial64" - myhost.vm.provision "shell", inline: "apt-get install -y python" - myhost.vm.provision "ansible" do |ansible| - ansible.playbook = "test.yml" - end + myhost.vm.box = "ubuntu/xenial64" + myhost.vm.provision "shell", inline: "apt-get install -y python" + myhost.vm.provision "write_vbox_cfg", machine: "xenial" + myhost.vm.provision "ansible" do |ansible| + ansible.playbook = "test.yml" + end end config.vm.define "centos6", primary: false, autostart: false do |centos6| centos6.vm.box = "bento/centos-6.7" centos6.vm.synced_folder ".", "/vagrant", disabled: true + centos6.vm.provision "write_vbox_cfg", machine: "centos6" centos6.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end @@ -73,6 +121,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "centos7", primary: false, autostart: false do |centos7| centos7.vm.box = "centos/7" centos7.vm.synced_folder ".", "/vagrant", disabled: true + centos7.vm.provision "write_vbox_cfg", machine: "centos7" centos7.vm.provision "ansible" do |ansible| ansible.playbook = "test.yml" end diff --git a/defaults/main.yml b/defaults/main.yml index 8def75e..6841315 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,7 +2,7 @@ ansible_ssh_pipelining: true -plone_version: '5.0.5' +plone_version: '5.0.6' plone_major_version: "{{ plone_version|truncate(3, killwords=true, end='') }}" diff --git a/templates/buildout.cfg.j2 b/templates/buildout.cfg.j2 index 3a3f17c..40446ff 100644 --- a/templates/buildout.cfg.j2 +++ b/templates/buildout.cfg.j2 @@ -47,7 +47,22 @@ buildout-user = {{ instance_config.plone_buildout_user }} eggs = Plone Pillow +{% if instance_config.plone_version >= '5.0' %} +{% if instance_config.plone_version | version_compare('5.0.6', '<=') %} + Products.PloneHotfix20160830 +{% endif %} +{% if instance_config.plone_version | version_compare('5.0.5', '<=') %} Products.PloneHotfix20160419 +{% endif %} +{% endif %} +{% if instance_config.plone_version < '5.0' %} +{% if instance_config.plone_version | version_compare('4.3.11', '<=') %} + Products.PloneHotfix20160830 +{% endif %} +{% if instance_config.plone_version | version_compare('4.3.10', '<=') %} + Products.PloneHotfix20160419 +{% endif %} +{% endif %} {% if instance_config.plone_version | version_compare('4.3.8', '<') %} plone4.csrffixes {% endif %} @@ -237,6 +252,8 @@ buildout.sanitycheck = 1.0.2 collective.recipe.backup = 2.20 plone.recipe.command = 1.1 plone.recipe.precompiler = 0.6 +Products.PloneHotfix20160830 = 1.3 +Products.PloneHotfix20160419 = 1.0 {% if instance_config.plone_version < '5.0' %} setuptools = 7.0 {% if instance_config.plone_version | version_compare('4.3.8', '<') %} diff --git a/vbox_host.cfg b/vbox_host.cfg index e70851d..6959489 100644 --- a/vbox_host.cfg +++ b/vbox_host.cfg @@ -1,5 +1 @@ -# a specification for the Vagrant/VirtualBox host. -# use: -# ansible-playbook -i vbox_host.cfg playbook.yml - -myhost ansible_ssh_port=2222 ansible_ssh_host=127.0.0.1 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key +myhost ansible_ssh_port=2222 ansible_ssh_host=127.0.0.1 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=/home/steve/ssd/ansible_playbook/ansible-playbook/roles/plone.plone_server/.vagrant/machines/xenial/virtualbox/private_key |
|
From: Ramon N. B. <je...@pl...> - 2016-09-30 18:25:04
|
Repository: plone.server Branch: refs/heads/ramon-alpha Date: 2016-09-30T20:24:37+02:00 Author: Ramon Navarro Bosch (bloodbare) <ram...@gm...> Commit: https://github.com/plone/plone.server/commit/88f2a4a84dd38aa05b36076eba2ebea6ca217c8a Initial sub request function Files changed: M src/plone.server/plone/server/traversal.py diff --git a/src/plone.server/plone/server/traversal.py b/src/plone.server/plone/server/traversal.py index 2244ad9..9706584 100644 --- a/src/plone.server/plone/server/traversal.py +++ b/src/plone.server/plone/server/traversal.py @@ -17,6 +17,7 @@ from plone.server.interfaces import IDataBase from plone.server.interfaces import IApplication from plone.server.interfaces import IOPTIONS +from plone.server.interfaces import IAbsoluteURL from plone.server.registry import ACTIVE_LAYERS_KEY from plone.server.registry import CORS_KEY from plone.server.auth.participation import AnonymousParticipation @@ -45,6 +46,7 @@ logger = logging.getLogger(__name__) WRITING_VERBS = ['POST', 'PUT', 'PATCH', 'DELETE'] +SUBREQUEST_METHODS = ['get', 'delete', 'head', 'options', 'patch', 'put'] async def do_traverse(request, parent, path): @@ -76,6 +78,32 @@ return await traverse(request, context, path[1:]) +async def subrequest(orig_request, path, relative_to_site=True, + headers={}, body=None, params=None, method='GET'): + """Subrequest, initial implementation doing a real request + """ + session = aiohttp.ClientSession() + method = method.lower() + if method not in SUBREQUEST_METHODS: + raise AttributeError('No valid method ' + method) + caller = getattr(session, method) + if relative_to_site: + site_url = IAbsoluteURL(orig_request.site, orig_request)() + url = site_url + path + + for head in orig_request.headers: + if head not in headers: + headers[head] = orig_request.headers[head] + + params = { + 'headers': headers, + 'params': params + } + if method in ['put', 'patch']: + params['data'] = body + + return caller(path, **params) + async def traverse(request, parent, path): """Do not use outside the main router function.""" if IApplication.providedBy(parent): |
|
From: Ramon N. B. <je...@pl...> - 2016-09-30 18:25:03
|
Repository: plone.server Branch: refs/heads/ramon-alpha Date: 2016-09-30T20:24:09+02:00 Author: Ramon Navarro Bosch (bloodbare) <ram...@gm...> Commit: https://github.com/plone/plone.server/commit/4ca6f617a6326dd70552965ed437346fd3adf71a Initial File Support ( we still need to add Blob on ZEO/ZODB configuration ) Files changed: A src/plone.server/plone/server/basicfile.zcml A src/plone.server/plone/server/file.py M src/plone.server/plone/server/api/api.json M src/plone.server/plone/server/api/file.py M src/plone.server/plone/server/api/service.py M src/plone.server/plone/server/configure.zcml M src/plone.server/plone/server/interfaces.py diff --git a/src/plone.server/plone/server/api/api.json b/src/plone.server/plone/server/api/api.json index 18a7602..ae0d82d 100644 --- a/src/plone.server/plone/server/api/api.json +++ b/src/plone.server/plone/server/api/api.json @@ -139,6 +139,18 @@ "factory": "plone.server.api.dexterity.ComponentsGET", "permission": "plone.ViewContent" } + }, + "@upload": { + "PATCH": { + "factory": "plone.server.api.file.UploadFile", + "permission": "plone.ModifyContent" + } + }, + "@download": { + "GET": { + "factory": "plone.server.api.file.DownloadFile", + "permission": "plone.ViewContent" + } } }, "DELETE": { diff --git a/src/plone.server/plone/server/api/file.py b/src/plone.server/plone/server/api/file.py index 527410e..dc64c18 100644 --- a/src/plone.server/plone/server/api/file.py +++ b/src/plone.server/plone/server/api/file.py @@ -2,12 +2,19 @@ from plone.jsonserializer.interfaces import ISerializeToJson from plone.server.api.service import Service from plone.server.api.service import DownloadService +from plone.server.api.service import TraversableService +from plone.server.api.service import TraversableDownloadService from plone.server.browser import get_physical_path +from plone.server.interfaces import IFileManager from zope.component import getMultiAdapter import mimetypes from aiohttp.web import StreamResponse from os.path import basename import aiohttp +from zope.interface.interfaces import ComponentLookupError +from plone.dexterity.fti import IDexterityFTI +from zope.component import getUtilitiesFor +from zope.component import queryUtility # Static File @@ -48,3 +55,57 @@ class SharingPOST(Service): class DefaultDELETE(Service): pass + + +# Field File + +class UploadFile(TraversableService): + + def publishTraverse(self, traverse): + if len(traverse) == 1: + # we want have the field + if not hasattr(self.context, traverse[0]): + raise KeyError('No valid name') + + name = traverse[0] + schema = queryUtility(IDexterityFTI, name=self.context.portal_type).lookupSchema() + + # Check that its a File Field + if name not in schema: + raise KeyError('No valid name') + + self.field = schema[name].bind(self.context) + else: + self.field = None + return self + + async def __call__(self): + # We need to get the upload as async IO and look for an adapter + # for the field to save there by chunks + + adapter = getMultiAdapter( + (self.context, self.request, self.field), IFileManager) + return await adapter.upload() + + +class DownloadFile(TraversableDownloadService): + + def publishTraverse(self, traverse): + if len(traverse) == 1: + # we want have the key of the registry + self.value = [queryUtility(IDexterityFTI, name=traverse[0])] + return self + + async def __call__(self): + # We need to get the upload as async IO and look for an adapter + # for the field to save there by chunks + if not hasattr(self, 'value'): + self.value = [x[1] for x in getUtilitiesFor(IDexterityFTI)] + result = [] + for x in self.value: + serializer = getMultiAdapter( + (x, self.request), + ISerializeToJson) + + result.append(serializer()) + return result diff --git a/src/plone.server/plone/server/api/service.py b/src/plone.server/plone/server/api/service.py index 7f27f55..282bb5b 100644 --- a/src/plone.server/plone/server/api/service.py +++ b/src/plone.server/plone/server/api/service.py @@ -15,8 +15,6 @@ class DownloadService(View): def __init__(self, context, request): super(DownloadService, self).__init__(context, request) alsoProvides(self, IDownloadView) - self.context = context - self.request = request class TraversableService(View): @@ -24,3 +22,11 @@ class TraversableService(View): def __init__(self, context, request): super(TraversableService, self).__init__(context, request) alsoProvides(self, ITraversableView) + + +class TraversableDownloadService(View): + + def __init__(self, context, request): + super(TraversableService, self).__init__(context, request) + alsoProvides(self, ITraversableView) + alsoProvides(self, IDownloadView) diff --git a/src/plone.server/plone/server/basicfile.zcml b/src/plone.server/plone/server/basicfile.zcml new file mode 100644 index 0000000..6f47a04 --- /dev/null +++ b/src/plone.server/plone/server/basicfile.zcml @@ -0,0 +1,28 @@ +<configure xmlns="http://namespaces.zope.org/zope" + xmlns:plone="http://namespaces.plone.org/plone"> + + <include package="plone.server" file="meta.zcml" /> + + <!-- Basic File Manager for Blobs --> + <adapter factory="plone.server.file.BasicFileManager"/> + + <utility + name="builtins.str" + provides=".interfaces.IStorage" + factory=".file.StringStorable" + /> + + <utility + name="builtin.bytes" + provides=".interfaces.IStorage" + factory=".file.BytesStorable" + /> + + <utility + name="builtin.file" + provides=".interfaces.IStorage" + factory=".file.FileDescriptorStorable" + /> + + +</configure> diff --git a/src/plone.server/plone/server/configure.zcml b/src/plone.server/plone/server/configure.zcml index 0e345b8..ae59742 100644 --- a/src/plone.server/plone/server/configure.zcml +++ b/src/plone.server/plone/server/configure.zcml @@ -36,6 +36,7 @@ <include file="permissions.zcml" /> <include file="security.zcml" /> <include file="content.zcml" /> + <include file="basicfile.zcml" /> <include package=".auth" /> <include package=".catalog" /> diff --git a/src/plone.server/plone/server/file.py b/src/plone.server/plone/server/file.py new file mode 100644 index 0000000..00e61b6 --- /dev/null +++ b/src/plone.server/plone/server/file.py @@ -0,0 +1,206 @@ +# -*- encoding: utf-8 -*- +from zope.interface import implementer +from zope.component import adapter +from plone.server.interfaces import IFile +from plone.server.interfaces import IFileField +from plone.server.interfaces import IRequest +from plone.server.interfaces import IStorage +from plone.server.interfaces import NotStorable +from plone.server.interfaces import IFileManager +from plone.dexterity.interfaces import IDexterityContent +from ZODB.blob import Blob +from persistent import Persistent +from zope.schema.fieldproperty import FieldProperty +from zope.schema import Object +from zope.component import getUtility + + +def get_contenttype( + file=None, + filename=None, + default='application/octet-stream'): + """Get the MIME content type of the given file and/or filename. + """ + + file_type = getattr(file, 'contentType', None) + if file_type: + return file_type + + filename = getattr(file, 'filename', filename) + if filename: + extension = os.path.splitext(filename)[1].lower() + return mimetypes.types_map.get(extension, 'application/octet-stream') + + return default + + +@adapter(IDexterityContent, IRequest, IFileField) +@implementer(IFileManager) +class BasicFileManager(object): + + def __init__(self, context, request, field): + self.context = context + self.request = request + self.field = field + + async def upload(self): + chunk_size = 8400 + file = self.field.get(self.context) + if file is None: + file = BasicFile() + self.field.set(self.context, file) + with file.open('w') as fd: + while True: + chunk = await self.request.content.read(chunk_size) + print('hola') + if not chunk: + break + fd.write(chunk) + + async def download(self): + pass + + +@implementer(IFile) +class BasicFile(Persistent): + + filename = FieldProperty(IFile['filename']) + + def __init__(self, data='', contentType='', filename=None): + if ( + filename is not None and + contentType in ('', 'application/octet-stream') + ): + contentType = get_contenttype(filename=filename) + self.contentType = contentType + self._blob = Blob() + f = self._blob.open('w') + f.write(b'') + f.close() + self._setData(data) + self.filename = filename + + def open(self, mode='r'): + if mode != 'r' and 'size' in self.__dict__: + del self.__dict__['size'] + return self._blob.open(mode) + + def openDetached(self): + return open(self._blob.committed(), 'rb') + + def _setData(self, data): + if 'size' in self.__dict__: + del self.__dict__['size'] + # Search for a storable that is able to store the data + dottedName = '.'.join((data.__class__.__module__, + data.__class__.__name__)) + storable = getUtility(IStorage, name=dottedName) + storable.store(data, self._blob) + + def _getData(self): + fp = self._blob.open('r') + data = fp.read() + fp.close() + return data + + _data = property(_getData, _setData) + data = property(_getData, _setData) + + @property + def size(self): + if 'size' in self.__dict__: + return self.__dict__['size'] + reader = self._blob.open() + reader.seek(0, 2) + size = int(reader.tell()) + reader.close() + self.__dict__['size'] = size + return size + + def getSize(self): + return self.size + + +@implementer(IFileField) +class BasicFileField(Object): + """A NamedBlobFile field + """ + + _type = BasicFile + schema = IFile + + def __init__(self, **kw): + if 'schema' in kw: + self.schema = kw.pop('schema') + super(FileField, self).__init__(schema=self.schema, **kw) + + +# This file was borrowed from z3c.blobfile and is licensed under the terms of +# the ZPL. + + +MAXCHUNKSIZE = 1 << 16 + + +@implementer(IStorage) +class StringStorable(object): + + def store(self, data, blob): + if not isinstance(data, str): + raise NotStorable('Could not store data (not of "str" type).') + + with blob.open('w') as fp: + fp.write(bytes(data, encoding='utf-8')) + + +@implementer(IStorage) +class BytesStorable(StringStorable): + + def store(self, data, blob): + if not isinstance(data, unicode): + raise NotStorable('Could not store data (not of "unicode" type).') + + StringStorable.store(self, data, blob) + + +@implementer(IStorage) +class FileChunkStorable(object): + + def store(self, data, blob): + if not isinstance(data, FileChunk): + raise NotStorable('Could not store data (not a of "FileChunk" type).') # noqa + + with blob.open('w') as fp: + chunk = data + while chunk: + fp.write(chunk._data) + chunk = chunk.next + + +@implementer(IStorage) +class FileDescriptorStorable(object): + + def store(self, data, blob): + if not isinstance(data, file): + raise NotStorable('Could not store data (not of "file").') + + filename = getattr(data, 'name', None) + if filename is not None: + blob.consumeFile(filename) + return + + +@implementer(IStorage) +class FileUploadStorable(object): + + def store(self, data, blob): + if not isinstance(data, FileUpload): + raise NotStorable('Could not store data (not of "FileUpload").') + + data.seek(0) + + with blob.open('w') as fp: + block = data.read(MAXCHUNKSIZE) + while block: + fp.write(block) + block = data.read(MAXCHUNKSIZE) diff --git a/src/plone.server/plone/server/interfaces.py b/src/plone.server/plone/server/interfaces.py index 2f7d753..138e7d8 100644 --- a/src/plone.server/plone/server/interfaces.py +++ b/src/plone.server/plone/server/interfaces.py @@ -3,6 +3,7 @@ from zope.interface import Interface, Attribute from zope.interface import interfaces from plone.supermodel import model +from zope.schema.interfaces import IObject from zope import schema DEFAULT_READ_PERMISSION = 'plone.ViewContent' @@ -149,6 +150,57 @@ def install(self, site): def uninstall(self): pass +# File related interface + + +class IFileManager(Interface): + """ Interface to create uploaders and downloaders + """ + + +class IFile(Interface): + + contentType = schema.BytesLine( + title=u'Content Type', + description=u'The content type identifies the type of data.', + default=b'', + required=False + ) + + filename = schema.TextLine(title=u'Filename', required=False, default=None) + + data = schema.Bytes( + title=u'Data', + description=u'The actual content.', + required=False, + ) + + def getSize(): + """Return the byte-size of the data of the object.""" + + +# File Field + +class IFileField(IObject): + """Field for storing IFile objects. + """ + + +class IStorage(Interface): + """Store file data + """ + + def store(data, blob): + """Store the data into the blob + Raises NonStorable if data is not storable. + """ + + +class NotStorable(Exception): + """Data is not storable + """ + + # Specific Events @@ -167,4 +219,3 @@ class INewUserAdded(Interface): user = Attribute("User id created.") - |
|
From: Maurits v. R. <je...@pl...> - 2016-09-30 16:20:26
|
Repository: plone.app.upgrade Branch: refs/heads/fix-cleanup-skin-selections Date: 2016-09-30T18:20:03+02:00 Author: Maurits van Rees (mauritsvanrees) <ma...@va...> Commit: https://github.com/plone/plone.app.upgrade/commit/fbae41aa1f16ce8325fb1654cc9c519d0b374793 WIP: fix cleanup skin selections. Files changed: A plone/app/upgrade/tests/skin_test/README.txt A plone/app/upgrade/tests/skin_test/sub1/README.txt A plone/app/upgrade/tests/skin_test/sub1/subsub1/README.txt A plone/app/upgrade/tests/skin_test/sub2/README.txt A plone/app/upgrade/tests/test_utils.py M plone/app/upgrade/utils.py M plone/app/upgrade/v40/alphas.py diff --git a/plone/app/upgrade/tests/skin_test/README.txt b/plone/app/upgrade/tests/skin_test/README.txt new file mode 100644 index 0000000..3ac528e --- /dev/null +++ b/plone/app/upgrade/tests/skin_test/README.txt @@ -0,0 +1 @@ +Recursive skin diff --git a/plone/app/upgrade/tests/skin_test/sub1/README.txt b/plone/app/upgrade/tests/skin_test/sub1/README.txt new file mode 100644 index 0000000..b63d3e3 --- /dev/null +++ b/plone/app/upgrade/tests/skin_test/sub1/README.txt @@ -0,0 +1 @@ +Recursive sub skin 1 diff --git a/plone/app/upgrade/tests/skin_test/sub1/subsub1/README.txt b/plone/app/upgrade/tests/skin_test/sub1/subsub1/README.txt new file mode 100644 index 0000000..687025a --- /dev/null +++ b/plone/app/upgrade/tests/skin_test/sub1/subsub1/README.txt @@ -0,0 +1 @@ +Recursive sub sub skin 1 diff --git a/plone/app/upgrade/tests/skin_test/sub2/README.txt b/plone/app/upgrade/tests/skin_test/sub2/README.txt new file mode 100644 index 0000000..3ccbd81 --- /dev/null +++ b/plone/app/upgrade/tests/skin_test/sub2/README.txt @@ -0,0 +1 @@ +Recursive sub skin 2 diff --git a/plone/app/upgrade/tests/test_utils.py b/plone/app/upgrade/tests/test_utils.py new file mode 100644 index 0000000..2857e24 --- /dev/null +++ b/plone/app/upgrade/tests/test_utils.py @@ -0,0 +1,52 @@ +from Products.CMFCore.utils import getToolByName +from plone.app.upgrade.tests.base import MigrationTest +from plone.app.upgrade import utils + + +class TestUtils(MigrationTest): + + def testCleanUpSkinsTool(self): + # This removes no longer existing layers from the skins tool and the + # skin selections. + from Products.CMFCore.DirectoryView import DirectoryView + from Products.CMFCore.DirectoryView import registerDirectory + self.setRoles(['Manager']) + skins = getToolByName(self.portal, 'portal_skins') + existing = skins.keys() + + # An initial cleanup should do nothing. + # utils.cleanupSkinPath(self.portal, skinName, test=1): + utils.cleanUpSkinsTool(self.portal) + self.assertEqual(len(skins.keys()), len(existing)) + + # Register some test skins layers. Note: the current module name is + # taken from globals()['__name__'], which is how registerDirectory + # knows where to find the directory. Also note that you should not try + # to register any layer that is outside of the current directory or in + # a 'skins' sub directory. There is just too much crazyness in the + # api. Better try to load some zcml in that case. + skin_name = 'skin_test' + # Make it available for Zope. This is what you would do in zcml. + registerDirectory(skin_name, globals(), subdirs=1) + # Add the DirectoryView object to portal_skins. + skins._setObject(skin_name, DirectoryView(skin_name)) + # Add its sub skins to a skin selection. + self.addSkinLayer('skin_test/sub1') + self.addSkinLayer('skin_test/sub1/subsub1') + self.addSkinLayer('skin_test/sub2') + + # Did that work? + self.assertEqual(len(skins.keys()), len(existing) + 1) + + # Clean it up again. Nothing should be removed. + utils.cleanUpSkinsTool(self.portal) + self.assertEqual(len(skins.keys()), len(existing) + 1) + + # TODO: test skin selections. + + +def test_suite(): + from unittest import TestSuite, makeSuite + suite = TestSuite() + suite.addTest(makeSuite(TestUtils)) + return suite diff --git a/plone/app/upgrade/utils.py b/plone/app/upgrade/utils.py index 10ed8bc..fd235eb 100644 --- a/plone/app/upgrade/utils.py +++ b/plone/app/upgrade/utils.py @@ -1,17 +1,20 @@ -import logging -import new -import sys -from types import ListType, TupleType - from Acquisition import aq_base +from Products.CMFCore.DirectoryView import _dirreg from Products.CMFCore.utils import getToolByName from Products.GenericSetup.interfaces import ISetupTool from Products.GenericSetup.registry import _export_step_registry from Products.GenericSetup.registry import _import_step_registry from Products.ZCatalog.ProgressHandler import ZLogHandler +from types import ListType +from types import TupleType from ZODB.POSException import ConflictError +import logging +import new import pkg_resources +import sys +import transaction + _marker = [] @@ -88,6 +91,18 @@ def testSkinLayer(skinsTool, layer): return 1 +def _sub_skin_exists(skins, name): + # name is for example captchas_core/dynamic. + # Or a/b/c/d/e. + # Does a filesystem directory view of this exist in the portal_skins? + directory = skins + for part in name.split('/'): + directory = directory.get(part) + if directory is None: + return False + return directory is not None + + def cleanupSkinPath(portal, skinName, test=1): """Remove invalid skin layers from skins""" skinstool = getToolByName(portal, 'portal_skins') @@ -100,6 +115,40 @@ def cleanupSkinPath(portal, skinName, test=1): skinstool.addSkinSelection(skinName, ','.join(new_path), test=test) +def cleanUpSkinsTool(context): + skins = getToolByName(context, 'portal_skins') + # Remove directory views for directories missing on the filesystem + for name in skins.keys(): + directory_view = skins.get(name) + reg_key = getattr(directory_view, '_dirpath', None) + if not reg_key: + # not a directory view, but a persistent folder + continue + try: + reg_key = _dirreg.getCurrentKeyFormat(reg_key) + _dirreg.getDirectoryInfo(reg_key) + except ValueError: + skins._delObject(name) + + transaction.savepoint(optimistic=True) + existing = skins.keys() + # Remove no longer existing entries from skin selections + for layer, paths in skins.selections.items(): + new_paths = [] + for name in paths.split(','): + if name == 'plone_styles': + # plone_styles has been moved and renamed + new_paths.append('classic_styles') + elif name in existing: + new_paths.append(name) + elif '/' in name and _sub_skin_exists(skins, name): + new_paths.append(name) + else: + logger.info('Removed no longer existing path %s ' + 'from skin selection %s.', name, layer) + skins.selections[layer] = ','.join(new_paths) + + def installOrReinstallProduct(portal, product_name, out=None, hidden=False): """Installs a product diff --git a/plone/app/upgrade/v40/alphas.py b/plone/app/upgrade/v40/alphas.py index 4c4450f..67c04a5 100644 --- a/plone/app/upgrade/v40/alphas.py +++ b/plone/app/upgrade/v40/alphas.py @@ -9,7 +9,6 @@ from Acquisition import aq_base from Acquisition import aq_get from Products.CMFCore.CachingPolicyManager import manage_addCachingPolicyManager -from Products.CMFCore.DirectoryView import _dirreg from Products.CMFCore.interfaces import ICachingPolicyManager from Products.CMFCore.utils import getToolByName from Products.CMFPlone.setuphandlers import addCacheHandlers @@ -19,6 +18,7 @@ from zExceptions import NotFound from plone.app.viewletmanager.interfaces import IViewletSettingsStorage +from plone.app.upgrade.utils import cleanUpSkinsTool # noqa BBB from plone.app.upgrade.utils import logger from plone.app.upgrade.utils import loadMigrationProfile from plone.app.upgrade.utils import unregisterSteps @@ -370,35 +370,6 @@ def cleanUpToolRegistry(context): logger.info('Cleaned up the toolset registry.') -def cleanUpSkinsTool(context): - skins = getToolByName(context, 'portal_skins') - # Remove directory views for directories missing on the filesystem - for name in skins.keys(): - directory_view = skins.get(name) - reg_key = getattr(directory_view, '_dirpath', None) - if not reg_key: - # not a directory view, but a persistent folder - continue - try: - reg_key = _dirreg.getCurrentKeyFormat(reg_key) - _dirreg.getDirectoryInfo(reg_key) - except ValueError: - skins._delObject(name) - - transaction.savepoint(optimistic=True) - existing = skins.keys() - # Remove no longer existing entries from skin selections - for layer, paths in skins.selections.items(): - new_paths = [] - for name in paths.split(','): - if name == 'plone_styles': - # plone_styles has been moved and renamed - new_paths.append('classic_styles') - elif name in existing: - new_paths.append(name) - skins.selections[layer] = ','.join(new_paths) - - def cleanUpProductRegistry(context): control = getattr(context, 'Control_Panel', None) if control: |
|
From: Jens W. K. <je...@pl...> - 2016-09-30 15:21:06
|
Repository: Products.CMFPlone Branch: refs/heads/utf8-headers Date: 2016-09-30T17:20:43+02:00 Author: Jens W. Klein (jensens) <jk...@kl...> Commit: https://github.com/plone/Products.CMFPlone/commit/aa9b3dd750060a16956f4b5c54d26c26677b0127 add utf8 headers to all python files Files changed: M CHANGES.rst M Products/CMFPlone/ActionsTool.py M Products/CMFPlone/CatalogTool.py M Products/CMFPlone/DublinCore.py M Products/CMFPlone/MigrationTool.py M Products/CMFPlone/PloneBaseTool.py M Products/CMFPlone/PloneBatch.py M Products/CMFPlone/PloneControlPanel.py M Products/CMFPlone/PloneFolder.py M Products/CMFPlone/PropertiesTool.py M Products/CMFPlone/QuickInstallerTool.py M Products/CMFPlone/RegistrationTool.py M Products/CMFPlone/SkinsTool.py M Products/CMFPlone/TranslationServiceTool.py M Products/CMFPlone/TypesTool.py M Products/CMFPlone/URLTool.py M Products/CMFPlone/UnicodeSplitter/splitter.py M Products/CMFPlone/WorkflowTool.py M Products/CMFPlone/__init__.py M Products/CMFPlone/browser/__init__.py M Products/CMFPlone/browser/admin.py M Products/CMFPlone/browser/atd.py M Products/CMFPlone/browser/author.py M Products/CMFPlone/browser/global_statusmessage.py M Products/CMFPlone/browser/interfaces.py M Products/CMFPlone/browser/main_template.py M Products/CMFPlone/browser/sendto.py M Products/CMFPlone/browser/sitelogo.py M Products/CMFPlone/browser/sitemap.py M Products/CMFPlone/browser/syndication/adapters.py M Products/CMFPlone/browser/syndication/settings.py M Products/CMFPlone/browser/syndication/tool.py M Products/CMFPlone/browser/syndication/utils.py M Products/CMFPlone/browser/syndication/views.py M Products/CMFPlone/controlpanel/bbb/filter.py M Products/CMFPlone/controlpanel/bbb/mail.py M Products/CMFPlone/controlpanel/bbb/markup.py M Products/CMFPlone/controlpanel/bbb/usergroups.py M Products/CMFPlone/controlpanel/browser/actions.py M Products/CMFPlone/controlpanel/browser/imaging.py M Products/CMFPlone/controlpanel/browser/mail.py M Products/CMFPlone/controlpanel/browser/markup.py M Products/CMFPlone/controlpanel/browser/overview.py M Products/CMFPlone/controlpanel/browser/quickinstaller.py M Products/CMFPlone/controlpanel/browser/security.py M Products/CMFPlone/controlpanel/browser/syndication.py M Products/CMFPlone/controlpanel/browser/tinymce.py M Products/CMFPlone/controlpanel/browser/usergroups.py M Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py M Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py M Products/CMFPlone/controlpanel/browser/usergroups_groupsoverview.py M Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py M Products/CMFPlone/controlpanel/browser/usergroups_usersoverview.py M Products/CMFPlone/controlpanel/events.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_security_adapter.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_usergroups_adapter.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_events.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py M Products/CMFPlone/controlpanel/utils.py M Products/CMFPlone/controlpanel/widgets.py M Products/CMFPlone/events.py M Products/CMFPlone/exportimport/__init__.py M Products/CMFPlone/exportimport/controlpanel.py M Products/CMFPlone/exportimport/memberdata_properties.py M Products/CMFPlone/exportimport/propertiestool.py M Products/CMFPlone/exportimport/tests/__init__.py M Products/CMFPlone/exportimport/tests/base.py M Products/CMFPlone/exportimport/tests/testControlPanel.py M Products/CMFPlone/exportimport/tests/testPropertiesTool.py M Products/CMFPlone/factory.py M Products/CMFPlone/i18nl10n.py M Products/CMFPlone/interfaces/__init__.py M Products/CMFPlone/interfaces/atd.py M Products/CMFPlone/interfaces/basetool.py M Products/CMFPlone/interfaces/breadcrumbs.py M Products/CMFPlone/interfaces/constrains.py M Products/CMFPlone/interfaces/events.py M Products/CMFPlone/interfaces/installable.py M Products/CMFPlone/interfaces/interface.py M Products/CMFPlone/interfaces/language.py M Products/CMFPlone/interfaces/migration.py M Products/CMFPlone/interfaces/patterns.py M Products/CMFPlone/interfaces/properties.py M Products/CMFPlone/interfaces/resources.py M Products/CMFPlone/interfaces/siteroot.py M Products/CMFPlone/interfaces/structure.py M Products/CMFPlone/interfaces/syndication.py M Products/CMFPlone/interfaces/translationservice.py M Products/CMFPlone/interfaces/workflow.py M Products/CMFPlone/log.py M Products/CMFPlone/patches/__init__.py M Products/CMFPlone/patches/addzmiplonesite.py M Products/CMFPlone/patches/addzmisecuritywarning.py M Products/CMFPlone/patches/csrf.py M Products/CMFPlone/patches/dateIndexPatch.py M Products/CMFPlone/patches/iso8601.py M Products/CMFPlone/patches/publishing.py M Products/CMFPlone/patches/securemailhost.py M Products/CMFPlone/patches/security.py M Products/CMFPlone/patches/sendmail.py M Products/CMFPlone/patches/speed.py M Products/CMFPlone/patches/templatecookcheck.py M Products/CMFPlone/patches/unicodeFallbackPatch.py M Products/CMFPlone/patches/unicodehacks.py M Products/CMFPlone/patches/z3c_form.py M Products/CMFPlone/permissions.py M Products/CMFPlone/resources/__init__.py M Products/CMFPlone/resources/browser/combine.py M Products/CMFPlone/resources/browser/configjs.py M Products/CMFPlone/resources/browser/cook.py M Products/CMFPlone/resources/browser/interfaces.py M Products/CMFPlone/resources/browser/mixins.py M Products/CMFPlone/resources/browser/resource.py M Products/CMFPlone/resources/browser/scripts.py M Products/CMFPlone/resources/browser/styles.py M Products/CMFPlone/resources/exportimport/bundles.py M Products/CMFPlone/resources/exportimport/cssregistry.py M Products/CMFPlone/resources/exportimport/jsregistry.py M Products/CMFPlone/resources/exportimport/resourceregistry.py M Products/CMFPlone/resources/viewlets/__init__.py M Products/CMFPlone/resources/viewlets/registries.py M Products/CMFPlone/resources/viewlets/settings.py M Products/CMFPlone/setuphandlers.py M Products/CMFPlone/tests/PloneTestCase.py M Products/CMFPlone/tests/dummy.py M Products/CMFPlone/tests/robot/variables.py M Products/CMFPlone/tests/testActionsTool.py M Products/CMFPlone/tests/testBatch.py M Products/CMFPlone/tests/testBrowserAdmin.py M Products/CMFPlone/tests/testBrowserDefault.py M Products/CMFPlone/tests/testBrowserDefaultScripts.py M Products/CMFPlone/tests/testBrowserLayerPrecedence.py M Products/CMFPlone/tests/testCSRFProtection.py M Products/CMFPlone/tests/testCSSandJSRegistry.py M Products/CMFPlone/tests/testCatalogTool.py M Products/CMFPlone/tests/testCheckId.py M Products/CMFPlone/tests/testContentPublishing.py M Products/CMFPlone/tests/testContentSecurity.py M Products/CMFPlone/tests/testContentTypeScripts.py M Products/CMFPlone/tests/testControlPanel.py M Products/CMFPlone/tests/testControlPanelScripts.py M Products/CMFPlone/tests/testCookieAuth.py M Products/CMFPlone/tests/testCutPasteSecurity.py M Products/CMFPlone/tests/testDateComponentsSupport.py M Products/CMFPlone/tests/testDateIndexRanges.py M Products/CMFPlone/tests/testDateTimeIntegration.py M Products/CMFPlone/tests/testEmailLogin.py M Products/CMFPlone/tests/testExternalEditorEnabled.py M Products/CMFPlone/tests/testGetObjectSize.py M Products/CMFPlone/tests/testIImagingSchema.py M Products/CMFPlone/tests/testInterfaces.py M Products/CMFPlone/tests/testLoggedIn.py M Products/CMFPlone/tests/testMigrationTool.py M Products/CMFPlone/tests/testNavTree.py M Products/CMFPlone/tests/testNavigationParent.py M Products/CMFPlone/tests/testNextPrevious.py M Products/CMFPlone/tests/testOrderSupport.py M Products/CMFPlone/tests/testPloneFolder.py M Products/CMFPlone/tests/testPloneTestCase.py M Products/CMFPlone/tests/testPloneTool.py M Products/CMFPlone/tests/testPloneView.py M Products/CMFPlone/tests/testPortalCreation.py M Products/CMFPlone/tests/testQuickInstallerTool.py M Products/CMFPlone/tests/testResourceRegistries.py M Products/CMFPlone/tests/testRestrictedAcquisition.py M Products/CMFPlone/tests/testSSOLogin.py M Products/CMFPlone/tests/testSearch.py M Products/CMFPlone/tests/testSecurity.py M Products/CMFPlone/tests/testSecurityDeclarations.py M Products/CMFPlone/tests/testSiteAdminRole.py M Products/CMFPlone/tests/testSortObjects.py M Products/CMFPlone/tests/testSyndication.py M Products/CMFPlone/tests/testTranslationServiceTool.py M Products/CMFPlone/tests/testURLTool.py M Products/CMFPlone/tests/testUserFolderBasics.py M Products/CMFPlone/tests/testWebDAV.py M Products/CMFPlone/tests/testWorkflowTool.py M Products/CMFPlone/tests/test_doctests.py M Products/CMFPlone/tests/test_functional.py M Products/CMFPlone/tests/test_mails.py M Products/CMFPlone/tests/test_robot.py M Products/CMFPlone/tests/test_utils.py M Products/CMFPlone/tests/test_z3c_form_widgets.py M Products/CMFPlone/tests/utils.py M Products/CMFPlone/traversal.py M Products/CMFPlone/unicodeconflictresolver.py M Products/CMFPlone/workflow.py M Products/__init__.py diff --git a/CHANGES.rst b/CHANGES.rst index 0019f68..6d639d0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -31,6 +31,8 @@ New features: Bug fixes: +- Add utf8 headers to all Python source files. [jensens] + - Apply security hotfix 20160830 for ``z3c.form`` widgets. [maurits] - Fixed tests in combination with newer CMFFormController which has the hotfix. [maurits] diff --git a/Products/CMFPlone/ActionsTool.py b/Products/CMFPlone/ActionsTool.py index 7d96671..11afd75 100644 --- a/Products/CMFPlone/ActionsTool.py +++ b/Products/CMFPlone/ActionsTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass from Products.CMFCore.ActionInformation import ActionInfo diff --git a/Products/CMFPlone/CatalogTool.py b/Products/CMFPlone/CatalogTool.py index f66ca10..dfc4453 100644 --- a/Products/CMFPlone/CatalogTool.py +++ b/Products/CMFPlone/CatalogTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import logging import re import time diff --git a/Products/CMFPlone/DublinCore.py b/Products/CMFPlone/DublinCore.py index 45b2c58..77f2401 100644 --- a/Products/CMFPlone/DublinCore.py +++ b/Products/CMFPlone/DublinCore.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2001 Zope Foundation and Contributors. diff --git a/Products/CMFPlone/MigrationTool.py b/Products/CMFPlone/MigrationTool.py index 1294162..b9cf3ea 100644 --- a/Products/CMFPlone/MigrationTool.py +++ b/Products/CMFPlone/MigrationTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import logging import sys from StringIO import StringIO diff --git a/Products/CMFPlone/PloneBaseTool.py b/Products/CMFPlone/PloneBaseTool.py index 7a3c35b..63ca0f6 100644 --- a/Products/CMFPlone/PloneBaseTool.py +++ b/Products/CMFPlone/PloneBaseTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from App.class_init import InitializeClass from AccessControl import ClassSecurityInfo from Products.CMFPlone.interfaces import IPloneBaseTool diff --git a/Products/CMFPlone/PloneBatch.py b/Products/CMFPlone/PloneBatch.py index bc05dfa..2541454 100644 --- a/Products/CMFPlone/PloneBatch.py +++ b/Products/CMFPlone/PloneBatch.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from ZTUtils import make_query from plone.batching.batch import QuantumBatch diff --git a/Products/CMFPlone/PloneControlPanel.py b/Products/CMFPlone/PloneControlPanel.py index 5a1465a..9a29951 100644 --- a/Products/CMFPlone/PloneControlPanel.py +++ b/Products/CMFPlone/PloneControlPanel.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass from App.special_dtml import DTMLFile diff --git a/Products/CMFPlone/PloneFolder.py b/Products/CMFPlone/PloneFolder.py index b275b56..c3997b1 100644 --- a/Products/CMFPlone/PloneFolder.py +++ b/Products/CMFPlone/PloneFolder.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.memoize import view from App.class_init import InitializeClass from zExceptions import NotFound diff --git a/Products/CMFPlone/PropertiesTool.py b/Products/CMFPlone/PropertiesTool.py index 8763fb6..dc11642 100644 --- a/Products/CMFPlone/PropertiesTool.py +++ b/Products/CMFPlone/PropertiesTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_parent, aq_inner from Products.CMFCore.permissions import ManagePortal from Products.CMFCore.utils import UniqueObject diff --git a/Products/CMFPlone/QuickInstallerTool.py b/Products/CMFPlone/QuickInstallerTool.py index 700364c..fcf69b1 100644 --- a/Products/CMFPlone/QuickInstallerTool.py +++ b/Products/CMFPlone/QuickInstallerTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass from Products.CMFCore.permissions import ManagePortal diff --git a/Products/CMFPlone/RegistrationTool.py b/Products/CMFPlone/RegistrationTool.py index d1babb7..e4ebd3c 100644 --- a/Products/CMFPlone/RegistrationTool.py +++ b/Products/CMFPlone/RegistrationTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo, Unauthorized from AccessControl import getSecurityManager from AccessControl.requestmethod import postonly diff --git a/Products/CMFPlone/SkinsTool.py b/Products/CMFPlone/SkinsTool.py index 6cb1cdd..6fd5f20 100644 --- a/Products/CMFPlone/SkinsTool.py +++ b/Products/CMFPlone/SkinsTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass from Products.CMFCore.permissions import ManagePortal diff --git a/Products/CMFPlone/TranslationServiceTool.py b/Products/CMFPlone/TranslationServiceTool.py index 42ca921..28285d9 100644 --- a/Products/CMFPlone/TranslationServiceTool.py +++ b/Products/CMFPlone/TranslationServiceTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ This tool requires a translation service which supports the translate method and the default parameter. diff --git a/Products/CMFPlone/TypesTool.py b/Products/CMFPlone/TypesTool.py index 88bdef2..f92742a 100644 --- a/Products/CMFPlone/TypesTool.py +++ b/Products/CMFPlone/TypesTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass diff --git a/Products/CMFPlone/URLTool.py b/Products/CMFPlone/URLTool.py index 17c7cd3..6c2db81 100644 --- a/Products/CMFPlone/URLTool.py +++ b/Products/CMFPlone/URLTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass from plone.registry.interfaces import IRegistry diff --git a/Products/CMFPlone/UnicodeSplitter/splitter.py b/Products/CMFPlone/UnicodeSplitter/splitter.py index fceae06..67bcd36 100644 --- a/Products/CMFPlone/UnicodeSplitter/splitter.py +++ b/Products/CMFPlone/UnicodeSplitter/splitter.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- #!/usr/bin/env python # -*- coding: utf-8 -*- """ diff --git a/Products/CMFPlone/WorkflowTool.py b/Products/CMFPlone/WorkflowTool.py index de911f2..c9a026d 100644 --- a/Products/CMFPlone/WorkflowTool.py +++ b/Products/CMFPlone/WorkflowTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.component import getMultiAdapter from Products.CMFCore.utils import getToolByName diff --git a/Products/CMFPlone/__init__.py b/Products/CMFPlone/__init__.py index 9ea177f..ee3fb40 100644 --- a/Products/CMFPlone/__init__.py +++ b/Products/CMFPlone/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from App.ImageFile import ImageFile import os import sys diff --git a/Products/CMFPlone/browser/__init__.py b/Products/CMFPlone/browser/__init__.py index 5a8ff9e..2bcec87 100644 --- a/Products/CMFPlone/browser/__init__.py +++ b/Products/CMFPlone/browser/__init__.py @@ -1 +1,2 @@ +# -*- coding: utf-8 -*- # browser package diff --git a/Products/CMFPlone/browser/admin.py b/Products/CMFPlone/browser/admin.py index 851d516..bfc324a 100644 --- a/Products/CMFPlone/browser/admin.py +++ b/Products/CMFPlone/browser/admin.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import getSecurityManager from AccessControl.Permissions import view as View from OFS.interfaces import IApplication diff --git a/Products/CMFPlone/browser/atd.py b/Products/CMFPlone/browser/atd.py index e54c232..bb23e93 100644 --- a/Products/CMFPlone/browser/atd.py +++ b/Products/CMFPlone/browser/atd.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.utils import getToolByName from zope.component import getUtility from plone.registry.interfaces import IRegistry diff --git a/Products/CMFPlone/browser/author.py b/Products/CMFPlone/browser/author.py index 0977a19..54afe5d 100644 --- a/Products/CMFPlone/browser/author.py +++ b/Products/CMFPlone/browser/author.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import Unauthorized from Products.CMFCore.interfaces import IPropertiesTool diff --git a/Products/CMFPlone/browser/global_statusmessage.py b/Products/CMFPlone/browser/global_statusmessage.py index 552bc9e..915a399 100644 --- a/Products/CMFPlone/browser/global_statusmessage.py +++ b/Products/CMFPlone/browser/global_statusmessage.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import implementer from Products.Five import BrowserView diff --git a/Products/CMFPlone/browser/interfaces.py b/Products/CMFPlone/browser/interfaces.py index 35f82a0..a59027a 100644 --- a/Products/CMFPlone/browser/interfaces.py +++ b/Products/CMFPlone/browser/interfaces.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope import schema from zope.interface import Interface diff --git a/Products/CMFPlone/browser/main_template.py b/Products/CMFPlone/browser/main_template.py index b29dcdb..8618429 100644 --- a/Products/CMFPlone/browser/main_template.py +++ b/Products/CMFPlone/browser/main_template.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import implementer from Products.Five import BrowserView diff --git a/Products/CMFPlone/browser/sendto.py b/Products/CMFPlone/browser/sendto.py index 600b528..38acca2 100644 --- a/Products/CMFPlone/browser/sendto.py +++ b/Products/CMFPlone/browser/sendto.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone import PloneMessageFactory as _ from Products.CMFPlone.interfaces.controlpanel import IMailSchema from Products.CMFPlone.utils import pretty_title_or_id diff --git a/Products/CMFPlone/browser/sitelogo.py b/Products/CMFPlone/browser/sitelogo.py index 838eecb..2c003b4 100644 --- a/Products/CMFPlone/browser/sitelogo.py +++ b/Products/CMFPlone/browser/sitelogo.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import ISiteSchema from plone.formwidget.namedfile.converter import b64decode_file from plone.namedfile.browser import Download diff --git a/Products/CMFPlone/browser/sitemap.py b/Products/CMFPlone/browser/sitemap.py index 08b7071..3322ddc 100644 --- a/Products/CMFPlone/browser/sitemap.py +++ b/Products/CMFPlone/browser/sitemap.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_inner from zope.component import getMultiAdapter from zope.interface import implementer diff --git a/Products/CMFPlone/browser/syndication/adapters.py b/Products/CMFPlone/browser/syndication/adapters.py index 2f2140e..619bf13 100644 --- a/Products/CMFPlone/browser/syndication/adapters.py +++ b/Products/CMFPlone/browser/syndication/adapters.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.component.hooks import getSite from zope.component import adapts from zope.interface import implementer diff --git a/Products/CMFPlone/browser/syndication/settings.py b/Products/CMFPlone/browser/syndication/settings.py index ecf5b8d..a7a639e 100644 --- a/Products/CMFPlone/browser/syndication/settings.py +++ b/Products/CMFPlone/browser/syndication/settings.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.component import adapts from zope.interface import implementer from Products.CMFPlone.interfaces.syndication import IFeedSettings diff --git a/Products/CMFPlone/browser/syndication/tool.py b/Products/CMFPlone/browser/syndication/tool.py index 20fd4e7..a9dfe69 100644 --- a/Products/CMFPlone/browser/syndication/tool.py +++ b/Products/CMFPlone/browser/syndication/tool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_parent from AccessControl import Unauthorized diff --git a/Products/CMFPlone/browser/syndication/utils.py b/Products/CMFPlone/browser/syndication/utils.py index 859703e..27b3e6f 100644 --- a/Products/CMFPlone/browser/syndication/utils.py +++ b/Products/CMFPlone/browser/syndication/utils.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zExceptions import NotFound from Products.Five import BrowserView diff --git a/Products/CMFPlone/browser/syndication/views.py b/Products/CMFPlone/browser/syndication/views.py index 311e116..806e47b 100644 --- a/Products/CMFPlone/browser/syndication/views.py +++ b/Products/CMFPlone/browser/syndication/views.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from DateTime import DateTime from uuid import uuid3 from uuid import NAMESPACE_OID diff --git a/Products/CMFPlone/controlpanel/bbb/filter.py b/Products/CMFPlone/controlpanel/bbb/filter.py index e774b43..a8ea0b1 100644 --- a/Products/CMFPlone/controlpanel/bbb/filter.py +++ b/Products/CMFPlone/controlpanel/bbb/filter.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IFilterSchema from Products.CMFPlone.interfaces import IPloneSiteRoot from plone.registry.interfaces import IRegistry diff --git a/Products/CMFPlone/controlpanel/bbb/mail.py b/Products/CMFPlone/controlpanel/bbb/mail.py index 000700e..c9abf7e 100644 --- a/Products/CMFPlone/controlpanel/bbb/mail.py +++ b/Products/CMFPlone/controlpanel/bbb/mail.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IPloneSiteRoot from Products.CMFPlone.interfaces.controlpanel import IMailSchema from Products.CMFPlone.utils import safe_hasattr diff --git a/Products/CMFPlone/controlpanel/bbb/markup.py b/Products/CMFPlone/controlpanel/bbb/markup.py index 520be21..9bf578b 100644 --- a/Products/CMFPlone/controlpanel/bbb/markup.py +++ b/Products/CMFPlone/controlpanel/bbb/markup.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IMarkupSchema from Products.CMFPlone.interfaces.siteroot import IPloneSiteRoot from plone.registry.interfaces import IRegistry diff --git a/Products/CMFPlone/controlpanel/bbb/usergroups.py b/Products/CMFPlone/controlpanel/bbb/usergroups.py index 84ac3e3..7ee9659 100644 --- a/Products/CMFPlone/controlpanel/bbb/usergroups.py +++ b/Products/CMFPlone/controlpanel/bbb/usergroups.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.component import adapts from zope.component import getUtility from zope.interface import implementer diff --git a/Products/CMFPlone/controlpanel/browser/actions.py b/Products/CMFPlone/controlpanel/browser/actions.py index 9b8e2ed..636489b 100644 --- a/Products/CMFPlone/controlpanel/browser/actions.py +++ b/Products/CMFPlone/controlpanel/browser/actions.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.autoform.form import AutoExtensibleForm from Products.CMFCore.ActionInformation import Action from Products.CMFCore.interfaces import IAction, IActionCategory diff --git a/Products/CMFPlone/controlpanel/browser/imaging.py b/Products/CMFPlone/controlpanel/browser/imaging.py index ea7c52e..368e5df 100644 --- a/Products/CMFPlone/controlpanel/browser/imaging.py +++ b/Products/CMFPlone/controlpanel/browser/imaging.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone import PloneMessageFactory as _ from Products.CMFPlone.interfaces.controlpanel import IImagingSchema from logging import getLogger diff --git a/Products/CMFPlone/controlpanel/browser/mail.py b/Products/CMFPlone/controlpanel/browser/mail.py index acfad24..5604795 100644 --- a/Products/CMFPlone/controlpanel/browser/mail.py +++ b/Products/CMFPlone/controlpanel/browser/mail.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.utils import getToolByName from Products.CMFPlone import PloneMessageFactory as _ from Products.CMFPlone.interfaces.controlpanel import IMailSchema diff --git a/Products/CMFPlone/controlpanel/browser/markup.py b/Products/CMFPlone/controlpanel/browser/markup.py index 9de15ad..78be678 100644 --- a/Products/CMFPlone/controlpanel/browser/markup.py +++ b/Products/CMFPlone/controlpanel/browser/markup.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone import PloneMessageFactory as _ from Products.CMFPlone.interfaces import IMarkupSchema from plone.app.registry.browser import controlpanel diff --git a/Products/CMFPlone/controlpanel/browser/overview.py b/Products/CMFPlone/controlpanel/browser/overview.py index 924ef79..9bf6f68 100644 --- a/Products/CMFPlone/controlpanel/browser/overview.py +++ b/Products/CMFPlone/controlpanel/browser/overview.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import getSecurityManager from Acquisition import aq_inner from Globals import DevelopmentMode diff --git a/Products/CMFPlone/controlpanel/browser/quickinstaller.py b/Products/CMFPlone/controlpanel/browser/quickinstaller.py index 1806bbb..2674a6a 100644 --- a/Products/CMFPlone/controlpanel/browser/quickinstaller.py +++ b/Products/CMFPlone/controlpanel/browser/quickinstaller.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.utils import getToolByName from Products.CMFPlone import PloneMessageFactory as _ from Products.CMFPlone.interfaces import INonInstallable diff --git a/Products/CMFPlone/controlpanel/browser/security.py b/Products/CMFPlone/controlpanel/browser/security.py index 44b684d..8804f09 100644 --- a/Products/CMFPlone/controlpanel/browser/security.py +++ b/Products/CMFPlone/controlpanel/browser/security.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_inner from Products.CMFCore.utils import getToolByName from Products.CMFPlone import PloneMessageFactory as _ diff --git a/Products/CMFPlone/controlpanel/browser/syndication.py b/Products/CMFPlone/controlpanel/browser/syndication.py index 150c939..122c12f 100644 --- a/Products/CMFPlone/controlpanel/browser/syndication.py +++ b/Products/CMFPlone/controlpanel/browser/syndication.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.utils import getToolByName from zope.i18nmessageid import MessageFactory from Products.CMFPlone.interfaces.syndication import ISiteSyndicationSettings diff --git a/Products/CMFPlone/controlpanel/browser/tinymce.py b/Products/CMFPlone/controlpanel/browser/tinymce.py index 106b82b..0899d80 100644 --- a/Products/CMFPlone/controlpanel/browser/tinymce.py +++ b/Products/CMFPlone/controlpanel/browser/tinymce.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone import PloneMessageFactory as _ from Products.CMFPlone.interfaces import ITinyMCELayoutSchema from Products.CMFPlone.interfaces import ITinyMCESpellCheckerSchema diff --git a/Products/CMFPlone/controlpanel/browser/usergroups.py b/Products/CMFPlone/controlpanel/browser/usergroups.py index 800819a..0a92a0e 100644 --- a/Products/CMFPlone/controlpanel/browser/usergroups.py +++ b/Products/CMFPlone/controlpanel/browser/usergroups.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.permissions import ManagePortal from ZTUtils import make_query from itertools import chain diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py b/Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py index ade6c25..5733b45 100644 --- a/Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py +++ b/Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_inner from Products.CMFPlone.controlpanel.browser.usergroups import \ UsersGroupsControlPanelView diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py b/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py index 74dbee5..33578d5 100644 --- a/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py +++ b/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone import PloneMessageFactory as _ from zExceptions import Forbidden from Products.CMFCore.utils import getToolByName diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_groupsoverview.py b/Products/CMFPlone/controlpanel/browser/usergroups_groupsoverview.py index 4a6761f..9b96224 100644 --- a/Products/CMFPlone/controlpanel/browser/usergroups_groupsoverview.py +++ b/Products/CMFPlone/controlpanel/browser/usergroups_groupsoverview.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from itertools import chain from Acquisition import aq_inner from Products.CMFPlone.controlpanel.browser.usergroups import \ diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py b/Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py index 16d18fb..d0818d7 100644 --- a/Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py +++ b/Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone import PloneMessageFactory as _ from zExceptions import Forbidden from Products.CMFCore.utils import getToolByName diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_usersoverview.py b/Products/CMFPlone/controlpanel/browser/usergroups_usersoverview.py index bd3f4c4..d83edfd 100644 --- a/Products/CMFPlone/controlpanel/browser/usergroups_usersoverview.py +++ b/Products/CMFPlone/controlpanel/browser/usergroups_usersoverview.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import logging from Acquisition import aq_inner from zExceptions import Forbidden diff --git a/Products/CMFPlone/controlpanel/events.py b/Products/CMFPlone/controlpanel/events.py index b780c18..5170529 100644 --- a/Products/CMFPlone/controlpanel/events.py +++ b/Products/CMFPlone/controlpanel/events.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.ActionInformation import Action from Products.CMFCore.utils import getToolByName from Products.CMFPlone import PloneMessageFactory as _ diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py index cd79a08..3e79150 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IEditingSchema from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING from plone.app.testing import TEST_USER_ID diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py index b8c7f22..9d1c3b4 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IMaintenanceSchema from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING from plone.app.testing import TEST_USER_ID diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_security_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_security_adapter.py index c2cb8e9..3cd96c6 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_security_adapter.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_security_adapter.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.testing import \ PRODUCTS_CMFPLONE_INTEGRATION_TESTING from Products.CMFPlone.interfaces import ISecuritySchema diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_usergroups_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_usergroups_adapter.py index a8e0612..aca1743 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_usergroups_adapter.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_usergroups_adapter.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.app.testing import setRoles from Products.CMFPlone.interfaces import IUserGroupsSettingsSchema from zope.component import getAdapter diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py index 14b7c18..faec6da 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IDateAndTimeSchema from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING from plone.app.testing import TEST_USER_ID diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_events.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_events.py index b5ff729..da1d67b 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_events.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_events.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.testing import \ PRODUCTS_CMFPLONE_INTEGRATION_TESTING from Products.CMFCore.utils import getToolByName diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py index aecf6da..2a10f99 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.app.testing import PLONE_INTEGRATION_TESTING from plone.app.testing import TEST_USER_ID from plone.app.testing import setRoles diff --git a/Products/CMFPlone/controlpanel/utils.py b/Products/CMFPlone/controlpanel/utils.py index e6d9d04..c068d52 100644 --- a/Products/CMFPlone/controlpanel/utils.py +++ b/Products/CMFPlone/controlpanel/utils.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.utils import getToolByName import logging diff --git a/Products/CMFPlone/controlpanel/widgets.py b/Products/CMFPlone/controlpanel/widgets.py index 4808edd..9619c81 100644 --- a/Products/CMFPlone/controlpanel/widgets.py +++ b/Products/CMFPlone/controlpanel/widgets.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from z3c.form.browser.checkbox import CheckBoxWidget from z3c.form.interfaces import NO_VALUE from z3c.form.widget import FieldWidget diff --git a/Products/CMFPlone/events.py b/Products/CMFPlone/events.py index edcb2bb..0a8546d2 100644 --- a/Products/CMFPlone/events.py +++ b/Products/CMFPlone/events.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import implementer from zope.component import getMultiAdapter from zope.component.interfaces import ObjectEvent diff --git a/Products/CMFPlone/exportimport/__init__.py b/Products/CMFPlone/exportimport/__init__.py index c9d620a..ee30c6a 100644 --- a/Products/CMFPlone/exportimport/__init__.py +++ b/Products/CMFPlone/exportimport/__init__.py @@ -1 +1,2 @@ +# -*- coding: utf-8 -*- """exportimport package""" diff --git a/Products/CMFPlone/exportimport/controlpanel.py b/Products/CMFPlone/exportimport/controlpanel.py index ecf8107..ce4118f 100644 --- a/Products/CMFPlone/exportimport/controlpanel.py +++ b/Products/CMFPlone/exportimport/controlpanel.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2005 Zope Corporation and Contributors. All Rights Reserved. diff --git a/Products/CMFPlone/exportimport/memberdata_properties.py b/Products/CMFPlone/exportimport/memberdata_properties.py index 2858346..ee665d6 100644 --- a/Products/CMFPlone/exportimport/memberdata_properties.py +++ b/Products/CMFPlone/exportimport/memberdata_properties.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """MemberData tool properties setup handlers. $Id:$ diff --git a/Products/CMFPlone/exportimport/propertiestool.py b/Products/CMFPlone/exportimport/propertiestool.py index 7d819ed..c22c452 100644 --- a/Products/CMFPlone/exportimport/propertiestool.py +++ b/Products/CMFPlone/exportimport/propertiestool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Plone Properties tool setup handlers. $Id:$ diff --git a/Products/CMFPlone/exportimport/tests/__init__.py b/Products/CMFPlone/exportimport/tests/__init__.py index 983bbca..aebf08c 100644 --- a/Products/CMFPlone/exportimport/tests/__init__.py +++ b/Products/CMFPlone/exportimport/tests/__init__.py @@ -1 +1,2 @@ +# -*- coding: utf-8 -*- """exportimport tests package""" diff --git a/Products/CMFPlone/exportimport/tests/base.py b/Products/CMFPlone/exportimport/tests/base.py index fdbb490..0ae2fad 100644 --- a/Products/CMFPlone/exportimport/tests/base.py +++ b/Products/CMFPlone/exportimport/tests/base.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.testing.zca import UNIT_TESTING from Products.GenericSetup.testing import BodyAdapterTestCase from Products.GenericSetup.testing import NodeAdapterTestCase diff --git a/Products/CMFPlone/exportimport/tests/testControlPanel.py b/Products/CMFPlone/exportimport/tests/testControlPanel.py index f72abac..773ab97 100644 --- a/Products/CMFPlone/exportimport/tests/testControlPanel.py +++ b/Products/CMFPlone/exportimport/tests/testControlPanel.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from OFS.Folder import Folder from Products.CMFPlone.exportimport.tests.base import BodyAdapterTestCase from Products.CMFPlone.interfaces import IControlPanel diff --git a/Products/CMFPlone/exportimport/tests/testPropertiesTool.py b/Products/CMFPlone/exportimport/tests/testPropertiesTool.py index 136b0ae..7d76691 100644 --- a/Products/CMFPlone/exportimport/tests/testPropertiesTool.py +++ b/Products/CMFPlone/exportimport/tests/testPropertiesTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.exportimport.tests.base import BodyAdapterTestCase from Products.CMFPlone.PropertiesTool import PropertiesTool from Products.CMFPlone.PropertiesTool import SimpleItemWithProperties diff --git a/Products/CMFPlone/factory.py b/Products/CMFPlone/factory.py index 5dff16c..af01669 100644 --- a/Products/CMFPlone/factory.py +++ b/Products/CMFPlone/factory.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.Portal import PloneSite from Products.CMFPlone.events import SiteManagerCreatedEvent from Products.CMFPlone.interfaces import INonInstallable diff --git a/Products/CMFPlone/i18nl10n.py b/Products/CMFPlone/i18nl10n.py index c59a6f3..292adf5 100644 --- a/Products/CMFPlone/i18nl10n.py +++ b/Products/CMFPlone/i18nl10n.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ Collection of i18n and l10n utility methods. """ diff --git a/Products/CMFPlone/interfaces/__init__.py b/Products/CMFPlone/interfaces/__init__.py index ededdc8..8e5025c 100644 --- a/Products/CMFPlone/interfaces/__init__.py +++ b/Products/CMFPlone/interfaces/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # flake8: noqa from basetool import IPloneBaseTool from basetool import IPloneCatalogTool diff --git a/Products/CMFPlone/interfaces/atd.py b/Products/CMFPlone/interfaces/atd.py index 50ea205..883f99a 100644 --- a/Products/CMFPlone/interfaces/atd.py +++ b/Products/CMFPlone/interfaces/atd.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/basetool.py b/Products/CMFPlone/interfaces/basetool.py index cff9d2c..adc8cd8 100644 --- a/Products/CMFPlone/interfaces/basetool.py +++ b/Products/CMFPlone/interfaces/basetool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/breadcrumbs.py b/Products/CMFPlone/interfaces/breadcrumbs.py index 005bca1..d004ae8 100644 --- a/Products/CMFPlone/interfaces/breadcrumbs.py +++ b/Products/CMFPlone/interfaces/breadcrumbs.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/constrains.py b/Products/CMFPlone/interfaces/constrains.py index 3686052..2c4b2cd 100644 --- a/Products/CMFPlone/interfaces/constrains.py +++ b/Products/CMFPlone/interfaces/constrains.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/events.py b/Products/CMFPlone/interfaces/events.py index 081b4ae..c68a704 100644 --- a/Products/CMFPlone/interfaces/events.py +++ b/Products/CMFPlone/interfaces/events.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.component.interfaces import IObjectEvent from zope.interface import Attribute from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/installable.py b/Products/CMFPlone/interfaces/installable.py index e9994df..f0e6320 100644 --- a/Products/CMFPlone/interfaces/installable.py +++ b/Products/CMFPlone/interfaces/installable.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/interface.py b/Products/CMFPlone/interfaces/interface.py index 74e6c72..905df9f 100644 --- a/Products/CMFPlone/interfaces/interface.py +++ b/Products/CMFPlone/interfaces/interface.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Attribute from basetool import IPloneBaseTool diff --git a/Products/CMFPlone/interfaces/language.py b/Products/CMFPlone/interfaces/language.py index e3838c3..73fa1e9 100644 --- a/Products/CMFPlone/interfaces/language.py +++ b/Products/CMFPlone/interfaces/language.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/migration.py b/Products/CMFPlone/interfaces/migration.py index 2ae6a85..e956544 100644 --- a/Products/CMFPlone/interfaces/migration.py +++ b/Products/CMFPlone/interfaces/migration.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/patterns.py b/Products/CMFPlone/interfaces/patterns.py index 9a7a0ad..89e7255 100644 --- a/Products/CMFPlone/interfaces/patterns.py +++ b/Products/CMFPlone/interfaces/patterns.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/properties.py b/Products/CMFPlone/interfaces/properties.py index 560c80b..1c137a3 100644 --- a/Products/CMFPlone/interfaces/properties.py +++ b/Products/CMFPlone/interfaces/properties.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface from zope.interface import Attribute diff --git a/Products/CMFPlone/interfaces/resources.py b/Products/CMFPlone/interfaces/resources.py index 083aec6..7ffe2db 100644 --- a/Products/CMFPlone/interfaces/resources.py +++ b/Products/CMFPlone/interfaces/resources.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import zope.interface import zope.component from zope import schema diff --git a/Products/CMFPlone/interfaces/siteroot.py b/Products/CMFPlone/interfaces/siteroot.py index 83c1198..1118b40 100644 --- a/Products/CMFPlone/interfaces/siteroot.py +++ b/Products/CMFPlone/interfaces/siteroot.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface from Products.CMFCore.interfaces import ISiteRoot from plone.app.layout.navigation.interfaces import INavigationRoot diff --git a/Products/CMFPlone/interfaces/structure.py b/Products/CMFPlone/interfaces/structure.py index ea43a11..95e36f2 100644 --- a/Products/CMFPlone/interfaces/structure.py +++ b/Products/CMFPlone/interfaces/structure.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/syndication.py b/Products/CMFPlone/interfaces/syndication.py index 28c9d29..8892f54 100644 --- a/Products/CMFPlone/interfaces/syndication.py +++ b/Products/CMFPlone/interfaces/syndication.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface from zope import schema from Products.CMFPlone import PloneMessageFactory as _ diff --git a/Products/CMFPlone/interfaces/translationservice.py b/Products/CMFPlone/interfaces/translationservice.py index b908e28..83c2086 100644 --- a/Products/CMFPlone/interfaces/translationservice.py +++ b/Products/CMFPlone/interfaces/translationservice.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/workflow.py b/Products/CMFPlone/interfaces/workflow.py index e056c93..fe37444 100644 --- a/Products/CMFPlone/interfaces/workflow.py +++ b/Products/CMFPlone/interfaces/workflow.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface.common.sequence import IReadSequence diff --git a/Products/CMFPlone/log.py b/Products/CMFPlone/log.py index ba2e635..5d90506 100644 --- a/Products/CMFPlone/log.py +++ b/Products/CMFPlone/log.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ This module resolves an import order dependency. Don't import from here, import from utils. diff --git a/Products/CMFPlone/patches/__init__.py b/Products/CMFPlone/patches/__init__.py index f6b5981..b720b41 100644 --- a/Products/CMFPlone/patches/__init__.py +++ b/Products/CMFPlone/patches/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import addzmiplonesite # Add an explicit link to add a new Plone # site to the ZMI for faster access diff --git a/Products/CMFPlone/patches/addzmiplonesite.py b/Products/CMFPlone/patches/addzmiplonesite.py index 8bddaea..73659ee 100644 --- a/Products/CMFPlone/patches/addzmiplonesite.py +++ b/Products/CMFPlone/patches/addzmiplonesite.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from OFS.ObjectManager import ObjectManager ADD_PLONE_SITE_HTML = ''' diff --git a/Products/CMFPlone/patches/addzmisecuritywarning.py b/Products/CMFPlone/patches/addzmisecuritywarning.py index 373de8a..13f9f8d 100644 --- a/Products/CMFPlone/patches/addzmisecuritywarning.py +++ b/Products/CMFPlone/patches/addzmisecuritywarning.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from OFS.role import RoleManager ADD_SECURITY_WARNING = ''' diff --git a/Products/CMFPlone/patches/csrf.py b/Products/CMFPlone/patches/csrf.py index cbd234f..ca64c03 100644 --- a/Products/CMFPlone/patches/csrf.py +++ b/Products/CMFPlone/patches/csrf.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.protect import protect, CheckAuthenticator # apply csrf-protection decorator to the given callable diff --git a/Products/CMFPlone/patches/dateIndexPatch.py b/Products/CMFPlone/patches/dateIndexPatch.py index fe8c9d6..aa54163 100644 --- a/Products/CMFPlone/patches/dateIndexPatch.py +++ b/Products/CMFPlone/patches/dateIndexPatch.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Avoid OverflowErrors in Date*Indexes from Products.PluginIndexes.DateIndex.DateIndex import DateIndex diff --git a/Products/CMFPlone/patches/iso8601.py b/Products/CMFPlone/patches/iso8601.py index 785b255..5aa5a39 100644 --- a/Products/CMFPlone/patches/iso8601.py +++ b/Products/CMFPlone/patches/iso8601.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # from warnings import warn from DateTime import DateTime diff --git a/Products/CMFPlone/patches/publishing.py b/Products/CMFPlone/patches/publishing.py index baec076..61085f7 100644 --- a/Products/CMFPlone/patches/publishing.py +++ b/Products/CMFPlone/patches/publishing.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # From Products.PloneHotfix20160419 # Plus extras for properties. from OFS.PropertyManager import PropertyManager diff --git a/Products/CMFPlone/patches/securemailhost.py b/Products/CMFPlone/patches/securemailhost.py index 35baf08..2db5213 100644 --- a/Products/CMFPlone/patches/securemailhost.py +++ b/Products/CMFPlone/patches/securemailhost.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """This module provides backwards compatiblity for products using the SecureMailHost API. It should be removed entirely for Plone 5.0.""" import sys diff --git a/Products/CMFPlone/patches/security.py b/Products/CMFPlone/patches/security.py index 622f789..8985591 100644 --- a/Products/CMFPlone/patches/security.py +++ b/Products/CMFPlone/patches/security.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # 1. make sure allow_module can't be called from restricted code import AccessControl AccessControl.allow_module.__roles__ = () diff --git a/Products/CMFPlone/patches/sendmail.py b/Products/CMFPlone/patches/sendmail.py index fbb0161..04e3c38 100644 --- a/Products/CMFPlone/patches/sendmail.py +++ b/Products/CMFPlone/patches/sendmail.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.registry.interfaces import IRegistry from Products.CMFPlone.interfaces import IMailSchema from transaction._transaction import Status diff --git a/Products/CMFPlone/patches/speed.py b/Products/CMFPlone/patches/speed.py index ad73b01..81c5c0a 100644 --- a/Products/CMFPlone/patches/speed.py +++ b/Products/CMFPlone/patches/speed.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.memoize import forever from os import environ diff --git a/Products/CMFPlone/patches/templatecookcheck.py b/Products/CMFPlone/patches/templatecookcheck.py index 9be05f1..574f5a0 100644 --- a/Products/CMFPlone/patches/templatecookcheck.py +++ b/Products/CMFPlone/patches/templatecookcheck.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # The implementation in zope.pagetemplate always checks for # updated files unless python is run with -O, but we want to # base this on the Zope2 debug mode flag. diff --git a/Products/CMFPlone/patches/unicodeFallbackPatch.py b/Products/CMFPlone/patches/unicodeFallbackPatch.py index 520fbd6..5600369 100644 --- a/Products/CMFPlone/patches/unicodeFallbackPatch.py +++ b/Products/CMFPlone/patches/unicodeFallbackPatch.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # The following hacks make sure that Unicode and utf-8 encoded strings can be # mixed in all page templates and tal snippets. diff --git a/Products/CMFPlone/patches/unicodehacks.py b/Products/CMFPlone/patches/unicodehacks.py index 99a6893..8e9414e 100644 --- a/Products/CMFPlone/patches/unicodehacks.py +++ b/Products/CMFPlone/patches/unicodehacks.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- def _unicode_replace(structure): if isinstance(structure, str): text = structure.decode('utf-8', 'replace') diff --git a/Products/CMFPlone/patches/z3c_form.py b/Products/CMFPlone/patches/z3c_form.py index 1b61598..0b10250 100644 --- a/Products/CMFPlone/patches/z3c_form.py +++ b/Products/CMFPlone/patches/z3c_form.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # This is from Products.PloneHotfix20160830. from urlparse import urlparse from z3c.form import widget diff --git a/Products/CMFPlone/permissions.py b/Products/CMFPlone/permissions.py index 07370e2..04ffbcd 100644 --- a/Products/CMFPlone/permissions.py +++ b/Products/CMFPlone/permissions.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ CMFPlone product permissions """ from AccessControl import ModuleSecurityInfo diff --git a/Products/CMFPlone/resources/__init__.py b/Products/CMFPlone/resources/__init__.py index 3cb9aa2..42cdec2 100644 --- a/Products/CMFPlone/resources/__init__.py +++ b/Products/CMFPlone/resources/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import os diff --git a/Products/CMFPlone/resources/browser/combine.py b/Products/CMFPlone/resources/browser/combine.py index 98d4adf..d7c4ecd 100644 --- a/Products/CMFPlone/resources/browser/combine.py +++ b/Products/CMFPlone/resources/browser/combine.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_base from datetime import datetime from plone.registry.interfaces import IRegistry diff --git a/Products/CMFPlone/resources/browser/configjs.py b/Products/CMFPlone/resources/browser/configjs.py index 4fa690c..4af09b8 100644 --- a/Products/CMFPlone/resources/browser/configjs.py +++ b/Products/CMFPlone/resources/browser/configjs.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import json import re diff --git a/Products/CMFPlone/resources/browser/cook.py b/Products/CMFPlone/resources/browser/cook.py index 3aa87de..4fdf61d 100644 --- a/Products/CMFPlone/resources/browser/cook.py +++ b/Products/CMFPlone/resources/browser/cook.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import logging from Products.CMFPlone.interfaces.resources import IResourceRegistry diff --git a/Products/CMFPlone/resources/browser/interfaces.py b/Products/CMFPlone/resources/browser/interfaces.py index b10009c..97717f9 100644 --- a/Products/CMFPlone/resources/browser/interfaces.py +++ b/Products/CMFPlone/resources/browser/interfaces.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/resources/browser/mixins.py b/Products/CMFPlone/resources/browser/mixins.py index 8a6ff36..69fce1a 100644 --- a/Products/CMFPlone/resources/browser/mixins.py +++ b/Products/CMFPlone/resources/browser/mixins.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IResourceRegistry from Products.Five.browser import BrowserView from plone.registry.interfaces import IRegistry diff --git a/Products/CMFPlone/resources/browser/resource.py b/Products/CMFPlone/resources/browser/resource.py index d7734af..9b2b55d 100644 --- a/Products/CMFPlone/resources/browser/resource.py +++ b/Products/CMFPlone/resources/browser/resource.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_inner, aq_base, aq_parent from Products.CMFCore.Expression import Expression from Products.CMFCore.Expression import createExprContext diff --git a/Products/CMFPlone/resources/browser/scripts.py b/Products/CMFPlone/resources/browser/scripts.py index 52ab2cb..36763c0 100644 --- a/Products/CMFPlone/resources/browser/scripts.py +++ b/Products/CMFPlone/resources/browser/scripts.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from urlparse import urlparse from urllib import quote diff --git a/Products/CMFPlone/resources/browser/styles.py b/Products/CMFPlone/resources/browser/styles.py index 663f7a9..7561e91 100644 --- a/Products/CMFPlone/resources/browser/styles.py +++ b/Products/CMFPlone/resources/browser/styles.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from urlparse import urlparse from urllib import quote diff --git a/Products/CMFPlone/resources/exportimport/bundles.py b/Products/CMFPlone/resources/exportimport/bundles.py index d5f3df1..56ea8aa 100644 --- a/Products/CMFPlone/resources/exportimport/bundles.py +++ b/Products/CMFPlone/resources/exportimport/bundles.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.registry.interfaces import IRegistry from zope.component import queryUtility from zope.globalrequest import getRequest diff --git a/Products/CMFPlone/resources/exportimport/cssregistry.py b/Products/CMFPlone/resources/exportimport/cssregistry.py index 3f1babd..927c7dd 100644 --- a/Products/CMFPlone/resources/exportimport/cssregistry.py +++ b/Products/CMFPlone/resources/exportimport/cssregistry.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.resources.exportimport.resourceregistry import \ ResourceRegistryNodeAdapter from Products.CMFPlone.resources.exportimport.resourceregistry import \ diff --git a/Products/CMFPlone/resources/exportimport/jsregistry.py b/Products/CMFPlone/resources/exportimport/jsregistry.py index 8aae390..ec99026 100644 --- a/Products/CMFPlone/resources/exportimport/jsregistry.py +++ b/Products/CMFPlone/resources/exportimport/jsregistry.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.ResourceRegistries.interfaces import IJSRegistry from resourceregistry import ResourceRegistryNodeAdapter from resourceregistry import importResRegistry diff --git a/Products/CMFPlone/resources/exportimport/resourceregistry.py b/Products/CMFPlone/resources/exportimport/resourceregistry.py index 9c940d3..504b88b 100644 --- a/Products/CMFPlone/resources/exportimport/resourceregistry.py +++ b/Products/CMFPlone/resources/exportimport/resourceregistry.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from datetime import datetime from Products.CMFCore.utils import getToolByName diff --git a/Products/CMFPlone/resources/viewlets/__init__.py b/Products/CMFPlone/resources/viewlets/__init__.py index 2fc0fe7..ab52c67 100644 --- a/Products/CMFPlone/resources/viewlets/__init__.py +++ b/Products/CMFPlone/resources/viewlets/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.ResourceRegistries.interfaces.registries import IResourceRegistry from Products.ResourceRegistries.interfaces.registries import ICSSRegistry from Products.ResourceRegistries.interfaces.registries import IKSSRegistry diff --git a/Products/CMFPlone/resources/viewlets/registries.py b/Products/CMFPlone/resources/viewlets/registries.py index a5c43d2..89a0ca6 100644 --- a/Products/CMFPlone/resources/viewlets/registries.py +++ b/Products/CMFPlone/resources/viewlets/registries.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Attribute from zope.interface import Interface diff --git a/Products/CMFPlone/resources/viewlets/settings.py b/Products/CMFPlone/resources/viewlets/settings.py index de1f147..7324f35 100644 --- a/Products/CMFPlone/resources/viewlets/settings.py +++ b/Products/CMFPlone/resources/viewlets/settings.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope import schema from zope.i18nmessageid import MessageFactory from zope.interface import Interface diff --git a/Products/CMFPlone/setuphandlers.py b/Products/CMFPlone/setuphandlers.py index 786a764..0dc2b8c 100644 --- a/Products/CMFPlone/setuphandlers.py +++ b/Products/CMFPlone/setuphandlers.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_base from Products.CMFCore.utils import getToolByName from Products.CMFPlone.factory import _DEFAULT_PROFILE diff --git a/Products/CMFPlone/tests/PloneTestCase.py b/Products/CMFPlone/tests/PloneTestCase.py index dd09c15..7118b2b 100644 --- a/Products/CMFPlone/tests/PloneTestCase.py +++ b/Products/CMFPlone/tests/PloneTestCase.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.testing.z2 import Browser from plone.app.testing.bbb import PloneTestCase from plone.app.testing import PLONE_SITE_ID as portal_name diff --git a/Products/CMFPlone/tests/dummy.py b/Products/CMFPlone/tests/dummy.py index 3c155e7..da168f2 100644 --- a/Products/CMFPlone/tests/dummy.py +++ b/Products/CMFPlone/tests/dummy.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # # Helper objects for the Plone test suite # diff --git a/Products/CMFPlone/tests/robot/variables.py b/Products/CMFPlone/tests/robot/variables.py index a32e833..040b845 100644 --- a/Products/CMFPlone/tests/robot/variables.py +++ b/Products/CMFPlone/tests/robot/variables.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import os PATH_TO_TEST_FILES = os.path.join(os.path.dirname(__file__)) # noqa diff --git a/Products/CMFPlone/tests/testActionsTool.py b/Products/CMFPlone/tests/testActionsTool.py index 0a5fa60..842cbbf 100644 --- a/Products/CMFPlone/tests/testActionsTool.py +++ b/Products/CMFPlone/tests/testActionsTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.app.testing.bbb import PloneTestCase from traceback import format_exception diff --git a/Products/CMFPlone/tests/testBatch.py b/Products/CMFPlone/tests/testBatch.py index 4fcc283..8b317b7 100644 --- a/Products/CMFPlone/tests/testBatch.py +++ b/Products/CMFPlone/tests/testBatch.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.app.testing.bbb import PloneTestCase from Products.CMFPlone.PloneBatch import Batch from Products.ZCatalog.Lazy import LazyMap diff --git a/Products/CMFPlone/tests/testBrowserAdmin.py b/Products/CMFPlone/tests/testBrowserAdmin.py index 22ce9b8..3c42aaf 100644 --- a/Products/CMFPlone/tests/testBrowserAdmin.py +++ b/Products/CMFPlone/tests/testBrowserAdmin.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import getSecurityManager from AccessCo... [truncated message content] |
|
From: Jens W. K. <je...@pl...> - 2016-09-30 15:10:36
|
Repository: Products.CMFPlone Branch: refs/heads/utf8-headers Date: 2016-09-30T17:10:03+02:00 Author: Jens W. Klein (jensens) <jk...@kl...> Commit: https://github.com/plone/Products.CMFPlone/commit/f47973731a8cc12e70fb5288ee8aaefd80f61791 add utf8 headers to all python files Files changed: M Products/CMFPlone/ActionsTool.py M Products/CMFPlone/CatalogTool.py M Products/CMFPlone/DublinCore.py M Products/CMFPlone/MigrationTool.py M Products/CMFPlone/PloneBaseTool.py M Products/CMFPlone/PloneBatch.py M Products/CMFPlone/PloneControlPanel.py M Products/CMFPlone/PloneFolder.py M Products/CMFPlone/PropertiesTool.py M Products/CMFPlone/QuickInstallerTool.py M Products/CMFPlone/RegistrationTool.py M Products/CMFPlone/SkinsTool.py M Products/CMFPlone/TranslationServiceTool.py M Products/CMFPlone/TypesTool.py M Products/CMFPlone/URLTool.py M Products/CMFPlone/UnicodeSplitter/splitter.py M Products/CMFPlone/WorkflowTool.py M Products/CMFPlone/__init__.py M Products/CMFPlone/browser/__init__.py M Products/CMFPlone/browser/admin.py M Products/CMFPlone/browser/atd.py M Products/CMFPlone/browser/author.py M Products/CMFPlone/browser/global_statusmessage.py M Products/CMFPlone/browser/interfaces.py M Products/CMFPlone/browser/main_template.py M Products/CMFPlone/browser/sendto.py M Products/CMFPlone/browser/sitelogo.py M Products/CMFPlone/browser/sitemap.py M Products/CMFPlone/browser/syndication/adapters.py M Products/CMFPlone/browser/syndication/settings.py M Products/CMFPlone/browser/syndication/tool.py M Products/CMFPlone/browser/syndication/utils.py M Products/CMFPlone/browser/syndication/views.py M Products/CMFPlone/controlpanel/bbb/filter.py M Products/CMFPlone/controlpanel/bbb/mail.py M Products/CMFPlone/controlpanel/bbb/markup.py M Products/CMFPlone/controlpanel/bbb/usergroups.py M Products/CMFPlone/controlpanel/browser/actions.py M Products/CMFPlone/controlpanel/browser/imaging.py M Products/CMFPlone/controlpanel/browser/mail.py M Products/CMFPlone/controlpanel/browser/markup.py M Products/CMFPlone/controlpanel/browser/overview.py M Products/CMFPlone/controlpanel/browser/quickinstaller.py M Products/CMFPlone/controlpanel/browser/security.py M Products/CMFPlone/controlpanel/browser/syndication.py M Products/CMFPlone/controlpanel/browser/tinymce.py M Products/CMFPlone/controlpanel/browser/usergroups.py M Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py M Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py M Products/CMFPlone/controlpanel/browser/usergroups_groupsoverview.py M Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py M Products/CMFPlone/controlpanel/browser/usergroups_usersoverview.py M Products/CMFPlone/controlpanel/events.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_security_adapter.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_usergroups_adapter.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_events.py M Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py M Products/CMFPlone/controlpanel/utils.py M Products/CMFPlone/controlpanel/widgets.py M Products/CMFPlone/events.py M Products/CMFPlone/exportimport/__init__.py M Products/CMFPlone/exportimport/controlpanel.py M Products/CMFPlone/exportimport/memberdata_properties.py M Products/CMFPlone/exportimport/propertiestool.py M Products/CMFPlone/exportimport/tests/__init__.py M Products/CMFPlone/exportimport/tests/base.py M Products/CMFPlone/exportimport/tests/testControlPanel.py M Products/CMFPlone/exportimport/tests/testPropertiesTool.py M Products/CMFPlone/factory.py M Products/CMFPlone/i18nl10n.py M Products/CMFPlone/interfaces/__init__.py M Products/CMFPlone/interfaces/atd.py M Products/CMFPlone/interfaces/basetool.py M Products/CMFPlone/interfaces/breadcrumbs.py M Products/CMFPlone/interfaces/constrains.py M Products/CMFPlone/interfaces/events.py M Products/CMFPlone/interfaces/installable.py M Products/CMFPlone/interfaces/interface.py M Products/CMFPlone/interfaces/language.py M Products/CMFPlone/interfaces/migration.py M Products/CMFPlone/interfaces/patterns.py M Products/CMFPlone/interfaces/properties.py M Products/CMFPlone/interfaces/resources.py M Products/CMFPlone/interfaces/siteroot.py M Products/CMFPlone/interfaces/structure.py M Products/CMFPlone/interfaces/syndication.py M Products/CMFPlone/interfaces/translationservice.py M Products/CMFPlone/interfaces/workflow.py M Products/CMFPlone/log.py M Products/CMFPlone/patches/__init__.py M Products/CMFPlone/patches/addzmiplonesite.py M Products/CMFPlone/patches/addzmisecuritywarning.py M Products/CMFPlone/patches/csrf.py M Products/CMFPlone/patches/dateIndexPatch.py M Products/CMFPlone/patches/iso8601.py M Products/CMFPlone/patches/publishing.py M Products/CMFPlone/patches/securemailhost.py M Products/CMFPlone/patches/security.py M Products/CMFPlone/patches/sendmail.py M Products/CMFPlone/patches/speed.py M Products/CMFPlone/patches/templatecookcheck.py M Products/CMFPlone/patches/unicodeFallbackPatch.py M Products/CMFPlone/patches/unicodehacks.py M Products/CMFPlone/patches/z3c_form.py M Products/CMFPlone/permissions.py M Products/CMFPlone/resources/__init__.py M Products/CMFPlone/resources/browser/combine.py M Products/CMFPlone/resources/browser/configjs.py M Products/CMFPlone/resources/browser/cook.py M Products/CMFPlone/resources/browser/interfaces.py M Products/CMFPlone/resources/browser/mixins.py M Products/CMFPlone/resources/browser/resource.py M Products/CMFPlone/resources/browser/scripts.py M Products/CMFPlone/resources/browser/styles.py M Products/CMFPlone/resources/exportimport/bundles.py M Products/CMFPlone/resources/exportimport/cssregistry.py M Products/CMFPlone/resources/exportimport/jsregistry.py M Products/CMFPlone/resources/exportimport/resourceregistry.py M Products/CMFPlone/resources/viewlets/__init__.py M Products/CMFPlone/resources/viewlets/registries.py M Products/CMFPlone/resources/viewlets/settings.py M Products/CMFPlone/setuphandlers.py M Products/CMFPlone/skins/plone_form_scripts/plone_change_password.py M Products/CMFPlone/skins/plone_login/login.py M Products/CMFPlone/skins/plone_login/require_login.py M Products/CMFPlone/skins/plone_prefs/prefs_error_log_setProperties.py M Products/CMFPlone/skins/plone_prefs/prefs_error_log_update.py M Products/CMFPlone/skins/plone_scripts/add_ext_editor.py M Products/CMFPlone/skins/plone_scripts/author_find_content.py M Products/CMFPlone/skins/plone_scripts/browserDefault.py M Products/CMFPlone/skins/plone_scripts/canSelectDefaultPage.py M Products/CMFPlone/skins/plone_scripts/check_id.py M Products/CMFPlone/skins/plone_scripts/createMultiColumnList.py M Products/CMFPlone/skins/plone_scripts/create_query_string.py M Products/CMFPlone/skins/plone_scripts/date_components_support.py M Products/CMFPlone/skins/plone_scripts/displayContentsTab.py M Products/CMFPlone/skins/plone_scripts/enableHTTPCompression.py M Products/CMFPlone/skins/plone_scripts/externalEditorEnabled.py M Products/CMFPlone/skins/plone_scripts/external_edit.py M Products/CMFPlone/skins/plone_scripts/formatColumns.py M Products/CMFPlone/skins/plone_scripts/generateUniqueId.py M Products/CMFPlone/skins/plone_scripts/getAllowedTypes.py M Products/CMFPlone/skins/plone_scripts/getFolderContents.py M Products/CMFPlone/skins/plone_scripts/getGlobalPortalRoles.py M Products/CMFPlone/skins/plone_scripts/getNotAddableTypes.py M Products/CMFPlone/skins/plone_scripts/getObjSize.py M Products/CMFPlone/skins/plone_scripts/getObjectsFromPathList.py M Products/CMFPlone/skins/plone_scripts/getPopupScript.py M Products/CMFPlone/skins/plone_scripts/getPortalTypeList.py M Products/CMFPlone/skins/plone_scripts/getPortalTypes.py M Products/CMFPlone/skins/plone_scripts/getSelectableViews.py M Products/CMFPlone/skins/plone_scripts/hasIndexHtml.py M Products/CMFPlone/skins/plone_scripts/isExpired.py M Products/CMFPlone/skins/plone_scripts/mail_password.py M Products/CMFPlone/skins/plone_scripts/my_worklist.py M Products/CMFPlone/skins/plone_scripts/navigationParent.py M Products/CMFPlone/skins/plone_scripts/plone.css.py M Products/CMFPlone/skins/plone_scripts/plone_log.py M Products/CMFPlone/skins/plone_scripts/pretty_title_or_id.py M Products/CMFPlone/skins/plone_scripts/queryCatalog.py M Products/CMFPlone/skins/plone_scripts/raiseUnauthorized.py M Products/CMFPlone/skins/plone_scripts/redirectToReferrer.py M Products/CMFPlone/skins/plone_scripts/returnNone.py M Products/CMFPlone/skins/plone_scripts/reverseList.py M Products/CMFPlone/skins/plone_scripts/setAuthCookie.py M Products/CMFPlone/skins/plone_scripts/show_id.py M Products/CMFPlone/skins/plone_scripts/sortObjects.py M Products/CMFPlone/skins/plone_scripts/sort_modified_ascending.py M Products/CMFPlone/skins/plone_scripts/toLocalizedTime.py M Products/CMFPlone/skins/plone_scripts/translate.py M Products/CMFPlone/skins/plone_scripts/unique.py M Products/CMFPlone/skins/plone_scripts/utranslate.py M Products/CMFPlone/skins/plone_templates/standard_error_message.py M Products/CMFPlone/tests/PloneTestCase.py M Products/CMFPlone/tests/dummy.py M Products/CMFPlone/tests/robot/variables.py M Products/CMFPlone/tests/testActionsTool.py M Products/CMFPlone/tests/testBatch.py M Products/CMFPlone/tests/testBrowserAdmin.py M Products/CMFPlone/tests/testBrowserDefault.py M Products/CMFPlone/tests/testBrowserDefaultScripts.py M Products/CMFPlone/tests/testBrowserLayerPrecedence.py M Products/CMFPlone/tests/testCSRFProtection.py M Products/CMFPlone/tests/testCSSandJSRegistry.py M Products/CMFPlone/tests/testCatalogTool.py M Products/CMFPlone/tests/testCheckId.py M Products/CMFPlone/tests/testContentPublishing.py M Products/CMFPlone/tests/testContentSecurity.py M Products/CMFPlone/tests/testContentTypeScripts.py M Products/CMFPlone/tests/testControlPanel.py M Products/CMFPlone/tests/testControlPanelScripts.py M Products/CMFPlone/tests/testCookieAuth.py M Products/CMFPlone/tests/testCutPasteSecurity.py M Products/CMFPlone/tests/testDateComponentsSupport.py M Products/CMFPlone/tests/testDateIndexRanges.py M Products/CMFPlone/tests/testDateTimeIntegration.py M Products/CMFPlone/tests/testEmailLogin.py M Products/CMFPlone/tests/testExternalEditorEnabled.py M Products/CMFPlone/tests/testGetObjectSize.py M Products/CMFPlone/tests/testIImagingSchema.py M Products/CMFPlone/tests/testInterfaces.py M Products/CMFPlone/tests/testLoggedIn.py M Products/CMFPlone/tests/testMigrationTool.py M Products/CMFPlone/tests/testNavTree.py M Products/CMFPlone/tests/testNavigationParent.py M Products/CMFPlone/tests/testNextPrevious.py M Products/CMFPlone/tests/testOrderSupport.py M Products/CMFPlone/tests/testPloneFolder.py M Products/CMFPlone/tests/testPloneTestCase.py M Products/CMFPlone/tests/testPloneTool.py M Products/CMFPlone/tests/testPloneView.py M Products/CMFPlone/tests/testPortalCreation.py M Products/CMFPlone/tests/testQuickInstallerTool.py M Products/CMFPlone/tests/testResourceRegistries.py M Products/CMFPlone/tests/testRestrictedAcquisition.py M Products/CMFPlone/tests/testSSOLogin.py M Products/CMFPlone/tests/testSearch.py M Products/CMFPlone/tests/testSecurity.py M Products/CMFPlone/tests/testSecurityDeclarations.py M Products/CMFPlone/tests/testSiteAdminRole.py M Products/CMFPlone/tests/testSortObjects.py M Products/CMFPlone/tests/testSyndication.py M Products/CMFPlone/tests/testTranslationServiceTool.py M Products/CMFPlone/tests/testURLTool.py M Products/CMFPlone/tests/testUserFolderBasics.py M Products/CMFPlone/tests/testWebDAV.py M Products/CMFPlone/tests/testWorkflowTool.py M Products/CMFPlone/tests/test_doctests.py M Products/CMFPlone/tests/test_functional.py M Products/CMFPlone/tests/test_mails.py M Products/CMFPlone/tests/test_robot.py M Products/CMFPlone/tests/test_utils.py M Products/CMFPlone/tests/test_z3c_form_widgets.py M Products/CMFPlone/tests/utils.py M Products/CMFPlone/traversal.py M Products/CMFPlone/unicodeconflictresolver.py M Products/CMFPlone/workflow.py M Products/__init__.py diff --git a/Products/CMFPlone/ActionsTool.py b/Products/CMFPlone/ActionsTool.py index 7d96671..11afd75 100644 --- a/Products/CMFPlone/ActionsTool.py +++ b/Products/CMFPlone/ActionsTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass from Products.CMFCore.ActionInformation import ActionInfo diff --git a/Products/CMFPlone/CatalogTool.py b/Products/CMFPlone/CatalogTool.py index f66ca10..dfc4453 100644 --- a/Products/CMFPlone/CatalogTool.py +++ b/Products/CMFPlone/CatalogTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import logging import re import time diff --git a/Products/CMFPlone/DublinCore.py b/Products/CMFPlone/DublinCore.py index 45b2c58..77f2401 100644 --- a/Products/CMFPlone/DublinCore.py +++ b/Products/CMFPlone/DublinCore.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2001 Zope Foundation and Contributors. diff --git a/Products/CMFPlone/MigrationTool.py b/Products/CMFPlone/MigrationTool.py index 1294162..b9cf3ea 100644 --- a/Products/CMFPlone/MigrationTool.py +++ b/Products/CMFPlone/MigrationTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import logging import sys from StringIO import StringIO diff --git a/Products/CMFPlone/PloneBaseTool.py b/Products/CMFPlone/PloneBaseTool.py index 7a3c35b..63ca0f6 100644 --- a/Products/CMFPlone/PloneBaseTool.py +++ b/Products/CMFPlone/PloneBaseTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from App.class_init import InitializeClass from AccessControl import ClassSecurityInfo from Products.CMFPlone.interfaces import IPloneBaseTool diff --git a/Products/CMFPlone/PloneBatch.py b/Products/CMFPlone/PloneBatch.py index bc05dfa..2541454 100644 --- a/Products/CMFPlone/PloneBatch.py +++ b/Products/CMFPlone/PloneBatch.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from ZTUtils import make_query from plone.batching.batch import QuantumBatch diff --git a/Products/CMFPlone/PloneControlPanel.py b/Products/CMFPlone/PloneControlPanel.py index 5a1465a..9a29951 100644 --- a/Products/CMFPlone/PloneControlPanel.py +++ b/Products/CMFPlone/PloneControlPanel.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass from App.special_dtml import DTMLFile diff --git a/Products/CMFPlone/PloneFolder.py b/Products/CMFPlone/PloneFolder.py index b275b56..c3997b1 100644 --- a/Products/CMFPlone/PloneFolder.py +++ b/Products/CMFPlone/PloneFolder.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.memoize import view from App.class_init import InitializeClass from zExceptions import NotFound diff --git a/Products/CMFPlone/PropertiesTool.py b/Products/CMFPlone/PropertiesTool.py index 8763fb6..dc11642 100644 --- a/Products/CMFPlone/PropertiesTool.py +++ b/Products/CMFPlone/PropertiesTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_parent, aq_inner from Products.CMFCore.permissions import ManagePortal from Products.CMFCore.utils import UniqueObject diff --git a/Products/CMFPlone/QuickInstallerTool.py b/Products/CMFPlone/QuickInstallerTool.py index 700364c..fcf69b1 100644 --- a/Products/CMFPlone/QuickInstallerTool.py +++ b/Products/CMFPlone/QuickInstallerTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass from Products.CMFCore.permissions import ManagePortal diff --git a/Products/CMFPlone/RegistrationTool.py b/Products/CMFPlone/RegistrationTool.py index d1babb7..e4ebd3c 100644 --- a/Products/CMFPlone/RegistrationTool.py +++ b/Products/CMFPlone/RegistrationTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo, Unauthorized from AccessControl import getSecurityManager from AccessControl.requestmethod import postonly diff --git a/Products/CMFPlone/SkinsTool.py b/Products/CMFPlone/SkinsTool.py index 6cb1cdd..6fd5f20 100644 --- a/Products/CMFPlone/SkinsTool.py +++ b/Products/CMFPlone/SkinsTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass from Products.CMFCore.permissions import ManagePortal diff --git a/Products/CMFPlone/TranslationServiceTool.py b/Products/CMFPlone/TranslationServiceTool.py index 42ca921..28285d9 100644 --- a/Products/CMFPlone/TranslationServiceTool.py +++ b/Products/CMFPlone/TranslationServiceTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ This tool requires a translation service which supports the translate method and the default parameter. diff --git a/Products/CMFPlone/TypesTool.py b/Products/CMFPlone/TypesTool.py index 88bdef2..f92742a 100644 --- a/Products/CMFPlone/TypesTool.py +++ b/Products/CMFPlone/TypesTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass diff --git a/Products/CMFPlone/URLTool.py b/Products/CMFPlone/URLTool.py index 17c7cd3..6c2db81 100644 --- a/Products/CMFPlone/URLTool.py +++ b/Products/CMFPlone/URLTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass from plone.registry.interfaces import IRegistry diff --git a/Products/CMFPlone/UnicodeSplitter/splitter.py b/Products/CMFPlone/UnicodeSplitter/splitter.py index fceae06..67bcd36 100644 --- a/Products/CMFPlone/UnicodeSplitter/splitter.py +++ b/Products/CMFPlone/UnicodeSplitter/splitter.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- #!/usr/bin/env python # -*- coding: utf-8 -*- """ diff --git a/Products/CMFPlone/WorkflowTool.py b/Products/CMFPlone/WorkflowTool.py index de911f2..c9a026d 100644 --- a/Products/CMFPlone/WorkflowTool.py +++ b/Products/CMFPlone/WorkflowTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.component import getMultiAdapter from Products.CMFCore.utils import getToolByName diff --git a/Products/CMFPlone/__init__.py b/Products/CMFPlone/__init__.py index 9ea177f..ee3fb40 100644 --- a/Products/CMFPlone/__init__.py +++ b/Products/CMFPlone/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from App.ImageFile import ImageFile import os import sys diff --git a/Products/CMFPlone/browser/__init__.py b/Products/CMFPlone/browser/__init__.py index 5a8ff9e..2bcec87 100644 --- a/Products/CMFPlone/browser/__init__.py +++ b/Products/CMFPlone/browser/__init__.py @@ -1 +1,2 @@ +# -*- coding: utf-8 -*- # browser package diff --git a/Products/CMFPlone/browser/admin.py b/Products/CMFPlone/browser/admin.py index 851d516..bfc324a 100644 --- a/Products/CMFPlone/browser/admin.py +++ b/Products/CMFPlone/browser/admin.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import getSecurityManager from AccessControl.Permissions import view as View from OFS.interfaces import IApplication diff --git a/Products/CMFPlone/browser/atd.py b/Products/CMFPlone/browser/atd.py index e54c232..bb23e93 100644 --- a/Products/CMFPlone/browser/atd.py +++ b/Products/CMFPlone/browser/atd.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.utils import getToolByName from zope.component import getUtility from plone.registry.interfaces import IRegistry diff --git a/Products/CMFPlone/browser/author.py b/Products/CMFPlone/browser/author.py index 0977a19..54afe5d 100644 --- a/Products/CMFPlone/browser/author.py +++ b/Products/CMFPlone/browser/author.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import Unauthorized from Products.CMFCore.interfaces import IPropertiesTool diff --git a/Products/CMFPlone/browser/global_statusmessage.py b/Products/CMFPlone/browser/global_statusmessage.py index 552bc9e..915a399 100644 --- a/Products/CMFPlone/browser/global_statusmessage.py +++ b/Products/CMFPlone/browser/global_statusmessage.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import implementer from Products.Five import BrowserView diff --git a/Products/CMFPlone/browser/interfaces.py b/Products/CMFPlone/browser/interfaces.py index 35f82a0..a59027a 100644 --- a/Products/CMFPlone/browser/interfaces.py +++ b/Products/CMFPlone/browser/interfaces.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope import schema from zope.interface import Interface diff --git a/Products/CMFPlone/browser/main_template.py b/Products/CMFPlone/browser/main_template.py index b29dcdb..8618429 100644 --- a/Products/CMFPlone/browser/main_template.py +++ b/Products/CMFPlone/browser/main_template.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import implementer from Products.Five import BrowserView diff --git a/Products/CMFPlone/browser/sendto.py b/Products/CMFPlone/browser/sendto.py index 600b528..38acca2 100644 --- a/Products/CMFPlone/browser/sendto.py +++ b/Products/CMFPlone/browser/sendto.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone import PloneMessageFactory as _ from Products.CMFPlone.interfaces.controlpanel import IMailSchema from Products.CMFPlone.utils import pretty_title_or_id diff --git a/Products/CMFPlone/browser/sitelogo.py b/Products/CMFPlone/browser/sitelogo.py index 838eecb..2c003b4 100644 --- a/Products/CMFPlone/browser/sitelogo.py +++ b/Products/CMFPlone/browser/sitelogo.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import ISiteSchema from plone.formwidget.namedfile.converter import b64decode_file from plone.namedfile.browser import Download diff --git a/Products/CMFPlone/browser/sitemap.py b/Products/CMFPlone/browser/sitemap.py index 08b7071..3322ddc 100644 --- a/Products/CMFPlone/browser/sitemap.py +++ b/Products/CMFPlone/browser/sitemap.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_inner from zope.component import getMultiAdapter from zope.interface import implementer diff --git a/Products/CMFPlone/browser/syndication/adapters.py b/Products/CMFPlone/browser/syndication/adapters.py index 2f2140e..619bf13 100644 --- a/Products/CMFPlone/browser/syndication/adapters.py +++ b/Products/CMFPlone/browser/syndication/adapters.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.component.hooks import getSite from zope.component import adapts from zope.interface import implementer diff --git a/Products/CMFPlone/browser/syndication/settings.py b/Products/CMFPlone/browser/syndication/settings.py index ecf5b8d..a7a639e 100644 --- a/Products/CMFPlone/browser/syndication/settings.py +++ b/Products/CMFPlone/browser/syndication/settings.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.component import adapts from zope.interface import implementer from Products.CMFPlone.interfaces.syndication import IFeedSettings diff --git a/Products/CMFPlone/browser/syndication/tool.py b/Products/CMFPlone/browser/syndication/tool.py index 20fd4e7..a9dfe69 100644 --- a/Products/CMFPlone/browser/syndication/tool.py +++ b/Products/CMFPlone/browser/syndication/tool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_parent from AccessControl import Unauthorized diff --git a/Products/CMFPlone/browser/syndication/utils.py b/Products/CMFPlone/browser/syndication/utils.py index 859703e..27b3e6f 100644 --- a/Products/CMFPlone/browser/syndication/utils.py +++ b/Products/CMFPlone/browser/syndication/utils.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zExceptions import NotFound from Products.Five import BrowserView diff --git a/Products/CMFPlone/browser/syndication/views.py b/Products/CMFPlone/browser/syndication/views.py index 311e116..806e47b 100644 --- a/Products/CMFPlone/browser/syndication/views.py +++ b/Products/CMFPlone/browser/syndication/views.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from DateTime import DateTime from uuid import uuid3 from uuid import NAMESPACE_OID diff --git a/Products/CMFPlone/controlpanel/bbb/filter.py b/Products/CMFPlone/controlpanel/bbb/filter.py index e774b43..a8ea0b1 100644 --- a/Products/CMFPlone/controlpanel/bbb/filter.py +++ b/Products/CMFPlone/controlpanel/bbb/filter.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IFilterSchema from Products.CMFPlone.interfaces import IPloneSiteRoot from plone.registry.interfaces import IRegistry diff --git a/Products/CMFPlone/controlpanel/bbb/mail.py b/Products/CMFPlone/controlpanel/bbb/mail.py index 000700e..c9abf7e 100644 --- a/Products/CMFPlone/controlpanel/bbb/mail.py +++ b/Products/CMFPlone/controlpanel/bbb/mail.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IPloneSiteRoot from Products.CMFPlone.interfaces.controlpanel import IMailSchema from Products.CMFPlone.utils import safe_hasattr diff --git a/Products/CMFPlone/controlpanel/bbb/markup.py b/Products/CMFPlone/controlpanel/bbb/markup.py index 520be21..9bf578b 100644 --- a/Products/CMFPlone/controlpanel/bbb/markup.py +++ b/Products/CMFPlone/controlpanel/bbb/markup.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IMarkupSchema from Products.CMFPlone.interfaces.siteroot import IPloneSiteRoot from plone.registry.interfaces import IRegistry diff --git a/Products/CMFPlone/controlpanel/bbb/usergroups.py b/Products/CMFPlone/controlpanel/bbb/usergroups.py index 84ac3e3..7ee9659 100644 --- a/Products/CMFPlone/controlpanel/bbb/usergroups.py +++ b/Products/CMFPlone/controlpanel/bbb/usergroups.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.component import adapts from zope.component import getUtility from zope.interface import implementer diff --git a/Products/CMFPlone/controlpanel/browser/actions.py b/Products/CMFPlone/controlpanel/browser/actions.py index 9b8e2ed..636489b 100644 --- a/Products/CMFPlone/controlpanel/browser/actions.py +++ b/Products/CMFPlone/controlpanel/browser/actions.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.autoform.form import AutoExtensibleForm from Products.CMFCore.ActionInformation import Action from Products.CMFCore.interfaces import IAction, IActionCategory diff --git a/Products/CMFPlone/controlpanel/browser/imaging.py b/Products/CMFPlone/controlpanel/browser/imaging.py index ea7c52e..368e5df 100644 --- a/Products/CMFPlone/controlpanel/browser/imaging.py +++ b/Products/CMFPlone/controlpanel/browser/imaging.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone import PloneMessageFactory as _ from Products.CMFPlone.interfaces.controlpanel import IImagingSchema from logging import getLogger diff --git a/Products/CMFPlone/controlpanel/browser/mail.py b/Products/CMFPlone/controlpanel/browser/mail.py index acfad24..5604795 100644 --- a/Products/CMFPlone/controlpanel/browser/mail.py +++ b/Products/CMFPlone/controlpanel/browser/mail.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.utils import getToolByName from Products.CMFPlone import PloneMessageFactory as _ from Products.CMFPlone.interfaces.controlpanel import IMailSchema diff --git a/Products/CMFPlone/controlpanel/browser/markup.py b/Products/CMFPlone/controlpanel/browser/markup.py index 9de15ad..78be678 100644 --- a/Products/CMFPlone/controlpanel/browser/markup.py +++ b/Products/CMFPlone/controlpanel/browser/markup.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone import PloneMessageFactory as _ from Products.CMFPlone.interfaces import IMarkupSchema from plone.app.registry.browser import controlpanel diff --git a/Products/CMFPlone/controlpanel/browser/overview.py b/Products/CMFPlone/controlpanel/browser/overview.py index 924ef79..9bf6f68 100644 --- a/Products/CMFPlone/controlpanel/browser/overview.py +++ b/Products/CMFPlone/controlpanel/browser/overview.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from AccessControl import getSecurityManager from Acquisition import aq_inner from Globals import DevelopmentMode diff --git a/Products/CMFPlone/controlpanel/browser/quickinstaller.py b/Products/CMFPlone/controlpanel/browser/quickinstaller.py index 1806bbb..2674a6a 100644 --- a/Products/CMFPlone/controlpanel/browser/quickinstaller.py +++ b/Products/CMFPlone/controlpanel/browser/quickinstaller.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.utils import getToolByName from Products.CMFPlone import PloneMessageFactory as _ from Products.CMFPlone.interfaces import INonInstallable diff --git a/Products/CMFPlone/controlpanel/browser/security.py b/Products/CMFPlone/controlpanel/browser/security.py index 44b684d..8804f09 100644 --- a/Products/CMFPlone/controlpanel/browser/security.py +++ b/Products/CMFPlone/controlpanel/browser/security.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_inner from Products.CMFCore.utils import getToolByName from Products.CMFPlone import PloneMessageFactory as _ diff --git a/Products/CMFPlone/controlpanel/browser/syndication.py b/Products/CMFPlone/controlpanel/browser/syndication.py index 150c939..122c12f 100644 --- a/Products/CMFPlone/controlpanel/browser/syndication.py +++ b/Products/CMFPlone/controlpanel/browser/syndication.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.utils import getToolByName from zope.i18nmessageid import MessageFactory from Products.CMFPlone.interfaces.syndication import ISiteSyndicationSettings diff --git a/Products/CMFPlone/controlpanel/browser/tinymce.py b/Products/CMFPlone/controlpanel/browser/tinymce.py index 106b82b..0899d80 100644 --- a/Products/CMFPlone/controlpanel/browser/tinymce.py +++ b/Products/CMFPlone/controlpanel/browser/tinymce.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone import PloneMessageFactory as _ from Products.CMFPlone.interfaces import ITinyMCELayoutSchema from Products.CMFPlone.interfaces import ITinyMCESpellCheckerSchema diff --git a/Products/CMFPlone/controlpanel/browser/usergroups.py b/Products/CMFPlone/controlpanel/browser/usergroups.py index 800819a..0a92a0e 100644 --- a/Products/CMFPlone/controlpanel/browser/usergroups.py +++ b/Products/CMFPlone/controlpanel/browser/usergroups.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.permissions import ManagePortal from ZTUtils import make_query from itertools import chain diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py b/Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py index ade6c25..5733b45 100644 --- a/Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py +++ b/Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_inner from Products.CMFPlone.controlpanel.browser.usergroups import \ UsersGroupsControlPanelView diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py b/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py index 74dbee5..33578d5 100644 --- a/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py +++ b/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone import PloneMessageFactory as _ from zExceptions import Forbidden from Products.CMFCore.utils import getToolByName diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_groupsoverview.py b/Products/CMFPlone/controlpanel/browser/usergroups_groupsoverview.py index 4a6761f..9b96224 100644 --- a/Products/CMFPlone/controlpanel/browser/usergroups_groupsoverview.py +++ b/Products/CMFPlone/controlpanel/browser/usergroups_groupsoverview.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from itertools import chain from Acquisition import aq_inner from Products.CMFPlone.controlpanel.browser.usergroups import \ diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py b/Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py index 16d18fb..d0818d7 100644 --- a/Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py +++ b/Products/CMFPlone/controlpanel/browser/usergroups_usermembership.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone import PloneMessageFactory as _ from zExceptions import Forbidden from Products.CMFCore.utils import getToolByName diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_usersoverview.py b/Products/CMFPlone/controlpanel/browser/usergroups_usersoverview.py index bd3f4c4..d83edfd 100644 --- a/Products/CMFPlone/controlpanel/browser/usergroups_usersoverview.py +++ b/Products/CMFPlone/controlpanel/browser/usergroups_usersoverview.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import logging from Acquisition import aq_inner from zExceptions import Forbidden diff --git a/Products/CMFPlone/controlpanel/events.py b/Products/CMFPlone/controlpanel/events.py index b780c18..5170529 100644 --- a/Products/CMFPlone/controlpanel/events.py +++ b/Products/CMFPlone/controlpanel/events.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.ActionInformation import Action from Products.CMFCore.utils import getToolByName from Products.CMFPlone import PloneMessageFactory as _ diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py index cd79a08..3e79150 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IEditingSchema from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING from plone.app.testing import TEST_USER_ID diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py index b8c7f22..9d1c3b4 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IMaintenanceSchema from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING from plone.app.testing import TEST_USER_ID diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_security_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_security_adapter.py index c2cb8e9..3cd96c6 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_security_adapter.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_security_adapter.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.testing import \ PRODUCTS_CMFPLONE_INTEGRATION_TESTING from Products.CMFPlone.interfaces import ISecuritySchema diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_usergroups_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_usergroups_adapter.py index a8e0612..aca1743 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_usergroups_adapter.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_usergroups_adapter.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.app.testing import setRoles from Products.CMFPlone.interfaces import IUserGroupsSettingsSchema from zope.component import getAdapter diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py index 14b7c18..faec6da 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IDateAndTimeSchema from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING from plone.app.testing import TEST_USER_ID diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_events.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_events.py index b5ff729..da1d67b 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_events.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_events.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.testing import \ PRODUCTS_CMFPLONE_INTEGRATION_TESTING from Products.CMFCore.utils import getToolByName diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py index aecf6da..2a10f99 100644 --- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py +++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.app.testing import PLONE_INTEGRATION_TESTING from plone.app.testing import TEST_USER_ID from plone.app.testing import setRoles diff --git a/Products/CMFPlone/controlpanel/utils.py b/Products/CMFPlone/controlpanel/utils.py index e6d9d04..c068d52 100644 --- a/Products/CMFPlone/controlpanel/utils.py +++ b/Products/CMFPlone/controlpanel/utils.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFCore.utils import getToolByName import logging diff --git a/Products/CMFPlone/controlpanel/widgets.py b/Products/CMFPlone/controlpanel/widgets.py index 4808edd..9619c81 100644 --- a/Products/CMFPlone/controlpanel/widgets.py +++ b/Products/CMFPlone/controlpanel/widgets.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from z3c.form.browser.checkbox import CheckBoxWidget from z3c.form.interfaces import NO_VALUE from z3c.form.widget import FieldWidget diff --git a/Products/CMFPlone/events.py b/Products/CMFPlone/events.py index edcb2bb..0a8546d2 100644 --- a/Products/CMFPlone/events.py +++ b/Products/CMFPlone/events.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import implementer from zope.component import getMultiAdapter from zope.component.interfaces import ObjectEvent diff --git a/Products/CMFPlone/exportimport/__init__.py b/Products/CMFPlone/exportimport/__init__.py index c9d620a..ee30c6a 100644 --- a/Products/CMFPlone/exportimport/__init__.py +++ b/Products/CMFPlone/exportimport/__init__.py @@ -1 +1,2 @@ +# -*- coding: utf-8 -*- """exportimport package""" diff --git a/Products/CMFPlone/exportimport/controlpanel.py b/Products/CMFPlone/exportimport/controlpanel.py index ecf8107..ce4118f 100644 --- a/Products/CMFPlone/exportimport/controlpanel.py +++ b/Products/CMFPlone/exportimport/controlpanel.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2005 Zope Corporation and Contributors. All Rights Reserved. diff --git a/Products/CMFPlone/exportimport/memberdata_properties.py b/Products/CMFPlone/exportimport/memberdata_properties.py index 2858346..ee665d6 100644 --- a/Products/CMFPlone/exportimport/memberdata_properties.py +++ b/Products/CMFPlone/exportimport/memberdata_properties.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """MemberData tool properties setup handlers. $Id:$ diff --git a/Products/CMFPlone/exportimport/propertiestool.py b/Products/CMFPlone/exportimport/propertiestool.py index 7d819ed..c22c452 100644 --- a/Products/CMFPlone/exportimport/propertiestool.py +++ b/Products/CMFPlone/exportimport/propertiestool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Plone Properties tool setup handlers. $Id:$ diff --git a/Products/CMFPlone/exportimport/tests/__init__.py b/Products/CMFPlone/exportimport/tests/__init__.py index 983bbca..aebf08c 100644 --- a/Products/CMFPlone/exportimport/tests/__init__.py +++ b/Products/CMFPlone/exportimport/tests/__init__.py @@ -1 +1,2 @@ +# -*- coding: utf-8 -*- """exportimport tests package""" diff --git a/Products/CMFPlone/exportimport/tests/base.py b/Products/CMFPlone/exportimport/tests/base.py index fdbb490..0ae2fad 100644 --- a/Products/CMFPlone/exportimport/tests/base.py +++ b/Products/CMFPlone/exportimport/tests/base.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.testing.zca import UNIT_TESTING from Products.GenericSetup.testing import BodyAdapterTestCase from Products.GenericSetup.testing import NodeAdapterTestCase diff --git a/Products/CMFPlone/exportimport/tests/testControlPanel.py b/Products/CMFPlone/exportimport/tests/testControlPanel.py index f72abac..773ab97 100644 --- a/Products/CMFPlone/exportimport/tests/testControlPanel.py +++ b/Products/CMFPlone/exportimport/tests/testControlPanel.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from OFS.Folder import Folder from Products.CMFPlone.exportimport.tests.base import BodyAdapterTestCase from Products.CMFPlone.interfaces import IControlPanel diff --git a/Products/CMFPlone/exportimport/tests/testPropertiesTool.py b/Products/CMFPlone/exportimport/tests/testPropertiesTool.py index 136b0ae..7d76691 100644 --- a/Products/CMFPlone/exportimport/tests/testPropertiesTool.py +++ b/Products/CMFPlone/exportimport/tests/testPropertiesTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.exportimport.tests.base import BodyAdapterTestCase from Products.CMFPlone.PropertiesTool import PropertiesTool from Products.CMFPlone.PropertiesTool import SimpleItemWithProperties diff --git a/Products/CMFPlone/factory.py b/Products/CMFPlone/factory.py index 5dff16c..af01669 100644 --- a/Products/CMFPlone/factory.py +++ b/Products/CMFPlone/factory.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.Portal import PloneSite from Products.CMFPlone.events import SiteManagerCreatedEvent from Products.CMFPlone.interfaces import INonInstallable diff --git a/Products/CMFPlone/i18nl10n.py b/Products/CMFPlone/i18nl10n.py index c59a6f3..292adf5 100644 --- a/Products/CMFPlone/i18nl10n.py +++ b/Products/CMFPlone/i18nl10n.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ Collection of i18n and l10n utility methods. """ diff --git a/Products/CMFPlone/interfaces/__init__.py b/Products/CMFPlone/interfaces/__init__.py index ededdc8..8e5025c 100644 --- a/Products/CMFPlone/interfaces/__init__.py +++ b/Products/CMFPlone/interfaces/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # flake8: noqa from basetool import IPloneBaseTool from basetool import IPloneCatalogTool diff --git a/Products/CMFPlone/interfaces/atd.py b/Products/CMFPlone/interfaces/atd.py index 50ea205..883f99a 100644 --- a/Products/CMFPlone/interfaces/atd.py +++ b/Products/CMFPlone/interfaces/atd.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/basetool.py b/Products/CMFPlone/interfaces/basetool.py index cff9d2c..adc8cd8 100644 --- a/Products/CMFPlone/interfaces/basetool.py +++ b/Products/CMFPlone/interfaces/basetool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/breadcrumbs.py b/Products/CMFPlone/interfaces/breadcrumbs.py index 005bca1..d004ae8 100644 --- a/Products/CMFPlone/interfaces/breadcrumbs.py +++ b/Products/CMFPlone/interfaces/breadcrumbs.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/constrains.py b/Products/CMFPlone/interfaces/constrains.py index 3686052..2c4b2cd 100644 --- a/Products/CMFPlone/interfaces/constrains.py +++ b/Products/CMFPlone/interfaces/constrains.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/events.py b/Products/CMFPlone/interfaces/events.py index 081b4ae..c68a704 100644 --- a/Products/CMFPlone/interfaces/events.py +++ b/Products/CMFPlone/interfaces/events.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.component.interfaces import IObjectEvent from zope.interface import Attribute from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/installable.py b/Products/CMFPlone/interfaces/installable.py index e9994df..f0e6320 100644 --- a/Products/CMFPlone/interfaces/installable.py +++ b/Products/CMFPlone/interfaces/installable.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/interface.py b/Products/CMFPlone/interfaces/interface.py index 74e6c72..905df9f 100644 --- a/Products/CMFPlone/interfaces/interface.py +++ b/Products/CMFPlone/interfaces/interface.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Attribute from basetool import IPloneBaseTool diff --git a/Products/CMFPlone/interfaces/language.py b/Products/CMFPlone/interfaces/language.py index e3838c3..73fa1e9 100644 --- a/Products/CMFPlone/interfaces/language.py +++ b/Products/CMFPlone/interfaces/language.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/migration.py b/Products/CMFPlone/interfaces/migration.py index 2ae6a85..e956544 100644 --- a/Products/CMFPlone/interfaces/migration.py +++ b/Products/CMFPlone/interfaces/migration.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/patterns.py b/Products/CMFPlone/interfaces/patterns.py index 9a7a0ad..89e7255 100644 --- a/Products/CMFPlone/interfaces/patterns.py +++ b/Products/CMFPlone/interfaces/patterns.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/properties.py b/Products/CMFPlone/interfaces/properties.py index 560c80b..1c137a3 100644 --- a/Products/CMFPlone/interfaces/properties.py +++ b/Products/CMFPlone/interfaces/properties.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface from zope.interface import Attribute diff --git a/Products/CMFPlone/interfaces/resources.py b/Products/CMFPlone/interfaces/resources.py index 083aec6..7ffe2db 100644 --- a/Products/CMFPlone/interfaces/resources.py +++ b/Products/CMFPlone/interfaces/resources.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import zope.interface import zope.component from zope import schema diff --git a/Products/CMFPlone/interfaces/siteroot.py b/Products/CMFPlone/interfaces/siteroot.py index 83c1198..1118b40 100644 --- a/Products/CMFPlone/interfaces/siteroot.py +++ b/Products/CMFPlone/interfaces/siteroot.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface from Products.CMFCore.interfaces import ISiteRoot from plone.app.layout.navigation.interfaces import INavigationRoot diff --git a/Products/CMFPlone/interfaces/structure.py b/Products/CMFPlone/interfaces/structure.py index ea43a11..95e36f2 100644 --- a/Products/CMFPlone/interfaces/structure.py +++ b/Products/CMFPlone/interfaces/structure.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/syndication.py b/Products/CMFPlone/interfaces/syndication.py index 28c9d29..8892f54 100644 --- a/Products/CMFPlone/interfaces/syndication.py +++ b/Products/CMFPlone/interfaces/syndication.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface from zope import schema from Products.CMFPlone import PloneMessageFactory as _ diff --git a/Products/CMFPlone/interfaces/translationservice.py b/Products/CMFPlone/interfaces/translationservice.py index b908e28..83c2086 100644 --- a/Products/CMFPlone/interfaces/translationservice.py +++ b/Products/CMFPlone/interfaces/translationservice.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/interfaces/workflow.py b/Products/CMFPlone/interfaces/workflow.py index e056c93..fe37444 100644 --- a/Products/CMFPlone/interfaces/workflow.py +++ b/Products/CMFPlone/interfaces/workflow.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface.common.sequence import IReadSequence diff --git a/Products/CMFPlone/log.py b/Products/CMFPlone/log.py index ba2e635..5d90506 100644 --- a/Products/CMFPlone/log.py +++ b/Products/CMFPlone/log.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ This module resolves an import order dependency. Don't import from here, import from utils. diff --git a/Products/CMFPlone/patches/__init__.py b/Products/CMFPlone/patches/__init__.py index f6b5981..b720b41 100644 --- a/Products/CMFPlone/patches/__init__.py +++ b/Products/CMFPlone/patches/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import addzmiplonesite # Add an explicit link to add a new Plone # site to the ZMI for faster access diff --git a/Products/CMFPlone/patches/addzmiplonesite.py b/Products/CMFPlone/patches/addzmiplonesite.py index 8bddaea..73659ee 100644 --- a/Products/CMFPlone/patches/addzmiplonesite.py +++ b/Products/CMFPlone/patches/addzmiplonesite.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from OFS.ObjectManager import ObjectManager ADD_PLONE_SITE_HTML = ''' diff --git a/Products/CMFPlone/patches/addzmisecuritywarning.py b/Products/CMFPlone/patches/addzmisecuritywarning.py index 373de8a..13f9f8d 100644 --- a/Products/CMFPlone/patches/addzmisecuritywarning.py +++ b/Products/CMFPlone/patches/addzmisecuritywarning.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from OFS.role import RoleManager ADD_SECURITY_WARNING = ''' diff --git a/Products/CMFPlone/patches/csrf.py b/Products/CMFPlone/patches/csrf.py index cbd234f..ca64c03 100644 --- a/Products/CMFPlone/patches/csrf.py +++ b/Products/CMFPlone/patches/csrf.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.protect import protect, CheckAuthenticator # apply csrf-protection decorator to the given callable diff --git a/Products/CMFPlone/patches/dateIndexPatch.py b/Products/CMFPlone/patches/dateIndexPatch.py index fe8c9d6..aa54163 100644 --- a/Products/CMFPlone/patches/dateIndexPatch.py +++ b/Products/CMFPlone/patches/dateIndexPatch.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Avoid OverflowErrors in Date*Indexes from Products.PluginIndexes.DateIndex.DateIndex import DateIndex diff --git a/Products/CMFPlone/patches/iso8601.py b/Products/CMFPlone/patches/iso8601.py index 785b255..5aa5a39 100644 --- a/Products/CMFPlone/patches/iso8601.py +++ b/Products/CMFPlone/patches/iso8601.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # from warnings import warn from DateTime import DateTime diff --git a/Products/CMFPlone/patches/publishing.py b/Products/CMFPlone/patches/publishing.py index baec076..61085f7 100644 --- a/Products/CMFPlone/patches/publishing.py +++ b/Products/CMFPlone/patches/publishing.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # From Products.PloneHotfix20160419 # Plus extras for properties. from OFS.PropertyManager import PropertyManager diff --git a/Products/CMFPlone/patches/securemailhost.py b/Products/CMFPlone/patches/securemailhost.py index 35baf08..2db5213 100644 --- a/Products/CMFPlone/patches/securemailhost.py +++ b/Products/CMFPlone/patches/securemailhost.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """This module provides backwards compatiblity for products using the SecureMailHost API. It should be removed entirely for Plone 5.0.""" import sys diff --git a/Products/CMFPlone/patches/security.py b/Products/CMFPlone/patches/security.py index 622f789..8985591 100644 --- a/Products/CMFPlone/patches/security.py +++ b/Products/CMFPlone/patches/security.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # 1. make sure allow_module can't be called from restricted code import AccessControl AccessControl.allow_module.__roles__ = () diff --git a/Products/CMFPlone/patches/sendmail.py b/Products/CMFPlone/patches/sendmail.py index fbb0161..04e3c38 100644 --- a/Products/CMFPlone/patches/sendmail.py +++ b/Products/CMFPlone/patches/sendmail.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.registry.interfaces import IRegistry from Products.CMFPlone.interfaces import IMailSchema from transaction._transaction import Status diff --git a/Products/CMFPlone/patches/speed.py b/Products/CMFPlone/patches/speed.py index ad73b01..81c5c0a 100644 --- a/Products/CMFPlone/patches/speed.py +++ b/Products/CMFPlone/patches/speed.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.memoize import forever from os import environ diff --git a/Products/CMFPlone/patches/templatecookcheck.py b/Products/CMFPlone/patches/templatecookcheck.py index 9be05f1..574f5a0 100644 --- a/Products/CMFPlone/patches/templatecookcheck.py +++ b/Products/CMFPlone/patches/templatecookcheck.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # The implementation in zope.pagetemplate always checks for # updated files unless python is run with -O, but we want to # base this on the Zope2 debug mode flag. diff --git a/Products/CMFPlone/patches/unicodeFallbackPatch.py b/Products/CMFPlone/patches/unicodeFallbackPatch.py index 520fbd6..5600369 100644 --- a/Products/CMFPlone/patches/unicodeFallbackPatch.py +++ b/Products/CMFPlone/patches/unicodeFallbackPatch.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # The following hacks make sure that Unicode and utf-8 encoded strings can be # mixed in all page templates and tal snippets. diff --git a/Products/CMFPlone/patches/unicodehacks.py b/Products/CMFPlone/patches/unicodehacks.py index 99a6893..8e9414e 100644 --- a/Products/CMFPlone/patches/unicodehacks.py +++ b/Products/CMFPlone/patches/unicodehacks.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- def _unicode_replace(structure): if isinstance(structure, str): text = structure.decode('utf-8', 'replace') diff --git a/Products/CMFPlone/patches/z3c_form.py b/Products/CMFPlone/patches/z3c_form.py index 1b61598..0b10250 100644 --- a/Products/CMFPlone/patches/z3c_form.py +++ b/Products/CMFPlone/patches/z3c_form.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # This is from Products.PloneHotfix20160830. from urlparse import urlparse from z3c.form import widget diff --git a/Products/CMFPlone/permissions.py b/Products/CMFPlone/permissions.py index 07370e2..04ffbcd 100644 --- a/Products/CMFPlone/permissions.py +++ b/Products/CMFPlone/permissions.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ CMFPlone product permissions """ from AccessControl import ModuleSecurityInfo diff --git a/Products/CMFPlone/resources/__init__.py b/Products/CMFPlone/resources/__init__.py index 3cb9aa2..42cdec2 100644 --- a/Products/CMFPlone/resources/__init__.py +++ b/Products/CMFPlone/resources/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import os diff --git a/Products/CMFPlone/resources/browser/combine.py b/Products/CMFPlone/resources/browser/combine.py index 98d4adf..d7c4ecd 100644 --- a/Products/CMFPlone/resources/browser/combine.py +++ b/Products/CMFPlone/resources/browser/combine.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_base from datetime import datetime from plone.registry.interfaces import IRegistry diff --git a/Products/CMFPlone/resources/browser/configjs.py b/Products/CMFPlone/resources/browser/configjs.py index 4fa690c..4af09b8 100644 --- a/Products/CMFPlone/resources/browser/configjs.py +++ b/Products/CMFPlone/resources/browser/configjs.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import json import re diff --git a/Products/CMFPlone/resources/browser/cook.py b/Products/CMFPlone/resources/browser/cook.py index 3aa87de..4fdf61d 100644 --- a/Products/CMFPlone/resources/browser/cook.py +++ b/Products/CMFPlone/resources/browser/cook.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import logging from Products.CMFPlone.interfaces.resources import IResourceRegistry diff --git a/Products/CMFPlone/resources/browser/interfaces.py b/Products/CMFPlone/resources/browser/interfaces.py index b10009c..97717f9 100644 --- a/Products/CMFPlone/resources/browser/interfaces.py +++ b/Products/CMFPlone/resources/browser/interfaces.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Interface diff --git a/Products/CMFPlone/resources/browser/mixins.py b/Products/CMFPlone/resources/browser/mixins.py index 8a6ff36..69fce1a 100644 --- a/Products/CMFPlone/resources/browser/mixins.py +++ b/Products/CMFPlone/resources/browser/mixins.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.interfaces import IResourceRegistry from Products.Five.browser import BrowserView from plone.registry.interfaces import IRegistry diff --git a/Products/CMFPlone/resources/browser/resource.py b/Products/CMFPlone/resources/browser/resource.py index d7734af..9b2b55d 100644 --- a/Products/CMFPlone/resources/browser/resource.py +++ b/Products/CMFPlone/resources/browser/resource.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Acquisition import aq_inner, aq_base, aq_parent from Products.CMFCore.Expression import Expression from Products.CMFCore.Expression import createExprContext diff --git a/Products/CMFPlone/resources/browser/scripts.py b/Products/CMFPlone/resources/browser/scripts.py index 52ab2cb..36763c0 100644 --- a/Products/CMFPlone/resources/browser/scripts.py +++ b/Products/CMFPlone/resources/browser/scripts.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from urlparse import urlparse from urllib import quote diff --git a/Products/CMFPlone/resources/browser/styles.py b/Products/CMFPlone/resources/browser/styles.py index 663f7a9..7561e91 100644 --- a/Products/CMFPlone/resources/browser/styles.py +++ b/Products/CMFPlone/resources/browser/styles.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from urlparse import urlparse from urllib import quote diff --git a/Products/CMFPlone/resources/exportimport/bundles.py b/Products/CMFPlone/resources/exportimport/bundles.py index d5f3df1..56ea8aa 100644 --- a/Products/CMFPlone/resources/exportimport/bundles.py +++ b/Products/CMFPlone/resources/exportimport/bundles.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from plone.registry.interfaces import IRegistry from zope.component import queryUtility from zope.globalrequest import getRequest diff --git a/Products/CMFPlone/resources/exportimport/cssregistry.py b/Products/CMFPlone/resources/exportimport/cssregistry.py index 3f1babd..927c7dd 100644 --- a/Products/CMFPlone/resources/exportimport/cssregistry.py +++ b/Products/CMFPlone/resources/exportimport/cssregistry.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.CMFPlone.resources.exportimport.resourceregistry import \ ResourceRegistryNodeAdapter from Products.CMFPlone.resources.exportimport.resourceregistry import \ diff --git a/Products/CMFPlone/resources/exportimport/jsregistry.py b/Products/CMFPlone/resources/exportimport/jsregistry.py index 8aae390..ec99026 100644 --- a/Products/CMFPlone/resources/exportimport/jsregistry.py +++ b/Products/CMFPlone/resources/exportimport/jsregistry.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.ResourceRegistries.interfaces import IJSRegistry from resourceregistry import ResourceRegistryNodeAdapter from resourceregistry import importResRegistry diff --git a/Products/CMFPlone/resources/exportimport/resourceregistry.py b/Products/CMFPlone/resources/exportimport/resourceregistry.py index 9c940d3..504b88b 100644 --- a/Products/CMFPlone/resources/exportimport/resourceregistry.py +++ b/Products/CMFPlone/resources/exportimport/resourceregistry.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from datetime import datetime from Products.CMFCore.utils import getToolByName diff --git a/Products/CMFPlone/resources/viewlets/__init__.py b/Products/CMFPlone/resources/viewlets/__init__.py index 2fc0fe7..ab52c67 100644 --- a/Products/CMFPlone/resources/viewlets/__init__.py +++ b/Products/CMFPlone/resources/viewlets/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from Products.ResourceRegistries.interfaces.registries import IResourceRegistry from Products.ResourceRegistries.interfaces.registries import ICSSRegistry from Products.ResourceRegistries.interfaces.registries import IKSSRegistry diff --git a/Products/CMFPlone/resources/viewlets/registries.py b/Products/CMFPlone/resources/viewlets/registries.py index a5c43d2..89a0ca6 100644 --- a/Products/CMFPlone/resources/viewlets/registries.py +++ b/Products/CMFPlone/resources/viewlets/registries.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from zope.interface import Attribute from zope.interface import Interface diff --git a/Products/CMFPlone/resources/viewlets/settings.py b/Products/CMFPlone/resources/viewlets/settings.py index de1f147..7324f35 100644 --- a/Products/CMFPlone/resources/viewlets/settings.py +++ b/Products/CMFPlone/resources/viewlets/settings.py @@ -1,3 +1,4 @@ +# -*- c... [truncated message content] |
|
From: Jens W. K. <je...@pl...> - 2016-09-30 15:07:33
|
Repository: buildout.coredev Branch: refs/heads/5.1 Date: 2016-09-30T17:07:14+02:00 Author: Jens W. Klein (jensens) <jk...@kl...> Commit: https://github.com/plone/buildout.coredev/commit/3d39e8a6023f32fa40e0d2b46055222325d086db use new release of plone.versioncheck Files changed: M versions.cfg diff --git a/versions.cfg b/versions.cfg index b8b0ed8..18b5441 100644 --- a/versions.cfg +++ b/versions.cfg @@ -43,7 +43,7 @@ plone.recipe.alltests = 1.5 plone.recipe.zeoserver = 1.2.9 plone.recipe.zope2instance = 4.2.21 plone.releaser = 1.5.3 -plone.versioncheck = 1.3 +plone.versioncheck = 1.4 z3c.checkversions = 0.5 z3c.coverage = 2.0.3 z3c.ptcompat = 1.0.1 |
|
From: Maurits v. R. <je...@pl...> - 2016-09-30 12:58:02
|
Repository: plone.scale Branch: refs/heads/modified-time-compare-14 Date: 2016-09-30T14:57:15+02:00 Author: Maurits van Rees (mauritsvanrees) <ma...@va...> Commit: https://github.com/plone/plone.scale/commit/bf6794b766875596356e40a58785530656a01b5c When getting an outdated scale, don't throw it away when there is no factory. Files changed: M CHANGES.rst M plone/scale/storage.py diff --git a/CHANGES.rst b/CHANGES.rst index 0fef453..5debd05 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,9 @@ New: Fixes: +- When getting an outdated scale, don't throw it away when there is no + factory. [maurits] + - In auto cleanup delete scales that are outdated more than one day. This was already introduced in version 1.3.4, but we were interpreting numbers incorrectly and were keeping outdated scales diff --git a/plone/scale/storage.py b/plone/scale/storage.py index 6af6287..5c72b4a 100644 --- a/plone/scale/storage.py +++ b/plone/scale/storage.py @@ -169,7 +169,8 @@ def scale(self, factory=None, **parameters): key = self.hash(**parameters) storage = self.storage info = self.get_info_by_hash(key) - if info is not None and self._modified_since(info['modified']): + if (info is not None and factory and + self._modified_since(info['modified'])): del storage[info['uid']] # invalidate when the image was updated info = None |
|
From: Maurits v. R. <je...@pl...> - 2016-09-30 12:58:01
|
Repository: plone.scale Branch: refs/heads/modified-time-compare-14 Date: 2016-09-30T14:57:15+02:00 Author: Maurits van Rees (mauritsvanrees) <ma...@va...> Commit: https://github.com/plone/plone.scale/commit/ff57b54eee8fd72a142f1fb8aa7d343f5f9e1aee In auto cleanup delete scales that are outdated more than one day. This was already introduced in version 1.3.4, but we were interpreting numbers incorrectly and were keeping outdated scales for 1000 days. Fixes https://github.com/plone/plone.scale/issues/18 Files changed: M CHANGES.rst M plone/scale/storage.py diff --git a/CHANGES.rst b/CHANGES.rst index 37adafb..0fef453 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,17 @@ New: Fixes: +- In auto cleanup delete scales that are outdated more than one day. + This was already introduced in version 1.3.4, but we were + interpreting numbers incorrectly and were keeping outdated scales + for 1000 days. If you were importing ``KEEP_SCALE_MILLIS`` from + ``storage.py``, please use the computation yourself: ``24 * 60 * + 60 * 1000`` or whatever you need. We kept the constant for + backwards compatibility, but see + ``AnnotationStorage._keep_scale_seconds`` instead. + Fixes `issue 18 <https://github.com/plone/plone.scale/issues/18>`_. + [maurits] + - Avoid TypeErrors when looking for outdated scales. Fixes `issue 12 <https://github.com/plone/plone.scale/issues/12>`_. [maurits] diff --git a/plone/scale/storage.py b/plone/scale/storage.py index 1783053..6af6287 100644 --- a/plone/scale/storage.py +++ b/plone/scale/storage.py @@ -9,8 +9,9 @@ import pprint logger = logging.getLogger('plone.scale') -# Keep old scales around for this amount of milliseconds. -# This is one day: + +# BBB. Old unused definition kept for backwards compatibility. +# See AnnotationStorage._keep_scale_seconds instead. KEEP_SCALE_MILLIS = 24 * 60 * 60 * 1000 @@ -103,6 +104,12 @@ class AnnotationStorage(DictMixin): since not all images are themselves annotatable. """ implements(IImageScaleStorage) + # Keep old scales around for this amount of seconds. Note: we used + # milliseconds before, but that seems to have been a mistake. + # See https://github.com/plone/plone.scale/issues/18 + # This is one day: + _keep_scale_seconds = 24 * 60 * 60 + def __init__(self, context, modified=None): self.context = context self.modified = modified @@ -196,7 +203,7 @@ def _cleanup(self): del storage[key] # clear cache from scales older than one day elif self._modified_since( - value['modified'], offset=KEEP_SCALE_MILLIS): + value['modified'], offset=self._keep_scale_seconds): del storage[key] def __getitem__(self, uid): |
|
From: Maurits v. R. <je...@pl...> - 2016-09-30 12:54:38
|
Repository: plone.scale Branch: refs/heads/modified-time-compare-14 Date: 2016-09-30T14:54:14+02:00 Author: Maurits van Rees (mauritsvanrees) <ma...@va...> Commit: https://github.com/plone/plone.scale/commit/7840b79d9020efd088c059513efe757b6256edaa When getting an outdated scale, don't throw it away when there is no factory. Files changed: M CHANGES.rst M plone/scale/storage.py diff --git a/CHANGES.rst b/CHANGES.rst index af0f65d..ddf57cf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,9 @@ New: Fixes: +- When getting an outdated scale, don't throw it away when there is no + factory. [maurits] + - In auto cleanup delete scales that are outdated more than one day. This was already introduced in version 1.3.4, but we were interpreting numbers incorrectly and were keeping outdated scales diff --git a/plone/scale/storage.py b/plone/scale/storage.py index 2a452bd..9ff83ad 100644 --- a/plone/scale/storage.py +++ b/plone/scale/storage.py @@ -169,7 +169,8 @@ def scale(self, factory=None, **parameters): key = self.hash(**parameters) storage = self.storage info = self.get_info_by_hash(key) - if info is not None and self._modified_since(info['modified']): + if (info is not None and factory and + self._modified_since(info['modified'])): del storage[info['uid']] # invalidate when the image was updated info = None |
|
From: Maurits v. R. <je...@pl...> - 2016-09-30 12:54:38
|
Repository: plone.scale Branch: refs/heads/modified-time-compare-14 Date: 2016-09-30T14:54:14+02:00 Author: Maurits van Rees (mauritsvanrees) <ma...@va...> Commit: https://github.com/plone/plone.scale/commit/3dffb034945324b03aa4078bbe84c40b82f82d13 In auto cleanup delete scales that are outdated more than one day. This was already introduced in version 1.3.4, but we were interpreting numbers incorrectly and were keeping outdated scales for 1000 days. Fixes https://github.com/plone/plone.scale/issues/18 Files changed: M CHANGES.rst M plone/scale/storage.py diff --git a/CHANGES.rst b/CHANGES.rst index 37adafb..af0f65d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,13 @@ New: Fixes: +- In auto cleanup delete scales that are outdated more than one day. + This was already introduced in version 1.3.4, but we were + interpreting numbers incorrectly and were keeping outdated scales + for 1000 days. + Fixes `issue 18 <https://github.com/plone/plone.scale/issues/18>`_. + [maurits] + - Avoid TypeErrors when looking for outdated scales. Fixes `issue 12 <https://github.com/plone/plone.scale/issues/12>`_. [maurits] diff --git a/plone/scale/storage.py b/plone/scale/storage.py index 1783053..2a452bd 100644 --- a/plone/scale/storage.py +++ b/plone/scale/storage.py @@ -9,8 +9,9 @@ import pprint logger = logging.getLogger('plone.scale') -# Keep old scales around for this amount of milliseconds. -# This is one day: + +# Old unused definition kept for backwards compatibility. +# See AnnotationStorage._keep_scale_seconds instead. KEEP_SCALE_MILLIS = 24 * 60 * 60 * 1000 @@ -103,6 +104,12 @@ class AnnotationStorage(DictMixin): since not all images are themselves annotatable. """ implements(IImageScaleStorage) + # Keep old scales around for this amount of seconds. Note: we used + # milliseconds before, but that seems to have been a mistake. + # See https://github.com/plone/plone.scale/issues/18 + # This is one day: + _keep_scale_seconds = 24 * 60 * 60 + def __init__(self, context, modified=None): self.context = context self.modified = modified @@ -196,7 +203,7 @@ def _cleanup(self): del storage[key] # clear cache from scales older than one day elif self._modified_since( - value['modified'], offset=KEEP_SCALE_MILLIS): + value['modified'], offset=self._keep_scale_seconds): del storage[key] def __getitem__(self, uid): |
|
From: Maurits v. R. <je...@pl...> - 2016-09-30 12:48:09
|
Repository: plone.scale Branch: refs/heads/modified-time-compare-14 Date: 2016-09-30T14:45:23+02:00 Author: Maurits van Rees (mauritsvanrees) <ma...@va...> Commit: https://github.com/plone/plone.scale/commit/1128f4016842b3fe20bd7185a5f3fac94a892c74 When getting an outdated scale, don't throw it away when there is no factory. Files changed: M CHANGES.rst M plone/scale/storage.py diff --git a/CHANGES.rst b/CHANGES.rst index af0f65d..ddf57cf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,9 @@ New: Fixes: +- When getting an outdated scale, don't throw it away when there is no + factory. [maurits] + - In auto cleanup delete scales that are outdated more than one day. This was already introduced in version 1.3.4, but we were interpreting numbers incorrectly and were keeping outdated scales diff --git a/plone/scale/storage.py b/plone/scale/storage.py index d00c718..fed7a77 100644 --- a/plone/scale/storage.py +++ b/plone/scale/storage.py @@ -165,7 +165,8 @@ def scale(self, factory=None, **parameters): key = self.hash(**parameters) storage = self.storage info = self.get_info_by_hash(key) - if info is not None and self._modified_since(info['modified']): + if (info is not None and factory and + self._modified_since(info['modified'])): del storage[info['uid']] # invalidate when the image was updated info = None |
|
From: Maurits v. R. <je...@pl...> - 2016-09-30 12:48:09
|
Repository: plone.scale Branch: refs/heads/modified-time-compare-14 Date: 2016-09-30T14:42:13+02:00 Author: Maurits van Rees (mauritsvanrees) <ma...@va...> Commit: https://github.com/plone/plone.scale/commit/1aa5f4d9dda1932e9a4457998b4d3670f6c66be4 In auto cleanup delete scales that are outdated more than one day. This was already introduced in version 1.3.4, but we were interpreting numbers incorrectly and were keeping outdated scales for 1000 days. Fixes https://github.com/plone/plone.scale/issues/18 Files changed: M CHANGES.rst M plone/scale/storage.py diff --git a/CHANGES.rst b/CHANGES.rst index 37adafb..af0f65d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,13 @@ New: Fixes: +- In auto cleanup delete scales that are outdated more than one day. + This was already introduced in version 1.3.4, but we were + interpreting numbers incorrectly and were keeping outdated scales + for 1000 days. + Fixes `issue 18 <https://github.com/plone/plone.scale/issues/18>`_. + [maurits] + - Avoid TypeErrors when looking for outdated scales. Fixes `issue 12 <https://github.com/plone/plone.scale/issues/12>`_. [maurits] diff --git a/plone/scale/storage.py b/plone/scale/storage.py index 1783053..d00c718 100644 --- a/plone/scale/storage.py +++ b/plone/scale/storage.py @@ -9,9 +9,6 @@ import pprint logger = logging.getLogger('plone.scale') -# Keep old scales around for this amount of milliseconds. -# This is one day: -KEEP_SCALE_MILLIS = 24 * 60 * 60 * 1000 class IImageScaleStorage(Interface): @@ -103,6 +100,12 @@ class AnnotationStorage(DictMixin): since not all images are themselves annotatable. """ implements(IImageScaleStorage) + # Keep old scales around for this amount of seconds. Note: we used + # milliseconds before, but that seems to have been a mistake. + # See https://github.com/plone/plone.scale/issues/18 + # This is one day: + _keep_scale_seconds = 24 * 60 * 60 + def __init__(self, context, modified=None): self.context = context self.modified = modified @@ -196,7 +199,7 @@ def _cleanup(self): del storage[key] # clear cache from scales older than one day elif self._modified_since( - value['modified'], offset=KEEP_SCALE_MILLIS): + value['modified'], offset=self._keep_scale_seconds): del storage[key] def __getitem__(self, uid): |
|
From: Maurits v. R. <je...@pl...> - 2016-09-30 12:48:07
|
Repository: plone.scale Branch: refs/heads/modified-time-compare-14 Date: 2016-09-30T14:31:58+02:00 Author: Maurits van Rees (mauritsvanrees) <ma...@va...> Commit: https://github.com/plone/plone.scale/commit/0e6ddc536db14bcb5712afa22d4437de9de45ff8 Avoid TypeErrors when looking for outdated scales. Fixes https://github.com/plone/plone.scale/issues/12 Files changed: M CHANGES.rst M plone/scale/storage.py diff --git a/CHANGES.rst b/CHANGES.rst index a73a121..37adafb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,10 @@ New: Fixes: +- Avoid TypeErrors when looking for outdated scales. + Fixes `issue 12 <https://github.com/plone/plone.scale/issues/12>`_. + [maurits] + - Set ``zip_safe=False`` in ``setup.py``. Otherwise you cannot run the tests of the released package because the test runner does not find any tests in the egg file. Note that this is only a problem in diff --git a/plone/scale/storage.py b/plone/scale/storage.py index 2135f6f..1783053 100644 --- a/plone/scale/storage.py +++ b/plone/scale/storage.py @@ -107,13 +107,21 @@ def __init__(self, context, modified=None): self.context = context self.modified = modified - def _modified_since(self, since): + def _modified_since(self, since, offset=0): if since is None: return False - elif self.modified_time is None: + modified_time = self.modified_time + if modified_time is None: return False - else: - return self.modified_time > since + # We expect either a float or an int, but in corner cases it can be + # something else entirely. + # https://github.com/plone/plone.scale/issues/12 + if not isinstance(modified_time, (float, int)): + return False + if not isinstance(since, (float, int)): + return False + since = since - offset + return modified_time > since @property def modified_time(self): @@ -176,14 +184,19 @@ def scale(self, factory=None, **parameters): def _cleanup(self): storage = self.storage modified_time = self.modified_time + if modified_time is None: + return + if not isinstance(modified_time, (float, int)): + # https://github.com/plone/plone.scale/issues/12 + return for key, value in storage.items(): # remove info stored by tuple keys # before refactoring if isinstance(key, tuple): del storage[key] # clear cache from scales older than one day - elif (modified_time and - value['modified'] < modified_time - KEEP_SCALE_MILLIS): + elif self._modified_since( + value['modified'], offset=KEEP_SCALE_MILLIS): del storage[key] def __getitem__(self, uid): |
|
From: GitHub <je...@pl...> - 2016-09-30 12:25:49
|
Repository: plone.formwidget.autocomplete Branch: refs/heads/master Date: 2016-09-30T14:25:37+02:00 Author: Maurits van Rees (mauritsvanrees) <ma...@va...> Commit: https://github.com/plone/plone.formwidget.autocomplete/commit/9863af230cb439402cba9e190a219dad97cf86b8 Merge pull request #19 from plone/better-undefined-handling better handling of undefined data Files changed: M CHANGES.rst M plone/formwidget/autocomplete/jquery-autocomplete/formwidget-autocomplete.js diff --git a/CHANGES.rst b/CHANGES.rst index fec1bed..35f9e33 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,7 +14,8 @@ New features: Bug fixes: -- *add item here* +- Better handling of undefined data + [agitator] 1.2.10 (2016-08-08) diff --git a/plone/formwidget/autocomplete/jquery-autocomplete/formwidget-autocomplete.js b/plone/formwidget/autocomplete/jquery-autocomplete/formwidget-autocomplete.js index 1003883..42ad767 100644 --- a/plone/formwidget/autocomplete/jquery-autocomplete/formwidget-autocomplete.js +++ b/plone/formwidget/autocomplete/jquery-autocomplete/formwidget-autocomplete.js @@ -58,7 +58,7 @@ function formwidget_autocomplete_parser(formatResult, fieldNum) { var parsed = []; // If the server responds with 204 No Content, then data will not // be a string. - if(data.split){ + if (data !== undefined && data.split){ var rows = data.split("\n"); for (var i=0; i < rows.length; i++) { var row = $.trim(rows[i]); |
|
From: Peter H. <je...@pl...> - 2016-09-30 12:25:48
|
Repository: plone.formwidget.autocomplete Branch: refs/heads/master Date: 2016-09-30T13:04:19+02:00 Author: Peter Holzer (agitator) <hp...@ag...> Commit: https://github.com/plone/plone.formwidget.autocomplete/commit/fd7942e369e040f4402c9a4514bd4e8bf034287d better handling of undefined data Files changed: M CHANGES.rst M plone/formwidget/autocomplete/jquery-autocomplete/formwidget-autocomplete.js diff --git a/CHANGES.rst b/CHANGES.rst index fec1bed..35f9e33 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,7 +14,8 @@ New features: Bug fixes: -- *add item here* +- Better handling of undefined data + [agitator] 1.2.10 (2016-08-08) diff --git a/plone/formwidget/autocomplete/jquery-autocomplete/formwidget-autocomplete.js b/plone/formwidget/autocomplete/jquery-autocomplete/formwidget-autocomplete.js index 1003883..42ad767 100644 --- a/plone/formwidget/autocomplete/jquery-autocomplete/formwidget-autocomplete.js +++ b/plone/formwidget/autocomplete/jquery-autocomplete/formwidget-autocomplete.js @@ -58,7 +58,7 @@ function formwidget_autocomplete_parser(formatResult, fieldNum) { var parsed = []; // If the server responds with 204 No Content, then data will not // be a string. - if(data.split){ + if (data !== undefined && data.split){ var rows = data.split("\n"); for (var i=0; i < rows.length; i++) { var row = $.trim(rows[i]); |
|
From: GitHub <je...@pl...> - 2016-09-30 12:21:33
|
Repository: buildout.coredev Branch: refs/heads/5.1 Date: 2016-09-30T14:21:19+02:00 Author: Maurits van Rees (mauritsvanrees) <ma...@va...> Commit: https://github.com/plone/buildout.coredev/commit/17b5ab949238e571da1ae439f2b281336de7d1ab Merge pull request #247 from plone/dependency-updates update a bunch of version at once Files changed: M tests.cfg M versions.cfg diff --git a/tests.cfg b/tests.cfg index 81cb56e..19f1c62 100644 --- a/tests.cfg +++ b/tests.cfg @@ -140,28 +140,29 @@ test-eggs = # egg versions that are not part of the release, but should still be pinned # so our development builds are repeatable # jenkins versions -alabaster = 0.7.7 +alabaster = 0.7.9 argcomplete = 1.0.0 -argh = 0.26.1 +argh = 0.26.2 args = 0.1.0 -autopep8 = 1.2.1 +autopep8 = 1.2.4 +# do not use newer bleach due to html5lib dependency problem bleach = 1.4.2 CacheControl = 0.11.6 chardet = 2.3.0 -check-manifest = 0.31 +check-manifest = 0.34 clint = 0.5.1 collective.recipe.sphinxbuilder = 0.8.2 colorama = 0.3.7 configparser = 3.5.0b2 -fancycompleter = 0.4 -flake8 = 2.5.4 -FormEncode = 1.3.0 +fancycompleter = 0.5 +flake8 = 2.5.5 +FormEncode = 1.3.1 gitdb = 0.6.4 -GitPython = 1.0.1 +GitPython = 1.0.2 html5lib = 1.0b7 -httplib2 = 0.9 -keyring = 4.0 -launchpadlib = 1.10.3 +httplib2 = 0.9.2 +keyring = 4.1.1 +launchpadlib = 1.10.4 lazr.authentication = 0.1.3 lazr.restfulclient = 0.13.1 lazr.uri = 1.0.3 @@ -176,19 +177,18 @@ pep8 = 1.7.0 # If you have a dependency somewhere on else on persistent, # you must get rid of it. persistent = 4.1.1 -pdbpp = 0.8.2 -pkginfo = 1.2.1 +pdbpp = 0.8.3 +pkginfo = 1.3.2 plone.recipe.command = 1.1 Products.PrintingMailHost = 1.0 progress = 1.2 pyflakes = 1.0.0 -PyGithub = 1.26.0 +PyGithub = 1.28 pyrepl = 0.8.4 pyroma = 2.0.2 PyYAML = 3.11 readme-renderer = 0.7.0 -requests = 2.9.1 -requests-toolbelt = 0.6.0 +requests-toolbelt = 0.7.0 smmap = 0.9.0 testresources = 0.2.7 twine = 1.8.1 @@ -198,7 +198,7 @@ wheel = 0.29.0 wmctrl = 0.1 z3c.receipe.compattest = 0.13.1 z3c.recipe.scripts = 1.0.1 -zc.sourcefactory = 1.0.0a1 +zc.sourcefactory = 1.0.0 zest.pocompile = 1.4 zest.releaser = 6.6.5 diff --git a/versions.cfg b/versions.cfg index ad54d65..b8b0ed8 100644 --- a/versions.cfg +++ b/versions.cfg @@ -11,7 +11,7 @@ AccessControl = 3.0.12 ExtensionClass = 4.1.2 Acquisition = 4.2.2 # More memory efficient version, Trac #13101 -DateTime = 4.0.1 +DateTime = 4.1.1 Products.BTreeFolder2 = 2.14.0 # Overrides until ztk is updated coverage = 3.7.1 @@ -60,19 +60,19 @@ zope.testrunner = 4.4.4 # Robot Testing plone.app.robotframework = 1.0.1 robotframework = 3.0 -robotframework-debuglibrary = 0.5 +robotframework-debuglibrary = 0.8 robotframework-ride = 1.5.2.1 robotframework-selenium2library = 1.7.4 robotframework-selenium2screenshots = 0.7.0 robotsuite = 1.7.0 -selenium = 2.53.5 +selenium = 2.53.6 # i18n Babel = 1.3 i18ndude = 4.0.1 # sphinx documentation -Pygments = 2.0.2 +Pygments = 2.1.3 snowballstemmer = 1.2.1 sphinx-rtd-theme = 0.1.9 sphinxcontrib-robotframework = 0.5.1 @@ -84,8 +84,8 @@ z3c.recipe.sphinxdoc = 1.0.0 # External dependencies Chameleon = 2.25 Jinja2 = 2.8 -Markdown = 2.6.6 -Pillow = 3.3.0 +Markdown = 2.6.7 +Pillow = 3.3.1 WebOb = 1.4.2 elementtree = 1.2.7-20070827-preview cssselect = 0.9.2 @@ -99,7 +99,7 @@ python-dateutil = 2.4.2 python-gettext = 3.0 python-openid = 2.2.5 repoze.xmliter = 0.6 -requests = 2.9.2 +requests = 2.11.1 simplejson = 3.8.2 six = 1.10.0 cssmin = 0.2.0 @@ -141,7 +141,7 @@ Products.CMFQuickInstallerTool = 3.0.13 Products.CMFUid = 2.2.1 Products.contentmigration = 2.1.13 Products.DateRecurringIndex = 2.1 -Products.DCWorkflow = 2.2.4 +Products.DCWorkflow = 2.2.5 Products.ExtendedPathIndex = 3.1.1 Products.ExternalEditor = 1.1.2 Products.GenericSetup = 1.8.4 @@ -178,7 +178,7 @@ mockup = 2.3.0 plone.app.blob = 1.6.4 plone.app.caching = 1.2.12 plone.app.collection = 1.2.2 -plone.app.content = 3.3 +plone.app.content = 3.3.1 plone.app.contentlisting = 1.2.7 plone.app.contentmenu = 2.1.8 plone.app.contentrules = 4.0.11 @@ -194,17 +194,17 @@ plone.app.imaging = 2.0.5 plone.app.iterate = 3.2.2 plone.app.layout = 2.6.1 plone.app.linkintegrity = 3.0.7 -plone.app.locales = 5.0.10 +plone.app.locales = 5.0.11 plone.app.openid = 2.2.1 plone.app.portlets = 4.2 plone.app.querystring = 1.4 plone.app.redirector = 1.3.2 plone.app.registry = 1.4 -plone.app.testing = 5.0.3 +plone.app.testing = 5.0.4 plone.app.textfield = 1.2.7 plone.app.theming = 1.3.1 plone.app.upgrade = 1.3.27 -plone.app.users = 2.3.7 +plone.app.users = 2.3.8 plone.app.uuid = 1.1.1 plone.app.viewletmanager = 2.0.10 plone.app.vocabularies = 3.0 @@ -220,7 +220,7 @@ plone.browserlayer = 2.1.6 plone.cachepurging = 1.0.12 plone.caching = 1.1.2 plone.contentrules = 2.0.6 -plone.dexterity = 2.4.3 +plone.dexterity = 2.4.4 plone.event = 1.3.1 plone.folder = 1.0.9 plone.formwidget.datetime = 1.3.1 @@ -263,7 +263,7 @@ plonetheme.barceloneta = 1.6.21 plonetheme.sunburst = 1.5.3 rwproperty = 1.0 sourcecodegen = 0.6.14 -z3c.autoinclude = 0.3.6 +z3c.autoinclude = 0.3.7 z3c.batching = 2.0.1 z3c.blobfile = 0.1.5 z3c.caching = 2.0a1 @@ -297,9 +297,9 @@ plone.app.intid = 1.1.2 plone.app.debugtoolbar = 1.1.1 plone.app.lockingbehavior = 1.0.4 plone.app.referenceablebehavior = 0.7.5 -plone.app.relationfield = 1.3.3 +plone.app.relationfield = 1.3.4 plone.app.stagingbehavior = 0.1 -plone.app.versioningbehavior = 1.2.9 +plone.app.versioningbehavior = 1.2.10 plone.directives.dexterity = 1.0.2 plone.directives.form = 2.0.2 plone.formwidget.autocomplete = 1.2.10 @@ -313,8 +313,8 @@ zc.relation = 1.0 plone.app.multilingual = 4.0.4 archetypes.multilingual = 3.0.3 -plone.app.blocks = 3.0.1 -plone.app.drafts = 1.0 -plone.app.tiles = 2.1.0 +plone.app.blocks = 3.1.0 +plone.app.drafts = 1.1.1 +plone.app.tiles = 2.2.1 plone.tiles = 1.7.1 plone.app.ldap = 1.4.0 |
|
From: Jens W. K. <je...@pl...> - 2016-09-30 12:21:31
|
Repository: buildout.coredev Branch: refs/heads/5.1 Date: 2016-09-30T12:32:54+02:00 Author: Jens W. Klein (jensens) <jk...@kl...> Commit: https://github.com/plone/buildout.coredev/commit/a0201b4b255f79e8b0a54f7b05242ba1cfc17b07 update a bunch of version at once Files changed: M tests.cfg M versions.cfg diff --git a/tests.cfg b/tests.cfg index 81cb56e..19f1c62 100644 --- a/tests.cfg +++ b/tests.cfg @@ -140,28 +140,29 @@ test-eggs = # egg versions that are not part of the release, but should still be pinned # so our development builds are repeatable # jenkins versions -alabaster = 0.7.7 +alabaster = 0.7.9 argcomplete = 1.0.0 -argh = 0.26.1 +argh = 0.26.2 args = 0.1.0 -autopep8 = 1.2.1 +autopep8 = 1.2.4 +# do not use newer bleach due to html5lib dependency problem bleach = 1.4.2 CacheControl = 0.11.6 chardet = 2.3.0 -check-manifest = 0.31 +check-manifest = 0.34 clint = 0.5.1 collective.recipe.sphinxbuilder = 0.8.2 colorama = 0.3.7 configparser = 3.5.0b2 -fancycompleter = 0.4 -flake8 = 2.5.4 -FormEncode = 1.3.0 +fancycompleter = 0.5 +flake8 = 2.5.5 +FormEncode = 1.3.1 gitdb = 0.6.4 -GitPython = 1.0.1 +GitPython = 1.0.2 html5lib = 1.0b7 -httplib2 = 0.9 -keyring = 4.0 -launchpadlib = 1.10.3 +httplib2 = 0.9.2 +keyring = 4.1.1 +launchpadlib = 1.10.4 lazr.authentication = 0.1.3 lazr.restfulclient = 0.13.1 lazr.uri = 1.0.3 @@ -176,19 +177,18 @@ pep8 = 1.7.0 # If you have a dependency somewhere on else on persistent, # you must get rid of it. persistent = 4.1.1 -pdbpp = 0.8.2 -pkginfo = 1.2.1 +pdbpp = 0.8.3 +pkginfo = 1.3.2 plone.recipe.command = 1.1 Products.PrintingMailHost = 1.0 progress = 1.2 pyflakes = 1.0.0 -PyGithub = 1.26.0 +PyGithub = 1.28 pyrepl = 0.8.4 pyroma = 2.0.2 PyYAML = 3.11 readme-renderer = 0.7.0 -requests = 2.9.1 -requests-toolbelt = 0.6.0 +requests-toolbelt = 0.7.0 smmap = 0.9.0 testresources = 0.2.7 twine = 1.8.1 @@ -198,7 +198,7 @@ wheel = 0.29.0 wmctrl = 0.1 z3c.receipe.compattest = 0.13.1 z3c.recipe.scripts = 1.0.1 -zc.sourcefactory = 1.0.0a1 +zc.sourcefactory = 1.0.0 zest.pocompile = 1.4 zest.releaser = 6.6.5 diff --git a/versions.cfg b/versions.cfg index ad54d65..b8b0ed8 100644 --- a/versions.cfg +++ b/versions.cfg @@ -11,7 +11,7 @@ AccessControl = 3.0.12 ExtensionClass = 4.1.2 Acquisition = 4.2.2 # More memory efficient version, Trac #13101 -DateTime = 4.0.1 +DateTime = 4.1.1 Products.BTreeFolder2 = 2.14.0 # Overrides until ztk is updated coverage = 3.7.1 @@ -60,19 +60,19 @@ zope.testrunner = 4.4.4 # Robot Testing plone.app.robotframework = 1.0.1 robotframework = 3.0 -robotframework-debuglibrary = 0.5 +robotframework-debuglibrary = 0.8 robotframework-ride = 1.5.2.1 robotframework-selenium2library = 1.7.4 robotframework-selenium2screenshots = 0.7.0 robotsuite = 1.7.0 -selenium = 2.53.5 +selenium = 2.53.6 # i18n Babel = 1.3 i18ndude = 4.0.1 # sphinx documentation -Pygments = 2.0.2 +Pygments = 2.1.3 snowballstemmer = 1.2.1 sphinx-rtd-theme = 0.1.9 sphinxcontrib-robotframework = 0.5.1 @@ -84,8 +84,8 @@ z3c.recipe.sphinxdoc = 1.0.0 # External dependencies Chameleon = 2.25 Jinja2 = 2.8 -Markdown = 2.6.6 -Pillow = 3.3.0 +Markdown = 2.6.7 +Pillow = 3.3.1 WebOb = 1.4.2 elementtree = 1.2.7-20070827-preview cssselect = 0.9.2 @@ -99,7 +99,7 @@ python-dateutil = 2.4.2 python-gettext = 3.0 python-openid = 2.2.5 repoze.xmliter = 0.6 -requests = 2.9.2 +requests = 2.11.1 simplejson = 3.8.2 six = 1.10.0 cssmin = 0.2.0 @@ -141,7 +141,7 @@ Products.CMFQuickInstallerTool = 3.0.13 Products.CMFUid = 2.2.1 Products.contentmigration = 2.1.13 Products.DateRecurringIndex = 2.1 -Products.DCWorkflow = 2.2.4 +Products.DCWorkflow = 2.2.5 Products.ExtendedPathIndex = 3.1.1 Products.ExternalEditor = 1.1.2 Products.GenericSetup = 1.8.4 @@ -178,7 +178,7 @@ mockup = 2.3.0 plone.app.blob = 1.6.4 plone.app.caching = 1.2.12 plone.app.collection = 1.2.2 -plone.app.content = 3.3 +plone.app.content = 3.3.1 plone.app.contentlisting = 1.2.7 plone.app.contentmenu = 2.1.8 plone.app.contentrules = 4.0.11 @@ -194,17 +194,17 @@ plone.app.imaging = 2.0.5 plone.app.iterate = 3.2.2 plone.app.layout = 2.6.1 plone.app.linkintegrity = 3.0.7 -plone.app.locales = 5.0.10 +plone.app.locales = 5.0.11 plone.app.openid = 2.2.1 plone.app.portlets = 4.2 plone.app.querystring = 1.4 plone.app.redirector = 1.3.2 plone.app.registry = 1.4 -plone.app.testing = 5.0.3 +plone.app.testing = 5.0.4 plone.app.textfield = 1.2.7 plone.app.theming = 1.3.1 plone.app.upgrade = 1.3.27 -plone.app.users = 2.3.7 +plone.app.users = 2.3.8 plone.app.uuid = 1.1.1 plone.app.viewletmanager = 2.0.10 plone.app.vocabularies = 3.0 @@ -220,7 +220,7 @@ plone.browserlayer = 2.1.6 plone.cachepurging = 1.0.12 plone.caching = 1.1.2 plone.contentrules = 2.0.6 -plone.dexterity = 2.4.3 +plone.dexterity = 2.4.4 plone.event = 1.3.1 plone.folder = 1.0.9 plone.formwidget.datetime = 1.3.1 @@ -263,7 +263,7 @@ plonetheme.barceloneta = 1.6.21 plonetheme.sunburst = 1.5.3 rwproperty = 1.0 sourcecodegen = 0.6.14 -z3c.autoinclude = 0.3.6 +z3c.autoinclude = 0.3.7 z3c.batching = 2.0.1 z3c.blobfile = 0.1.5 z3c.caching = 2.0a1 @@ -297,9 +297,9 @@ plone.app.intid = 1.1.2 plone.app.debugtoolbar = 1.1.1 plone.app.lockingbehavior = 1.0.4 plone.app.referenceablebehavior = 0.7.5 -plone.app.relationfield = 1.3.3 +plone.app.relationfield = 1.3.4 plone.app.stagingbehavior = 0.1 -plone.app.versioningbehavior = 1.2.9 +plone.app.versioningbehavior = 1.2.10 plone.directives.dexterity = 1.0.2 plone.directives.form = 2.0.2 plone.formwidget.autocomplete = 1.2.10 @@ -313,8 +313,8 @@ zc.relation = 1.0 plone.app.multilingual = 4.0.4 archetypes.multilingual = 3.0.3 -plone.app.blocks = 3.0.1 -plone.app.drafts = 1.0 -plone.app.tiles = 2.1.0 +plone.app.blocks = 3.1.0 +plone.app.drafts = 1.1.1 +plone.app.tiles = 2.2.1 plone.tiles = 1.7.1 plone.app.ldap = 1.4.0 |