tradedangerous 11.1.3__py3-none-any.whl → 11.1.5__py3-none-any.whl

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.

Potentially problematic release.


This version of tradedangerous might be problematic. Click here for more details.

trade.py CHANGED
@@ -35,10 +35,10 @@
35
35
  # to empower other programmers to do cool stuff.
36
36
  from tradedangerous import cli
37
37
 
38
+ import sys
39
+
38
40
  def main(argv = None):
39
- import sys
40
- cli.main(sys.argv)
41
+ cli.main(sys.argv)
41
42
 
42
43
  if __name__ == "__main__":
43
- import sys
44
- cli.main(sys.argv)
44
+ cli.main(sys.argv)
@@ -199,7 +199,7 @@ if __name__ == '__main__':
199
199
  print("Simple usage:")
200
200
  present()
201
201
 
202
- #print()
203
- #print("Adding age ColumnFormat:")
204
- #rowFmt.append(after='Name', col=ColumnFormat("Age", '>', 3, pre='|', post='|', key=lambda row: row['age']))
205
- #present()
202
+ # print()
203
+ # print("Adding age ColumnFormat:")
204
+ # rowFmt.append(after='Name', col=ColumnFormat("Age", '>', 3, pre='|', post='|', key=lambda row: row['age']))
205
+ # present()
@@ -12,39 +12,18 @@ from ..plugins import PluginException
12
12
  import certifi
13
13
  import csv
14
14
  import datetime
15
+ from email.utils import parsedate_to_datetime
15
16
  import os
16
17
  import requests
17
18
  import sqlite3
18
19
  import ssl
19
20
  import typing
20
- import locale
21
- import platform
22
21
 
23
22
 
24
23
  if typing.TYPE_CHECKING:
25
24
  from typing import Optional
26
25
  from .. tradeenv import TradeEnv
27
26
 
28
- # Find the first English UTF-8 locale for use in parsing timestamps.
29
- LOCALE = None
30
- if platform.system() == 'Windows':
31
- for lang in locale.windows_locale.values():
32
- if "en" in lang:
33
- LOCALE = lang
34
- break
35
- else:
36
- # for other operating systems
37
- for lang in locale.locale_alias.values():
38
- if "en" in lang and "UTF-8" in lang:
39
- LOCALE = lang
40
- break
41
- if not LOCALE:
42
- raise PluginException(
43
- "Unable to find compatible locale.\n" +
44
- "This plugin needs an English, UTF-8 compatible " +
45
- "locale installed in order to function correctly.\n" +
46
- "Please refer to your OS for instructions installing one."
47
- )
48
27
  # Constants
49
28
  BASE_URL = os.environ.get('TD_SERVER') or "https://elite.tromador.com/files/"
50
29
  CONTEXT=ssl.create_default_context(cafile=certifi.where())
@@ -181,17 +160,15 @@ class ImportPlugin(plugins.ImportPluginBase):
181
160
  # Use an HTTP Request header to obtain the Last-Modified and Content-Length headers.
182
161
  # Also, tell the server to give us the un-compressed length of the file by saying
183
162
  # that >this< request only wants text.
184
- headers = {"User-Agent": "Trade-Dangerous", "Accept-Encoding": "text"}
163
+ headers = {"User-Agent": "Trade-Dangerous", "Accept-Encoding": "identity"}
185
164
  try:
186
165
  response = requests.head(url, headers=headers, timeout=70)
187
166
  except Exception as e: # pylint: disable=broad-exception-caught
188
167
  self.tdenv.WARN("Problem with download:\n URL: {}\n Error: {}", url, str(e))
189
168
  return False
190
169
 
191
- locale.setlocale(locale.LC_ALL, LOCALE)
192
170
  last_modified = response.headers.get("last-modified")
193
- dump_mod_time = datetime.datetime.strptime(last_modified, "%a, %d %b %Y %H:%M:%S %Z").timestamp()
194
- locale.setlocale(locale.LC_ALL, '')
171
+ dump_mod_time = parsedate_to_datetime(last_modified).timestamp()
195
172
 
196
173
  if Path.exists(localPath):
197
174
  local_mod_time = localPath.stat().st_mtime
@@ -352,8 +329,6 @@ class ImportPlugin(plugins.ImportPluginBase):
352
329
  self.tdenv.NOTE("Finished processing market data. End time = {}", self.now())
353
330
 
354
331
  def run(self):
