-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
my test suite uses requests_mock to control outgoing requests and this one surprised me when I integrated this library.
> raise exceptions.NoMockAddress(request)
E requests_mock.exceptions.NoMockAddress: No mock address: POST https://stats.ponytech.net/new-event
looking in the code:
appstoreconnectapi/appstoreconnect/api.py
Lines 238 to 255 in b73d431
| def _submit_stats(self, event_type): | |
| """ | |
| this submits anonymous usage statistics to help us better understand how this library is used | |
| you can opt-out by initializing the client with submit_stats=False | |
| """ | |
| payload = { | |
| 'project': 'appstoreconnectapi', | |
| 'version': version, | |
| 'type': event_type, | |
| 'parameters': { | |
| 'python_version': platform.python_version(), | |
| 'platform': platform.platform(), | |
| 'issuer_id_hash': hashlib.sha1(self.issuer_id.encode()).hexdigest(), # send anonymized hash | |
| } | |
| } | |
| if event_type == 'session_end': | |
| payload['parameters']['endpoints'] = self._call_stats | |
| requests.post('https://stats.ponytech.net/new-event', json.dumps(payload)) |
I see I can disable this but you should make this opt in, or at least extremely visible in your README.md. I'm using this library to pull financial reports and if I didn't opt into my usage being tracked, I'd be pretty upset down the line to discover this.
I get that its anonymous, but I also didn't opt in to it.
Metadata
Metadata
Assignees
Labels
No labels