PropertyPage.get() fails

PropertyPage method get attempts to set 'type', which is a
property of superclass Property that does not have a setter, resulting
in an AttributeError:

    self.type = self._content['datatype']
AttributeError: can't set attribute

Fix by putting the datatype into the underlying _type attribute.

Also use the 'type' property in PropertyPage.newClaim so that each newly
created Claim does not need to fetch the property type.

Change-Id: I845ec3ad91017e386e568ee5bcb85fd48644adfb
site.py: check if site is enabled for uploads

Fix Bug 69090: upload.py attempts uploads on wikis that
don't allow uploads.

Check APIError code to determine if Site is enabled for uploading.
Currently it is done and cached at first upload attempt.

Added also a helper function is_uploaddisabled() to determine if a site
has uploads enabled, based on a dummy upload attempt.
Throttle has been disabled for such request to speed up the query
(implementation taken from I80b2bba9e63832173d5b697db1f4ea419ca1122f).

Change-Id: Id8ae0cd51582d76b7bdd15c53e39b4105995b540
[FEAT] Handle API warnings

Some code parses the warnings returned by the API separately like
Siteinfo. This option adds the possibility to handle warnings
returned by the api via "_warning_handler". If it's not a method
or that method returns not True the warning is still output like
before (and is by default). The method must accept two parameters
and is executed for each warning.

This also shows warnings when CachedRequest are used and not only
for the first actually submitted request.

Change-Id: I62d13dca5b592bddf72dbbdcc0b8edf77c0059ed
[FIX] Travis: Add account for test.wiki(data/pedia)

This account is required to do tests on wikidata introduced in
c07c8da00cef8e189762ccf4f46422f6bb6f5d5f borrowed from
I1e1ce836f35acb270c78331f1ec9c57f8ce4c0e2.

Change-Id: Ief9c3e60e4e31e38ef149c97e8a72c55fc5eb273
Determine entity namespaces for site using API

Remove hardcoded namespace numbers for 0 and 120
replacing them with values obtained via existing
siprop=namespaces query by new Namespace class.

Move namespace=0 title reparsing into ItemPage.

Description of class PropertyPage should not recommend
including namespace in the title as namespace is and was
already provided.

Change-Id: If7ca06adbb4b9932bba0abffc7588afcb320e934
Merge "site.py: check if site is enabled for uploads"
fileIsShared fails on sites with shared file repo

"missing" exists in page dict when the file is shared.

KeyError occurs for file on a shared repo if the file
is not a local file.  To prevent KeyError, check if
'imageinfo' exists first, then if 'missing' exists
the page does not exist.

Bug: 70494
Change-Id: I2cfbbd2434cb03600c9d53e648e0534f05756d46
Require login for two site methods

Also purgepages was recently added as a API 'write' action
which asserts it must be performed by a logged in user.

is_uploaddisabled added recently for bug 69090 only
works if the user is logged in, otherwise the assert
module returns an error before the upload module can
respond.  Re-raise any API error that is_uploaddisabled
is not expecting.

Use test projects to test is_uploaddisabled, as the
travis config already has username's for those sites.

Change-Id: I009260c9476852cc8ee818aa791fd15f1dc05ec1
Merge "[FEAT] Handle API warnings"
pep257-D205 fixes in pywikibot/

Fixes all D205 issues within the library,
and miscellaneous pep257 issues in the same code.

Also changes wikidataquery.Query.__str__ to raise
NotImplementedError instead of NotImplemented.

Change-Id: I1bd1375ffe01025b43c307cd1828471fbb5e05d9
Merge "pep257-D205 fixes in pywikibot/"
[FIX] Page: Lowercase shortcuts to identify which option is default

Change-Id: Ida27d3bbadcd63a35058598153c114bbf5c43ae1
[FEAT] Support new token system

With fdddf94570efc33fd06f16c72d41636a45cf203a the token system was
overhauled. This queries with the new token system if the version
is new enough (>= 1.24wmf19).

If the token type is not one of the listed in the api help it is
defaulting to 'csrf'.

Bug: 70060
Change-Id: I54fc1d7ad083f12b80ef52ddb7be592fa82b6b2a
Deprecate SSL override configuration

No sites use this functionality, as wikimedia sites changed from
a https://secure.wikimedia.org front-end processor to using https
on the target wiki.

Also remove the 'ssl' override parameter from http.request.
The ssl param was only used with the site parameter, to support the
configuration variables, and was ignored if a uri was provided.

Change-Id: I5834ca17972e888886d15524098331cd8839f1da
[sync] Synchronize version with compat using "'" instead of '"'

Change-Id: Ie0be0baa5eea030449b5c16d30a68ff3865aa3cf
Merge "PropertyPage.get() fails"
Merge "[FEAT] Support new token system"
Merge "Deprecate SSL override configuration"
Merge "fileIsShared fails on sites with shared file repo"
[IMPROV] Tests: Use assert(Less/Greater)(Equal)

Change-Id: Iac6903d557f3f90ea6130958fb49f31b7c5ad026