sedd 2.2.0__tar.gz → 2.2.2__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.
Files changed (35) hide show
  1. {sedd-2.2.0/sedd.egg-info → sedd-2.2.2}/PKG-INFO +3 -3
  2. {sedd-2.2.0 → sedd-2.2.2}/README.md +1 -2
  3. {sedd-2.2.0 → sedd-2.2.2}/pyproject.toml +2 -2
  4. {sedd-2.2.0 → sedd-2.2.2}/sedd/main.py +19 -7
  5. {sedd-2.2.0 → sedd-2.2.2}/sedd/ubo/ubo.py +3 -2
  6. {sedd-2.2.0 → sedd-2.2.2}/sedd/utils.py +2 -1
  7. {sedd-2.2.0 → sedd-2.2.2/sedd.egg-info}/PKG-INFO +3 -3
  8. {sedd-2.2.0 → sedd-2.2.2}/LICENSE +0 -0
  9. {sedd-2.2.0 → sedd-2.2.2}/README-python.md +0 -0
  10. {sedd-2.2.0 → sedd-2.2.2}/sedd/__init__.py +0 -0
  11. {sedd-2.2.0 → sedd-2.2.2}/sedd/__main__.py +0 -0
  12. {sedd-2.2.0 → sedd-2.2.2}/sedd/cli.py +0 -0
  13. {sedd-2.2.0 → sedd-2.2.2}/sedd/config/__init__.py +0 -0
  14. {sedd-2.2.0 → sedd-2.2.2}/sedd/config/config.py +0 -0
  15. {sedd-2.2.0 → sedd-2.2.2}/sedd/config/defaults.py +0 -0
  16. {sedd-2.2.0 → sedd-2.2.2}/sedd/config/typings.py +0 -0
  17. {sedd-2.2.0 → sedd-2.2.2}/sedd/data/__init__.py +0 -0
  18. {sedd-2.2.0 → sedd-2.2.2}/sedd/data/files_map.py +0 -0
  19. {sedd-2.2.0 → sedd-2.2.2}/sedd/data/sites.py +0 -0
  20. {sedd-2.2.0 → sedd-2.2.2}/sedd/driver.py +0 -0
  21. {sedd-2.2.0 → sedd-2.2.2}/sedd/meta/__init__.py +0 -0
  22. {sedd-2.2.0 → sedd-2.2.2}/sedd/meta/notifications.py +0 -0
  23. {sedd-2.2.0 → sedd-2.2.2}/sedd/pipscript.py +0 -0
  24. {sedd-2.2.0 → sedd-2.2.2}/sedd/ubo/__init__.py +0 -0
  25. {sedd-2.2.0 → sedd-2.2.2}/sedd/ubo/utils.py +0 -0
  26. {sedd-2.2.0 → sedd-2.2.2}/sedd/watcher/__init__.py +0 -0
  27. {sedd-2.2.0 → sedd-2.2.2}/sedd/watcher/handler.py +0 -0
  28. {sedd-2.2.0 → sedd-2.2.2}/sedd/watcher/observer.py +0 -0
  29. {sedd-2.2.0 → sedd-2.2.2}/sedd/watcher/state.py +0 -0
  30. {sedd-2.2.0 → sedd-2.2.2}/sedd.egg-info/SOURCES.txt +0 -0
  31. {sedd-2.2.0 → sedd-2.2.2}/sedd.egg-info/dependency_links.txt +0 -0
  32. {sedd-2.2.0 → sedd-2.2.2}/sedd.egg-info/entry_points.txt +0 -0
  33. {sedd-2.2.0 → sedd-2.2.2}/sedd.egg-info/requires.txt +0 -0
  34. {sedd-2.2.0 → sedd-2.2.2}/sedd.egg-info/top_level.txt +0 -0
  35. {sedd-2.2.0 → sedd-2.2.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sedd
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: Unofficial, community-made tool for downloading the Stack Exchange data dumps
5
5
  Author-email: LunarWatcher <oliviawolfie@pm.me>
6
6
  License-Expression: MIT
@@ -16,13 +16,13 @@ Classifier: Intended Audience :: Developers
16
16
  Classifier: Topic :: System :: Archiving
17
17
  Classifier: Topic :: Utilities
18
18
  Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
21
20
  Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Operating System :: POSIX :: Linux
23
23
  Classifier: Operating System :: MacOS
24
24
  Classifier: Operating System :: Microsoft :: Windows
25
- Requires-Python: >=3.10
25
+ Requires-Python: >=3.11
26
26
  Description-Content-Type: text/markdown
27
27
  License-File: LICENSE
28
28
  Requires-Dist: selenium==4.32.0
@@ -99,7 +99,7 @@ For some reason, connecting with a VPN offers just enough extra stability to avo
99
99
 
100
100
  ### Requirements
101
101
 
102
- - Python 3.10 or newer[^3]
102
+ - Python 3.11 or newer
103
103
  - `pip3 install -r requirements.txt`
104
104
  - Lots of storage. The 2024Q1 data dump was 92GB compressed.
105
105
  - A display you can access somehow (physical or virtual, but you need to be able to see it) to be able to solve captchas
@@ -331,4 +331,3 @@ The data downloaded and produced is under various versions of [CC-By-SA](https:/
331
331
 
332
332
  [^1]: I've been unable to find the generator code, but I've also been unable to find a statement confirming that it's closed-source. It's possible it is open-source, but if it is, it's hard to find the source
333
333
  [^2]: Only Postgres at the time of writing, with more planned
334
- [^3]: Might work with earlier versions, but these are untested and not supported
@@ -28,7 +28,7 @@ authors = [
28
28
  ]
29
29
 
30
30
  description = "Unofficial, community-made tool for downloading the Stack Exchange data dumps"
31
- requires-python = ">=3.10"
31
+ requires-python = ">=3.11"
32
32
  classifiers = [
33
33
  "Development Status :: 5 - Production/Stable",
34
34
  "Environment :: Console",
@@ -36,9 +36,9 @@ classifiers = [
36
36
  "Topic :: System :: Archiving",
37
37
  "Topic :: Utilities",
38
38
  "Programming Language :: Python :: 3",
39
- "Programming Language :: Python :: 3.10",
40
39
  "Programming Language :: Python :: 3.11",
41
40
  "Programming Language :: Python :: 3.12",
41
+ "Programming Language :: Python :: 3.13",
42
42
  "Operating System :: POSIX :: Linux",
43
43
  "Operating System :: MacOS",
44
44
  "Operating System :: Microsoft :: Windows",
@@ -270,6 +270,7 @@ def await_date_change(args: SEDDCLIArgs, driver):
270
270
  site = "https://stackoverflow.com"
271
271
 
272
272
  failed: bool = False
273
+ seconds_in_hour = 60 * 60
273
274
  while True:
274
275
  browser.get(f"{site}/users/data-dump-access/current")
275
276
  if "page not found" in browser.title.lower():
@@ -280,6 +281,22 @@ def await_date_change(args: SEDDCLIArgs, driver):
280
281
  failed = True
281
282
  continue
282
283
 
284
+ if browser.current_url.endswith("/error"):
285
+ logger.error(
286
+ "Redirected to /error; SE fucked something up. Update failed, "
287
+ "trying again in 3 hours"
288
+ )
289
+ sleep(
290
+ # 3 hours
291
+ seconds_in_hour * 3
292
+ # + some jitter
293
+ + random.randint(
294
+ -seconds_in_hour,
295
+ seconds_in_hour
296
+ )
297
+ )
298
+ continue
299
+
283
300
  failed = False
284
301
 
285
302
  try:
@@ -382,14 +399,9 @@ except KeyboardInterrupt:
382
399
  pass
383
400
 
384
401
  except:
385
- exception = sys.exc_info()
386
-
387
- try:
388
- print_exception(exception)
389
- except:
390
- logger.error(exception)
391
-
402
+ print_exception(sys.exception())
392
403
  browser.quit()
404
+ exit(-1)
393
405
  finally:
394
406
  # TODO: replace with validation once downloading is verified done
395
407
  # (or export for separate, later verification)
@@ -1,6 +1,7 @@
1
1
  from selenium.webdriver import Firefox
2
- from sys import exc_info
3
2
  from time import sleep
3
+ import traceback
4
+ import sys
4
5
 
5
6
  from ..config import SEDDConfig
6
7
  from .utils import ubo_set_user_settings, \
@@ -32,4 +33,4 @@ def init_ubo_settings(browser: Firefox, config: SEDDConfig, ubo_id: str) -> bool
32
33
  ubo_reload_all_filters(browser)
33
34
  except:
34
35
  logger.error('Failed to set uBlock config, using defaults')
35
- logger.error(exc_info())
36
+ traceback.print_exception(sys.exception())
@@ -4,6 +4,7 @@ from urllib.parse import urlparse
4
4
  import os.path
5
5
  import re
6
6
  import sys
7
+ import traceback
7
8
 
8
9
  from .data.files_map import files_map, inverse_files_map
9
10
  from .data.sites import sites
@@ -78,7 +79,7 @@ def cleanup_archive(base_path: str) -> None:
78
79
  entry_path = os.path.join(base_path, entry)
79
80
  os.remove(entry_path)
80
81
  except:
81
- print(sys.exc_info())
82
+ traceback.print_exception(sys.exception())
82
83
 
83
84
 
84
85
  def is_file_downloaded(base_path: str, site_or_url: str) -> bool:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sedd
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: Unofficial, community-made tool for downloading the Stack Exchange data dumps
5
5
  Author-email: LunarWatcher <oliviawolfie@pm.me>
6
6
  License-Expression: MIT
@@ -16,13 +16,13 @@ Classifier: Intended Audience :: Developers
16
16
  Classifier: Topic :: System :: Archiving
17
17
  Classifier: Topic :: Utilities
18
18
  Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
21
20
  Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Operating System :: POSIX :: Linux
23
23
  Classifier: Operating System :: MacOS
24
24
  Classifier: Operating System :: Microsoft :: Windows
25
- Requires-Python: >=3.10
25
+ Requires-Python: >=3.11
26
26
  Description-Content-Type: text/markdown
27
27
  License-File: LICENSE
28
28
  Requires-Dist: selenium==4.32.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes