Changelog#
Version 0.8.0#
To be released.
Python 3.4–3.7 are no more supported. The minimum supported Python version is Python 3.8. Instead, now it’s tested with Python 3.8–3.11.
Entity
andClient
became possible to be serialized usingpickle
. [#31]Fixed a typing bug that
Entity.label
andEntity.description
properties were incorrectly typed.wikidata.multilingual.MultilingualText
’s constructor became to take onlyLocale
for parameterlocale
.
Version 0.7.0#
Released on July 31, 2020.
Marked the package as supporting type checking by following PEP 561.
Now non-existent entities became able to be handled. [#11]
Added
EntityState
enum class.Added
Entity.state
attribute.Fixed a bug that raised
HTTPError
when non-existentEntity
was requested.
Languages (locales) became no more represented as
babel.core.Locale
, but representedwikidata.multilingual.Locale
instead. [#2, #27, #30 by Nelson Liu]Removed Babel from the dependencies.
Added
wikidata.multilingual.Locale
type.To replace the
babel.core.Locale
type, thewikidata.multilingual.Locale
type has been aliased to str. This is a breaking change for all Wikidata public API functions that formerly returned or ingestedbabel.core.Locale
.
Added support for
time
datatypes with precision 9 (year-only). [#26 by Nelson Liu]Added support for globe coordinate datatype. [#28 by Nelson Liu]
Added support for decoding the
globe-coordinate
datatype.Added
wikidata.globecoordinate
module.
Added support for quantity datatype. [#29 by Nelson Liu]
Added support for decoding the
quantity
datatype.Added
wikidata.quantity
module. [#29]
Fixed
KeyError
fromEntity.getlist()
if the property is explicitly associated with “no value”. [#18]Fixed a bug that raised
KeyError
when accessing an image more than once andMemoryCachePolicy
was enabled. [#24 by Héctor Cordobés]
Version 0.6.1#
Released on September 18, 2017.
Fixed
ImportError
on Python 3.4 due to lack oftyping
module. [#4]
Version 0.6.0#
Released on September 12, 2017.
Fixed
KeyError
fromClient.get()
on an entity is redirected to its canonical entity.
Version 0.5.4#
Released on September 18, 2017.
Fixed
ImportError
on Python 3.4 due to lack oftyping
module. [#4]
Version 0.5.3#
Released on June 30, 2017.
Fixed
ValueError
fromEntity.label
/Entity.description
with languages ISO 639-1 doesn’t cover (e.g.cbk-zam
). [#2]Although this fix prevents these properties from raising
ValueError
, it doesn’t completely fix the problem.babel.core.Locale
type, which Wikidata depends on, currently doesn’t supprot languages other than ISO 639-1. In order to completely fix the problem, we need to patch Babel to support them, or make Wikidata independent from Babel.
Version 0.5.2#
Released on June 28, 2017.
Fixed
AssertionError
from emptymultilingual_attribute
s.
Version 0.5.1#
Released on June 28, 2017.
Fixed
AssertionError
fromlen()
or iterating (iter()
) onEntity
objects with empty claims.
Version 0.5.0#
Released on June 13, 2017.
Wikidata API calls over network became possible to be cached.
Client
now hascache_policy
attribute and constructor option. Nothing is cached by default.Added
wikidata.cache
module andCachePolicy
interface in it. Two built-in implementation of the interface were added:NullCachePolicy
No-op.
MemoryCachePolicy
LRU cache in memory.
ProxyCachePolicy
Proxy/adapter to another proxy object. Useful for utilizing third-party cache libraries.
wikidata.client.Client.request
logger became to record logs about cache hits asDEBUG
level.
Version 0.4.4#
Released on June 30, 2017.
Fixed
ValueError
fromEntity.label
/Entity.description
with languages ISO 639-1 doesn’t cover (e.g.cbk-zam
). [#2]Although this fix prevents these properties from raising
ValueError
, it doesn’t completely fix the problem.babel.core.Locale
type, which Wikidata depends on, currently doesn’t supprot languages other than ISO 639-1. In order to completely fix the problem, we need to patch Babel to support them, or make Wikidata independent from Babel.
Version 0.4.3#
Released on June 28, 2017.
Fixed
AssertionError
from emptymultilingual_attribute
s.
Version 0.4.2#
Released on June 28, 2017.
Fixed
AssertionError
fromlen()
or iterating (iter()
) onEntity
objects with empty claims.
Version 0.4.1#
Released on April 30, 2017.
Fixed
AssertionError
fromgetlist()
on entities with empty claims.
Version 0.4.0#
Released on April 24, 2017.
Monolingual texts became able to be handled.
Added
MonolingualText
type which is a true subtype ofstr
.
Version 0.3.0#
Released on February 23, 2017.
Now
Client
became able to customize how it decodes datavalues to Python objects.Added
wikidata.datavalue
module andDecoder
class inside it.Added
datavalue_decoder
option toClient
.
Now files on Wikimeda Commons became able to be handled.
New decoder became able to parse Wikimedia Commons files e.g. images.
Added
wikidata.commonsmedia
module andFile
class inside it.
The meaning of
Client
constructor’sbase_url
prameter beccame not to contain the trailing pathwiki/
fromhttps://www.wikidata.org/wiki/
. As its meaning changed, the value ofWIKIDATA_BASE_URL
constant also changed to not have the trailing path.Added
load
option toClient.get()
method.
Version 0.2.0#
Released on February 19, 2017.
Made
Entity
multidict. Now it satisfiesMapping
[Entity
,object
] protocol.Added
Entity.type
property andEntityType
enum class to represent it.Added
entity_type_guess
option andguess_entity_type()
method toClient
class.Implemented
Hashable
protocol and==
/=
operators toEntity
for equality test.
Version 0.1.0#
Initial version. Released on February 15, 2017.