355
- self.tdenv.DEBUG2(f'Using "{LOCALE}" locale for parsing modified timestamps. Please include this information in any error reports.')
356
-
357
332
  self.tdenv.ignoreUnknown = True
358
333
 
359
334
  # Create the /eddb folder for downloading the source files if it doesn't exist.
tradedangerous/version.py CHANGED
@@ -12,5 +12,5 @@
12
12
  """just keeper of current version"""
13
13
 
14
14
  # TODO: remember to update tests when version changes
15
- __version__ = '11.1.3'
15
+ __version__ = '11.1.5'
16
16
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tradedangerous
3
- Version: 11.1.3
3
+ Version: 11.1.5
4
4
  Summary: Trade-Dangerous is a set of powerful trading tools for Elite Dangerous, organized around one of the most powerful trade run optimizers available.
5
5
  Home-page: https://github.com/eyeonus/Trade-Dangerous
6
6
  Author: eyeonus
@@ -1,4 +1,4 @@
1
- trade.py,sha256=vBEJZR3Bybesw9FMelcHOTRA7KqKeH-4_wqbJ4VMB_E,1779
1
+ trade.py,sha256=Skqy0bC47g1KujuYrVwa3T8AfJ9NoLLOZcVjjxJ2daQ,1769
2
2
  tradegui.py,sha256=q2HdIdoyeLUpeF2X0hVIGn7sU6T4zOzq1HN0zGvZdyE,788
3
3
  tradedangerous/__init__.py,sha256=bwsbE_GyCNsuyGDKnfXAg0RD-ewsWHliySJ5QfCK7h8,1166
4
4
  tradedangerous/cache.py,sha256=N7z1e2fov003wIh_aHkw1pdByKDPt3FkDZiH_EEPdMc,36080
@@ -7,7 +7,7 @@ tradedangerous/corrections.py,sha256=_WLgo1IBWoskrrPFeshRwCOeJ2BeJb_x4tDQ0JdAo-s
7
7
  tradedangerous/csvexport.py,sha256=_19bGVnCGJPzvx_8DzLGOs4rqx8Asn7eCVdXKdKu92E,8653
8
8
  tradedangerous/edscupdate.py,sha256=G8N-j61MZbCgY07WIVK23CCw6eMPE3WkraXHeARt9QE,17297
9
9
  tradedangerous/edsmupdate.py,sha256=jpDUxUkDKxlG_gS3qWy5fg9p3mBPC-akU2pHSlfTPkI,14915
10
- tradedangerous/formatting.py,sha256=-FdlH1yMKPkqhpCtKmbl0chbyZ1VjKZsZ8OLc8v-Knc,6927
10
+ tradedangerous/formatting.py,sha256=K3XL_mZJ4cAiTTTmJmTXK7ePYzzsSxg7EoBVFh7gj60,6931
11
11
  tradedangerous/fs.py,sha256=_5OJHIRy_M-WFHEZO4g2EIgqDxdrz4s8tcdDmgG7NME,2494
12
12
  tradedangerous/gui.py,sha256=DFsF5zATr-lyJShL6t5kPKvcLLJYkICurzBz0WBa-oQ,43676
13
13
  tradedangerous/jsonprices.py,sha256=V9Xm3pocQfEHoC38VYWomzbwX0wu9R2zJ2gB99JzYPQ,7212
@@ -21,7 +21,7 @@ tradedangerous/tradeenv.py,sha256=SDzRC6ERYZzzb_I6uexmFpFJJrnbzXa-1ogYt_GH26w,10
21
21
  tradedangerous/tradeexcept.py,sha256=aZ-Y31MbkjF7lmAzBAbaMsPPE7FEEfuf4gaX2GvriDk,368
22
22
  tradedangerous/transfers.py,sha256=KwskYBB5_TYDXx5fkN1ABYsPuPnICKdkEx0WUfC7BnA,8378
23
23
  tradedangerous/utils.py,sha256=PUPvAEqUyxYGqqQa0b_yfLAvq8YVUxK6HfdS-CxM-Lo,5186
24
- tradedangerous/version.py,sha256=ghxPDFkK4akB_kG7EbpxFhrsQPs8VjNqdIUWHOPecuc,646
24
+ tradedangerous/version.py,sha256=RW4r1F63KW3hk-PZN1UtKuplBR5kfZV1j0tMS5F4kaw,646
25
25
  tradedangerous/commands/TEMPLATE.py,sha256=MOE69xsZPHPIMBQ-LXicfsOlCZdy-2gPX_nlnwYYil8,2026
