[ckan-changes] [ckan/ckan] 3a32aa: [#1879] Set DataStore to legacy mode when using Po...
GitHub
noreply at github.com
Thu Oct 2 12:23:15 UTC 2014
Branch: refs/heads/release-v2.2.1
Home: https://github.com/ckan/ckan
Commit: 3a32aabcf77da56b5545290be2638dbbd74ef647
https://github.com/ckan/ckan/commit/3a32aabcf77da56b5545290be2638dbbd74ef647
Author: amercader <amercadero at gmail.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckanext/datastore/plugin.py
M ckanext/datastore/tests/test_unit.py
Log Message:
-----------
[#1879] Set DataStore to legacy mode when using PostgreSQL < 9.x
Up until now the user had to actively set legacy mode when running PG
8.x, and if not you could end up with the full datastore running on an
old postgres version. Features like the SQL search are not properly
supported on these versions, so we need to explicitly disable them when
running on PG 8.x, by setting `legacy_mode` to True.
The current behaviour is that legacy mode will be activated if
`ckan.datastore.read_url` is not present in the configuration and/or
postgres < 9.x.
Commit: b26816fe240739bbc17f86d7c988f40ffdf6bf93
https://github.com/ckan/ckan/commit/b26816fe240739bbc17f86d7c988f40ffdf6bf93
Author: amercader <amercadero at gmail.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckanext/datastore/tests/test_unit.py
Log Message:
-----------
[#1879] Fix tests
The travis setup explicitly removes the `ckan.datastore.read_url`
setting when running the tests, so we need to use a dummy one.
Also some refactoring
Commit: 5b25789bd04e9feb32ffab331648487367195a40
https://github.com/ckan/ckan/commit/5b25789bd04e9feb32ffab331648487367195a40
Author: amercader <amercadero at gmail.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
A ckanext/datastore/helpers.py
A ckanext/datastore/tests/test_helpers.py
Log Message:
-----------
[#1871] Add function to extract table names from SQL statement
The function performs an EXPLAIN query with the provided statement and
parses its output looking for table names. It requires Postgres >= 9.x,
as it uses the FORMAT JSON option to get and parse a JSON objects.
Commit: 85663217da70339bf31dde76dba4b594ccee98c8
https://github.com/ckan/ckan/commit/85663217da70339bf31dde76dba4b594ccee98c8
Author: amercader <amercadero at gmail.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckanext/datastore/db.py
M ckanext/datastore/tests/test_search.py
Log Message:
-----------
[#1871] Disallow DataStore SQL queries involving system tables
Using the `get_table_names_from_sql` helper function before running the
provided statement, we raise a Validation error if some of the tables
start with `pg_`.
Commit: 370cc9bd0f0a4991c855a3fc952b1b131a5c1140
https://github.com/ckan/ckan/commit/370cc9bd0f0a4991c855a3fc952b1b131a5c1140
Author: amercader <amercadero at gmail.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckanext/datastore/tests/test_helpers.py
Log Message:
-----------
[#1871] Fix tests
PEP9 and skip the get table names tests if running on legacy mode.
Conflicts:
ckanext/datastore/tests/test_helpers.py
Commit: 7ddac4cc310ae0974a16ef4ecf6177a731f94bd6
https://github.com/ckan/ckan/commit/7ddac4cc310ae0974a16ef4ecf6177a731f94bd6
Author: amercader <amercadero at gmail.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckanext/datastore/tests/test_helpers.py
Log Message:
-----------
[#1871] Fix wrong call in tests
Commit: b43caad16d1e4d420c2b1a050255819b11fd01a3
https://github.com/ckan/ckan/commit/b43caad16d1e4d420c2b1a050255819b11fd01a3
Author: Sean Hammond <git at seanh.cc>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckan/lib/dictization/model_dictize.py
Log Message:
-----------
[#1902] Don't show private datasets to group members
1. User Sean creates organization my-org
2. Sean adds private dataset my-dataset to my-org
3. Sean creates group my-group
4. Sean adds private dataset my-dataset to my-group
5. Sean adds user Fred to my-group
6. The group_show API will now show the private dataset my-dataset to
Fred, even though Fred is not a member of my-org.
For some reason the private dataset does not show on the group's page,
but it does show in ther API.
This commit removes it from the API.
If backported this commit will also fix a problem present on 2.2 and
2.2.1 (but not master) that after following the steps above Fred will
see the private dataset on the site front page.
Arguably you should not be able to add private datasets to groups at
all, but you could add a public dataset to a group and then make the
dataset private and it would still belong to the group, so we do need to
filter private datasets out of groups.
Conflicts:
ckan/lib/dictization/model_dictize.py
Commit: b55f5f22f0729f3af791340e7d78793938d416b1
https://github.com/ckan/ckan/commit/b55f5f22f0729f3af791340e7d78793938d416b1
Author: Sean Hammond <git at seanh.cc>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckan/new_tests/logic/action/test_get.py
Log Message:
-----------
[#1902] Test that group_show() doesn't show private datasets
Conflicts:
ckan/new_tests/logic/action/test_get.py
Commit: 24cfc0a43a92110927ef64000017317891ecda32
https://github.com/ckan/ckan/commit/24cfc0a43a92110927ef64000017317891ecda32
Author: Sean Hammond <git at seanh.cc>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckan/new_tests/logic/action/test_get.py
Log Message:
-----------
[#1902] PEP8
Commit: 333e985653b51c2f15dd82696d31d0afedf98eaa
https://github.com/ckan/ckan/commit/333e985653b51c2f15dd82696d31d0afedf98eaa
Author: amercader <amercadero at gmail.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckan/new_tests/factories.py
Log Message:
-----------
Update test factories with the latest version from master
Otherwise is really difficult to keep tests on this branch up to date
Commit: 650e00661c2b180b902626f7fa2ed4e99554ccdb
https://github.com/ckan/ckan/commit/650e00661c2b180b902626f7fa2ed4e99554ccdb
Author: Vitor Baptista <vitor at vitorbaptista.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckan/tests/test_coding_standards.py
Log Message:
-----------
[#1697] Don't break PEP8 tests if test files have lines >79 chars
According to naming test methods [1] in our testing coding standards, we should
make the test names clear "...even if it means your method name gets really
long, since we don’t write code that calls our test methods there’s no
advantage to having short test method names". Given this, we shouldn't
validate E501 on our test suite.
[1] https://ckan.readthedocs.org/en/latest/contributing/testing.html#naming-test-methods
Commit: 6169678f9f16ab9e606c2032524304aa8ba3fba7
https://github.com/ckan/ckan/commit/6169678f9f16ab9e606c2032524304aa8ba3fba7
Author: Vitor Baptista <vitor at vitorbaptista.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckan/tests/test_coding_standards.py
Log Message:
-----------
[#1697] Revert blacklisted files removed in cc7e917
They still fail even without validating E501.
Commit: 0a97931a5d46018c721c29b2746c9c4eb8f1939d
https://github.com/ckan/ckan/commit/0a97931a5d46018c721c29b2746c9c4eb8f1939d
Author: Vitor Baptista <vitor at vitorbaptista.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckan/tests/test_coding_standards.py
Log Message:
-----------
[#1697] Unblacklist test files that are passing PEP8
Commit: 5a7c1005a405d684549413e7d9a3523b7750670f
https://github.com/ckan/ckan/commit/5a7c1005a405d684549413e7d9a3523b7750670f
Author: Vitor Baptista <vitor at vitorbaptista.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckan/new_tests/logic/action/test_update.py
M ckan/new_tests/logic/test_validators.py
M ckan/tests/functional/test_tracking.py
Log Message:
-----------
[#1697] Fix minor PEP8 issues
Commit: b2d9bdfc44af564ab72d7b6fd89d0957f19ce2e8
https://github.com/ckan/ckan/commit/b2d9bdfc44af564ab72d7b6fd89d0957f19ce2e8
Author: Vitor Baptista <vitor at vitorbaptista.com>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckan/tests/test_coding_standards.py
Log Message:
-----------
[#1697] Add comment explaining why we're ignoring E501 on tests
Commit: 9333abbc0c2cd3cebcd3b0e19c5eb2b3200e6aa7
https://github.com/ckan/ckan/commit/9333abbc0c2cd3cebcd3b0e19c5eb2b3200e6aa7
Author: Ian Ward <ian at excess.org>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M doc/python-coding-standards.rst
Log Message:
-----------
[#1745] remove lie about python 3 string formatting
Commit: ceb2808431991c5843732a04cdb2810ea57683c5
https://github.com/ckan/ckan/commit/ceb2808431991c5843732a04cdb2810ea57683c5
Author: Ian Ward <ian at excess.org>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M doc/python-coding-standards.rst
Log Message:
-----------
[#1745] nothing wrong with from module import name
Commit: 829437d1f01a3cf22074f1c600f30bdf8cecb86b
https://github.com/ckan/ckan/commit/829437d1f01a3cf22074f1c600f30bdf8cecb86b
Author: Ian Ward <ian at excess.org>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
M ckan/tests/test_coding_standards.py
M doc/python-coding-standards.rst
Log Message:
-----------
[#1745] recommend from module import name
Commit: 21e216409163f66c62ea50c639eb872157b53373
https://github.com/ckan/ckan/commit/21e216409163f66c62ea50c639eb872157b53373
Author: Ian Ward <ian at excess.org>
Date: 2014-10-02 (Thu, 02 Oct 2014)
Changed paths:
A doc/images/ckan_importing_diagram.graphml
A doc/images/ckan_importing_diagram.png
M doc/python-coding-standards.rst
Log Message:
-----------
[#1745] add importing diagram to imports section of coding guidelines
Compare: https://github.com/ckan/ckan/compare/7dcab5938c6b...21e216409163
More information about the ckan-changes
mailing list