tradedangerous 11.0.1__py3-none-any.whl → 11.0.3__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.

@@ -60,7 +60,7 @@ class PadSizeArgument(int):
60
60
  'dest': 'padSize',
61
61
  'metavar': 'PADSIZES',
62
62
  'type': 'padsize',
63
- 'choices': 'SML?',
63
+ 'choices': 'SsMmLl?',
64
64
  }
65
65
 
66
66
 
@@ -153,7 +153,7 @@ class PlanetaryArgument(int):
153
153
  'dest': 'planetary',
154
154
  'metavar': 'PLANETARY',
155
155
  'type': 'planetary',
156
- 'choices': 'YN??',
156
+ 'choices': 'YyNn?',
157
157
  }
158
158
 
159
159
 
@@ -181,7 +181,7 @@ class FleetCarrierArgument(int):
181
181
  'dest': 'fleet',
182
182
  'metavar': 'FLEET',
183
183
  'type': 'fleet',
184
- 'choices': 'YN?',
184
+ 'choices': 'YyNn?',
185
185
  }
186
186
 
187
187
  class OdysseyArgument(int):
@@ -208,7 +208,7 @@ class OdysseyArgument(int):
208
208
  'dest': 'odyssey',
209
209
  'metavar': 'ODYSSEY',
210
210
  'type': 'odyssey',
211
- 'choices': 'YN?',
211
+ 'choices': 'YyNn?',
212
212
  }
213
213
 
214
214
 
@@ -4,19 +4,7 @@ from collections import namedtuple
4
4
  from urllib.request import Request, urlopen
5
5
 
6
6
  import json
7
-
8
- try:
9
- import requests
10
- except ImportError as e:
11
- import pip
12
- print("ERROR: Unable to load the Python 'requests' package.")
13
- approval = input(
14
- "Do you want me to try and install it with the package manager (y/n)? "
15
- )
16
- if approval.lower() != 'y':
17
- raise e
18
- pip.main(["install", "--upgrade", "requests"])
19
- import requests
7
+ import requests
20
8
 
21
9
 
22
10
  def edsc_log(apiCall, params, jsonData=None, error=None):