26
26
  tradedangerous/commands/__init__.py,sha256=3gz2cnXNZNkV1gtZh0dOnCRxBkQHbeIyysRe3bM2WEE,9516
27
27
  tradedangerous/commands/buildcache_cmd.py,sha256=jhNSqHX_xX43SiSUMFiKtWpB9v4oeZ0sqfNq6DCrjUs,2181
@@ -62,7 +62,7 @@ tradedangerous/misc/progress.py,sha256=NKvKP1OSCTpItc1CNxDuEH2A1oGJ6aWSyCdPSAjsG
62
62
  tradedangerous/plugins/__init__.py,sha256=TL-OIptlqNENKhoFqkFeBJn_vSw8L0pVaDJgjhaTj7A,7860
63
63
  tradedangerous/plugins/edapi_plug.py,sha256=5nqBYmjUceAt-KTfiBn7IEl443R1SsGLDmfVXgbcyms,42262
64
64
  tradedangerous/plugins/edcd_plug.py,sha256=JuDtuEM_mN9Sz2H09-qYizM-9N3cuNjgvQy7Y-wHwKw,14412
65
- tradedangerous/plugins/eddblink_plug.py,sha256=xK5snHevw8BIFfpYNtrJYRQekDD0DYkp62kcxSrkZ-8,22883
65
+ tradedangerous/plugins/eddblink_plug.py,sha256=EOqUAwbIpQztbhLstFkgOdIgVFCyquSGYmtRr_6PYDY,21931
66
66
  tradedangerous/plugins/edmc_batch_plug.py,sha256=rrP_lFFxWsba8DPEo0WF2EdCiMoRC7tCT8z62MIvtIo,4173
67
67
  tradedangerous/plugins/journal_plug.py,sha256=5HMyoxQ7z42qj7NiL8rDxSyTN9gKikoQjyWzJLD-SYQ,23746
68
68
  tradedangerous/plugins/netlog_plug.py,sha256=yUl47l9xt3kGj9oSiY_FZaDGdnQj63oa9MBtSeIy1Zo,13469
@@ -71,9 +71,9 @@ tradedangerous/templates/Added.csv,sha256=8o54civQCcS9y7_DBo0GX196XWRbbREQqKDYTK
71
71
  tradedangerous/templates/Category.csv,sha256=8xwUDcBZE25T6x6dZGlRUMTCqeDLt3a9LXU5h6hRHV8,250
72
72
  tradedangerous/templates/RareItem.csv,sha256=F1RhRnTD82PiwrVUO-ai2ErGH2PTqNnQaDw5mcgljXs,10483
73
73
  tradedangerous/templates/TradeDangerous.sql,sha256=VlQK7QGtEi2brGtWaIZDvKmbJ_vLocD4CJ8h_6kKptU,7808
74
- tradedangerous-11.1.3.dist-info/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
75
- tradedangerous-11.1.3.dist-info/METADATA,sha256=_YJd9yECrUzNkslTW4-PSLUoJPuS_EJIV3Dkxdymyq0,4435
76
- tradedangerous-11.1.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
77
- tradedangerous-11.1.3.dist-info/entry_points.txt,sha256=lrA7U9JHOcNuam2WEK4Hmc3vQ3mrJfsbJCE74qd9au8,62
78
- tradedangerous-11.1.3.dist-info/top_level.txt,sha256=JEoOVAhg5GfXZ4kHpNontu0RVzek_7P9_jp93f3Pqn8,16
79
- tradedangerous-11.1.3.dist-info/RECORD,,
74
+ tradedangerous-11.1.5.dist-info/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
75
+ tradedangerous-11.1.5.dist-info/METADATA,sha256=vL1cKyh5Qp1R9sHAv_mlmJgU-vqjEQQumPuyibG-Wew,4435
76
+ tradedangerous-11.1.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
77
+ tradedangerous-11.1.5.dist-info/entry_points.txt,sha256=lrA7U9JHOcNuam2WEK4Hmc3vQ3mrJfsbJCE74qd9au8,62
78
+ tradedangerous-11.1.5.dist-info/top_level.txt,sha256=JEoOVAhg5GfXZ4kHpNontu0RVzek_7P9_jp93f3Pqn8,16
79
+ tradedangerous-11.1.5.dist-info/RECORD,,