You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Updated**
- changed the logger. No longer printing out to console information about the host, etc
- removed two parameters from `EventRegistry` constructor:
- `logging` - if you wish to log requests to file, please call now `EventRegistry.setLogging(True)`
- `printHostInfo` - if you wish to see the host info, call `logging.getLogger("eventregistry").setLevel(logging.DEBUG)`
- `checkVersion()` is no longer automatically called in `EventRegistry` constructor. If you wish to see if there is an updated version of the module, please call the method manually.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,15 @@
1
1
# Change Log
2
2
3
+
## [v8.12]() (2022-03-11)
4
+
5
+
**Updated**
6
+
- changed the logger. No longer printing out to console information about the host, etc
7
+
- removed two parameters from `EventRegistry` constructor:
8
+
- `logging` - if you wish to log requests to file, please call now `EventRegistry.setLogging(True)`
9
+
- `printHostInfo` - if you wish to see the host info, call `logging.getLogger("eventregistry").setLevel(logging.DEBUG)`
10
+
-`checkVersion()` is no longer automatically called in `EventRegistry` constructor. If you wish to see if there is an updated version of the module, please call the method manually.
11
+
12
+
3
13
## [v8.11]() (2022-01-05)
4
14
5
15
**Updated**
@@ -271,7 +281,7 @@
271
281
- Changed constructor parameters in `GetRecentEvents` and `GetRecentArticles`.
272
282
273
283
**Removed**
274
-
- removed `EventRegistry.login()` method to login the user. The user should authenticate using the API key that he can obtain on [his settings page](http://eventregistry.org/me?tab=settings).
284
+
- removed `EventRegistry.login()` method to login the user. The user should authenticate using the API key that he can obtain on [his settings page](https://newsapi.ai/dashboard).
print("Warning: The value of parameter '%s' was provided as a list and '%s' operator was used implicitly between the items. We suggest specifying the list using the QueryItems.AND() or QueryItems.OR() to ensure the appropriate operator is used."% (propName, defaultOperName))
229
+
logger.warning("Warning: The value of parameter '%s' was provided as a list and '%s' operator was used implicitly between the items. We suggest specifying the list using the QueryItems.AND() or QueryItems.OR() to ensure the appropriate operator is used."% (propName, defaultOperName))
# list of status codes - when we get them as a response from the call, we don't want to repeat the query as the response will likely always be the same
92
86
self._stopStatusCodes=set([
@@ -96,9 +90,6 @@ def __init__(self,
96
90
403, # Invalid account. The user's IP or account is disabled, potentially due to misuse.
97
91
])
98
92
99
-
# check what is the version of your module compared to the latest one
100
-
self.checkVersion()
101
-
102
93
103
94
defcheckVersion(self):
104
95
"""
@@ -113,9 +104,9 @@ def checkVersion(self):
113
104
currentVersion=_version.__version__
114
105
for (latest, current) inzip(latestVersion.split("."), currentVersion.split(".")):
115
106
ifint(latest) >int(current):
116
-
print("==============\nYour version of the module is outdated, please update to the latest version")
117
-
print("Your version is %s while the latest is %s"% (currentVersion, latestVersion))
118
-
print("Update by calling: pip install --upgrade eventregistry\n==============")
107
+
logger.info("==============\nYour version of the module is outdated, please update to the latest version")
108
+
logger.info("Your version is %s while the latest is %s"% (currentVersion, latestVersion))
109
+
logger.info("Update by calling: pip install --upgrade eventregistry\n==============")
119
110
return
120
111
# in case the server mistakenly has a lower version that the user has, don't report an error
121
112
elifint(latest) <int(current):
@@ -145,19 +136,14 @@ def getLastException(self):
145
136
146
137
147
138
defprintLastException(self):
148
-
print(str(self._lastException))
139
+
logger.error(str(self._lastException))
149
140
150
141
151
142
defformat(self, obj):
152
143
"""return a string containing the object in a pretty formated version"""
0 commit comments