@@ -6,19 +6,7 @@ uses EDSM - https://www.edsm.net/api
6
6
  """
7
7
 
8
8
  import json
9
-
10
- try:
11
- import requests
12
- except ImportError as e:
13
- import pip
14
- print("ERROR: Unable to load the Python 'requests' package.")
15
- approval = input(
16
- "Do you want me to try and install it with the package manager (y/n)? "
17
- )
18
- if approval.lower() != 'y':
19
- raise e
20
- pip.main(["install", "--upgrade", "requests"])
21
- import requests
9
+ import requests
22
10
 
23
11
 
24
12
  def edsm_log(apiCall, url, params, jsonData=None, error=None):
@@ -355,7 +355,7 @@ class ImportPlugin(plugins.ImportPluginBase):
355
355
 
356
356
  # We can probably safely assume that the plugin has never been run if
357
357
  # the prices file doesn't exist, since the plugin always generates it.
358
- if not (self.tdb.dataPath / Path("TradeDangerous.prices")).exists():
358
+ if not (self.tdb.dataPath / Path("TradeDangerous.db")).exists():
359
359
  self.options["clean"] = True
360
360
 
361
361
  if self.getOption("clean"):
@@ -208,7 +208,7 @@ class ImportPlugin(plugins.ImportPluginBase):
208
208
  assert not (self.url and self.file), 'Provide either url or file, not both'
209
209
  if self.file and (self.file != '-'):
210
210
  self.file = (Path(self.tdenv.cwDir, self.file)).resolve()
211
- if not Path(self.tdb.dataPath, "TradeDangerous.prices").exists():
211
+ if not Path(self.tdb.dataPath, "TradeDangerous.db").exists():
212
212
  ri_path = Path(self.tdb.dataPath, "RareItem.csv")
213
213
  rib_path = ri_path.with_suffix(".tmp")
214
214
  if ri_path.exists():
@@ -16,6 +16,7 @@ import argparse
16
16
  import os
17
17
  import random
18
18
  import re
19
+ import requests
19
20
  import sys
20
21
  import tradedb
21
22
  import tradeenv
@@ -23,30 +24,6 @@ import tradeenv
23
24
  from misc.edsc import StarSubmission, StarSubmissionResult, SubmissionError
24
25
  from misc.clipboard import SystemNameClip
25
26
 
26
- try:
27
- import requests
28
- except ImportError as e:
29
- print("""ERROR: Unable to load the Python 'requests' package.
30
-
31
- This script uses a Python module/package called 'requests' to allow
32
- it to talk to the EDSC web service. This package is not installed
33
- by default, but it can be installed with Python's package manager (pip).
34
-
35
- You can either install/update it yourself, e.g.:
36
-
37
- pip install --upgrade requests
38
-
39
- or if you like, I can try and install it for you now
40
- """)
41
- approval = input(
42
- "Do you want me to try and install it with the package manager (y/n)? "
43
- )
44
- if approval.lower() != 'y':
45
- print("You didn't type 'y' so I'm giving up.")
46
- raise e
47
- import pip
48
- pip.main(["install", "--upgrade", "requests"])
49
- import requests # noqa: F401
50
27
 
51
28
  standardStars = [
52
29
  "SOL",
@@ -1,82 +1,15 @@
1
+ import csv
2
+ import json
3
+ import time
4
+
1
5
  from collections import deque
2
6
  from pathlib import Path
3
7
  from .tradeexcept import TradeException
4
-
5
- import csv
6
- import json
7
8
  from .misc import progress as pbar
8
- import platform # noqa: F401
9
9
  from . import fs
10
- import time
11
- import subprocess
12
- import sys
13
10
 
14
- try:
15
- import requests
16
- __requests = requests
17
- except ImportError:
18
- __requests = None
11
+ import requests
19
12
 
20
- def import_requests():
21
- global __requests
22
- if __requests:
23
- return __requests
24
-
25
- if platform.system() == 'Linux':
26
- extra = (
27
- "Ubuntu users: You may be able to install 'pip'\n"
28
- "with 'apt-get install python3-pip' and requests with\n"
29
- "'pip3 install --upgrade requests'.\n"
30
- )
31
- elif platform.system() == 'Windows':
32
- extra = (
33
- "\n\nThe requests package can be installed with\n"
34
- "'pip3 install --upgrade requests'.\n\n"
35
- "If requests is installed, you may have bits\n"
36
- "of 32-bit and 64-bit Python installed.\n"
37
- "Consider using control panel to uninstall Python,\n"
38
- "delete the Python folder (usually C:\\Python34\\),\n"
39
- "and then re-install Python.\n"
40
- )
41
- else:
42
- extra = ""
43
-
44
- print(
45
- "ERROR: Unable to load the Python 'requests' package.\n" + extra
46
- )
47
- approval = input(
48
- "I can try and install the package automatically using 'pip'.\n"
49
- "Try to install 'requests' now (y/n)? "
50
- )
51
- # Idiot-proofing: take just the first character in case the user typed
52
- # 'YES' (upper or lower case) instead of 'Y'.
53
- if approval[0:1].lower() != 'y':
54
- raise TradeException("Missing package: 'requests'")
55
-
56
- try:
57
- import pip # noqa: F401 # pylint: disable=unused-import
58
- except ImportError as e:
59
- raise TradeException(
60
- "Python 3.4.2 includes a package manager called 'pip', "
61
- "except it doesn't appear to be installed on your system:\n"
62
- "{}{}".format(str(e), extra)
63
- ) from None
64
-
65
- # Let's use "The most reliable approach, and the one that is fully supported."
66
- # Especially since the old way produces an error for me on Python 3.6:
67
- # "AttributeError: 'module' object has no attribute 'main'"
68
- # pip.main(["install", "--upgrade", "requests"])
69
- subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'requests'])
70
-
71
- try:
72
- import requests # pylint: disable=redefined-outer-name
73
- __requests = requests
74
- except ImportError as e:
75
- raise TradeException(
76
- f"The requests module did not install correctly ({e}).{extra}"
77
- ) from None
78
-
79
- return __requests
80
13
 
81
14
  ######################################################################
82
15
  # Helpers
@@ -125,7 +58,6 @@ def download(
125
58
  function to call on the first line
126
59
  """
127
60
 
128
- requests = import_requests() # pylint: disable=redefined-outer-name
129
61
  tdenv.NOTE("Requesting {}".format(url))
130
62
  req = requests.get(url, headers=headers or None, stream=True, timeout=timeout)
131
63
  req.raise_for_status()
@@ -238,7 +170,6 @@ def get_json_data(url, *, timeout: int = 90):
238
170
  Displays a progress bar as it downloads.
239
171
  """
240
172
 
241
- requests = import_requests() # pylint: disable=redefined-outer-name
242
173
  req = requests.get(url, stream=True, timeout=timeout)
243
174
 
244
175
  totalLength = req.headers.get('content-length')
@@ -279,7 +210,6 @@ class CSVStream:
279
210
  self.url = url
280
211
  self.tdenv = tdenv
281
212
  if not url.startswith("file:///"):
282
- requests = import_requests() # pylint: disable=redefined-outer-name
283
213
  self.req = requests.get(self.url, stream=True, timeout=timeout)
284
214
  self.lines = self.req.iter_lines()
285
215
  else:
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.0.1'
15
+ __version__ = '11.0.3'
16
16
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tradedangerous
3
- Version: 11.0.1
3
+ Version: 11.0.3
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
@@ -11,7 +11,7 @@ tradedangerous/gui.py,sha256=DFsF5zATr-lyJShL6t5kPKvcLLJYkICurzBz0WBa-oQ,43676
11
11
  tradedangerous/jsonprices.py,sha256=GAaNbfEs1LX_F5f69MiEhHIEwoGZtubGC8EQ9MM4B9A,6878
12
12
  tradedangerous/mapping.py,sha256=eGBQeYPD04Kq_ygZCDRafKMGz9EnxSgXUzQU-u78_2A,4049
13
13
  tradedangerous/prices.py,sha256=JqiDVrtvvPd5pqE3HdwOHOuFgdAbOR-pt0GLD3ZIXM8,7425
14
- tradedangerous/submit-distances.py,sha256=vBKV2KXz3mudDsuUieIwWjCqo21XdXP9Clb-VufXyUA,12324
14
+ tradedangerous/submit-distances.py,sha256=EMpqxXFauo3oaR9OAnHCHCsrqwABK1nZdmg92m62zrk,11560
15
15
  tradedangerous/tools.py,sha256=pp-4WtA12SVaaQHFJFOMTF7EDFRCU2mQeOhC4xoXmEk,1331
16
16
  tradedangerous/trade.py,sha256=nGiTFj9ZrqeN9Xad3z8e4MpA2fNqYAcYMrZnwpnuus4,1938
17
17
  tradedangerous/tradecalc.py,sha256=A7peEMiaCjlwFvReSq3E7_Ar0shUoFedQi83ZmOc7uY,42075
@@ -19,9 +19,9 @@ tradedangerous/tradedb.py,sha256=3nGB55dYs4igP3U3J4Ye1-M6Kt9A4xPAMmnX7JEDW7w,722
19
19
  tradedangerous/tradeenv.py,sha256=SDzRC6ERYZzzb_I6uexmFpFJJrnbzXa-1ogYt_GH26w,10576
20
20
  tradedangerous/tradeexcept.py,sha256=aZ-Y31MbkjF7lmAzBAbaMsPPE7FEEfuf4gaX2GvriDk,368
21
21
  tradedangerous/tradegui.py,sha256=q2HdIdoyeLUpeF2X0hVIGn7sU6T4zOzq1HN0zGvZdyE,788
22
- tradedangerous/transfers.py,sha256=NWdrE3gfBlvqnoSJEuWHqYbWFHUHNDd5D0YYMQkpaMY,10513
22
+ tradedangerous/transfers.py,sha256=88gIvXpjd8T6NLxBrBRzmH2IfUmDDtiMcDTrc7qF3OI,7830
23
23
  tradedangerous/utils.py,sha256=PUPvAEqUyxYGqqQa0b_yfLAvq8YVUxK6HfdS-CxM-Lo,5186
24
- tradedangerous/version.py,sha256=aDLr8TVjMzFdVqr7IbN81E05QzcAMQCuS_iYevVADM8,646
24
+ tradedangerous/version.py,sha256=vmpGvM433TmKuZp1iADOkzMDv717JW7vbKl2i__IgFg,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=_8vKu9e3tQy0HEPrnG8Ts0OoQ_kF6gZPQ9EOfTUd73w,2179
@@ -34,7 +34,7 @@ tradedangerous/commands/local_cmd.py,sha256=tf7YMGX-vaVGNO2lvQF9EvQEN3Wj7DE9-NTS
34
34
  tradedangerous/commands/market_cmd.py,sha256=Ig16zDuksywiiF3Exps6UuM-ZhqgbXqkW6Lu2s9xQf0,5411
35
35
  tradedangerous/commands/nav_cmd.py,sha256=v245L1MxiUliITUgvWeeB4cL4UdkNO8n0CiP6ztrV54,8460
36
36
  tradedangerous/commands/olddata_cmd.py,sha256=6rpPRRs4kLhV9c0sogmctVAjta7v0L0Deu999spXY2s,7888
37
- tradedangerous/commands/parsing.py,sha256=vyfRByRVLENrtD6IQitdPlddb-f_tgde9arYkimJAEg,6717
37
+ tradedangerous/commands/parsing.py,sha256=RUnCnML59IOXYI6jEljE5lrE_WKcDmFFqKF1JVJg9A0,6725
38
38
  tradedangerous/commands/rares_cmd.py,sha256=L_QoW2zIZTU9Jpavt_K2fZyu8T153nUSuVqIiz4uksQ,9207
39
39
  tradedangerous/commands/run_cmd.py,sha256=HtvxKfD2ef_fUCDdUzBv9yRwd2gBOqIq4hzUAOLgcyU,47650
40
40
  tradedangerous/commands/sell_cmd.py,sha256=RI8T1DWaBuQkYSy2Pjoo0Kxy5n9UgRTqtlSBE0Vg1SI,7943
@@ -54,26 +54,26 @@ tradedangerous/misc/derp-sentinel.py,sha256=22zyl26Q8XHvq8IJZDinJ3oKudUnByDoQ3Wi
54
54
  tradedangerous/misc/diff-system-csvs.py,sha256=67K5BEDFYWCSJY17EjkUzNaLX8sOlP9aQ5US6f8WjPw,4931
55
55
  tradedangerous/misc/eddb.py,sha256=mHHMIyyuJRHBtBgSou-z7rfNXkajWvvWghRPk3D5jE4,1812
56
56
  tradedangerous/misc/eddn.py,sha256=RNoLCxFfEgktMPZB6k2BUxd3aM5Z6LqYi4WhI4jrRdQ,12149
57
- tradedangerous/misc/edsc.py,sha256=LesWB0M4mMbjsH7la3H5zD-fX-0BL_nIHbLfAjWvy4A,14710
58
- tradedangerous/misc/edsm.py,sha256=Trp1dNCHgsYppS3r49UZIIDgzantT7WfY3I-eXYj8uA,3253
57
+ tradedangerous/misc/edsc.py,sha256=SN_da9qZ7H8ozibyhoFVB8nAvwBDPF3Z_PMlt70J2Ro,14367
58
+ tradedangerous/misc/edsm.py,sha256=equDwO1SY3QTsoJIb3LjiHes4C8Dejaap_TMpYlCm8o,2910
59
59
  tradedangerous/misc/importeddbstats.py,sha256=iLAcrFzdwiMm_MnUuaHcT_xGgZF8pfEEd1qljhhWJTU,1787
60
60
  tradedangerous/misc/prices-json-exp.py,sha256=Fpm62ugP35ZBqnRs6ekYfS3GoDFYmvLD3b3SFJfaMOI,4944
61
61
  tradedangerous/misc/progress.py,sha256=NKvKP1OSCTpItc1CNxDuEH2A1oGJ6aWSyCdPSAjsG9E,2120
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=1SXmNdGLy-EP5qOrl4WNjcOA_tt-S2fVuGunQWKR3k4,21965
65
+ tradedangerous/plugins/eddblink_plug.py,sha256=pfPROnJKhvLHDNruOx_wHGK876aYS7dE8xcMVuWw1ak,21961
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
69
- tradedangerous/plugins/spansh_plug.py,sha256=72_7aWQAxtb_xUEOaD_3oqB2DxEyhkCR1BY1EXn2-iw,26734
69
+ tradedangerous/plugins/spansh_plug.py,sha256=viIlFNrVocRKjZ1rg8mNTZsHaZoSAn5_6vEGn67suVQ,26730
70
70
  tradedangerous/templates/Added.csv,sha256=8o54civQCcS9y7_DBo0GX196XWRbbREQqKDYTKibsgQ,649
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.0.1.dist-info/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
75
- tradedangerous-11.0.1.dist-info/METADATA,sha256=-QKii7zlT7pIPfbrIGGJYYuDbInfyI7jQsgyczIWPBM,4435
76
- tradedangerous-11.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
77
- tradedangerous-11.0.1.dist-info/entry_points.txt,sha256=pSwa-q0ob443uiKux7xFKYQl8uen66iDTnjdrQhNLx8,92
78
- tradedangerous-11.0.1.dist-info/top_level.txt,sha256=bF29i-oEltmNICgElEKxNsg83oahJvxg3a7YrxZi9Rk,15
79
- tradedangerous-11.0.1.dist-info/RECORD,,
74
+ tradedangerous-11.0.3.dist-info/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
75
+ tradedangerous-11.0.3.dist-info/METADATA,sha256=gpeUG3Jsq6EG53G-TYq4jBflc8husLo2t5ICNoKFXSk,4435
76
+ tradedangerous-11.0.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
77
+ tradedangerous-11.0.3.dist-info/entry_points.txt,sha256=pSwa-q0ob443uiKux7xFKYQl8uen66iDTnjdrQhNLx8,92
78
+ tradedangerous-11.0.3.dist-info/top_level.txt,sha256=bF29i-oEltmNICgElEKxNsg83oahJvxg3a7YrxZi9Rk,15
79
+ tradedangerous-11.0.3.dist-info/RECORD,,