The biggest update yet<br><br>
**Major Changes:**
- Added other system implementations of `.sys` modules (Windows and Linux)
- Fixed a shelf of `.requests` module bugs
- Implemented cache and config for global use
- Added the `interpreter()` project into the main module from version 1.0
- Added `NoHttpConnection` and `SSLCertificateFailed` exception classes for `.requests`
- Added the `requests.http` module implementing a bit more functionality but using the `http.client` module
- Adapted the way requests are sent in `.requests`, it now uses the initialise and send system (`.requests.request(url, method).send()`)
- Various optimisations
**Full Changelog:**
**Additions:**
- Linux implementation of `.sys.info` properties
- Windows and Linux implementation of `.sys.pID()` method
- Version history to `CHANGELOG.md` file
- Included `gzip.decompress()` function for the received data in `.requests` methods as the `gzip, deflate` header was provided, but not actually decoded, leading to substantial errors
- `verifiable()` method in `.requests` to determine whether requests can be verified with a valid ssl certificate on the current connection
- `.errors.SSLCertificateFailed` error class for `.requests` as it can be unclear to when a request couldn't be verified
- `.lower()` method to all string variables in tooltils for long term update stability
- Readded the mini interpreter module from version 1.0.0-beta into the main module, it was a cool small project that I'm still willing to continue
- Added `storage` folder containing `cache.json`, and `config.json`, two new features added to compliment new methods like `.requests.verifiable()`
- Documentation for the config on how to specify built-in Python and local tooltils methods as values for the settings
- `clearCache()`, `clearConfig()` and `clearData()` methods in `.info` to also compliment the two new features respectively
- Extensively tested each method and property to make sure there are no bugs before releasing
- Type check for `agent` property in `.requests` methods
- `install_opener(None)` method in `.requests.request` class to make sure that non tooltils requests using urllib aren't interfered with
- **"Accept: application/json"** header replacing **"\*/\*"** if the request method is POST or PUT
- Text describing the first method used to install tooltils in `README.md`
- Code using the `data` parameter in `.requests` methods were not using the type-checked version, this could have lead to unwanted errors, so it has been replaced
- Important note section in `README.md` to describe the current implementation of reading and writing to the cache and config
- Config feature for `.requests.connected()` for whether caching should be used
- Allow the `storage` folder to be deleted entirely or a file within and it being replaced with the default version. Essentially a force clear
- `location` property in `.info` for the path directory location
- Notes section in `CHANGELOG.md` versions starting now for anything that isn't important but is an oversight/limitation
- `getArrayValues()` method in the main module for recursively obtaining each base-level value from an array
- A potential feature could have allowed for a user to specify methods or variables as config values but I am too dumb right now to use my brain and figure out how to implement it. My first unfinished implementation is currently commented in `info.py`
- `getCurrentWifiName()` method in `.sys` as it was used in requests but would make more sense as a standalone function
- Stringify each cookie value before adding it to the request in `.requests`
- Code to catch `http.client.RemoteDisconnected` error in `.requests`
- More variable checking for what openers to use for the request in `.requests`, this also allows for none to be used, providing a small performance boost
- Ability to specify a message when raising the `.errors.TooltilsError` base class
- `requests.http` module implementation of `.requests` using the `http` Python library as a backend (alpha). This version boasts a nearly 2x speed increase in http requests and tiny boost with https used
- Docstrings to `cafile` and `capath` variables in `.requests.where()` `certifs` return class
- `NoHttpConnection` exception class for `.requests`
- Protocol set to **"https/1.1"** for `SSLContext` supplied to requests in `.requests.request()`
- Child baseclasses inheriting from `TooltilsException` in `.errors` to reflect the module an error is being raised from and similar
- Default error string to `TooltilsException` class in `.errors`
- Text showing what the parent class for each exception is in `.errors` in `API.md`
- `RequestError` exception for all package-specifc errors raised by `.requests.request()` method
- `SystemCallError` exception for all package-specifc errors raised by `.sys.system()` method
- `.read()` and `.readlines()` methods from `.requests.request()` into `API.md`
- `sent` variable to `.requests.request()` to determine whether the request has been used yet
- `timeTest()` method in the main module to test the average time taken to run two different methods 10 times (can be changed)
- `logger()` class method for tooltils only into `.info` as a wrapper for the `logging` module
- List of exception classes that methods may raise to `API.md`
- New properties to `.sys.system()` return class, being `list_text` and `clean_list_text`
- Parameter testing for all methods
- `print` parameter to `.sys.system()` method for if the output of the command/program should be written to stdout
- `varName()` method to the main module, allows you to obtain the name of a variable
<br>
**Removals:**
- `.requests.request()` headers were defined three times, and the last two were lazy only coming from the json response, so it would never work. Stripped the non-needed declarations
- `typing.MutableMapping` type anywhere as there is no way to convert a dict to MutableMapping, annoyingly
- Exclude `API.md`, `CHANGELOG.md` and `LICENSE` from the line counter in `.info` as they are not code
- `verified` and `unverified` properties from `.requests` as they were wifi dependent
- Cython package builder as it would require the `Cython` package which is not a standard module
- Awkward indentation before each line in the documentation, looked nicer but wasn't practical
- `cstrip()` method from the main file as you could do it easily with the `str.strip()` method
- `bytes` type hint from the `url` parameter in all `.requests` methods as there wasn't a reason to have it there in the first place
- All `__pycache__` folders each install so that the newest version is fresh without older optimisations taking up storage, though this will make the first run slower
- The ability to specify the URL as a file path in `.requests` `prep_url()` and `request()` methods
- Catch block code for `EOFError` and `KeyboardInterrupt` errors because they were non-request related
- `bytes` type hint from `.requests.request.raw` variable response class
- Easy access methods in the main module as they were unecessary performance decreasers
- `UnicodeDecodeError` from `.errors` because there is already an error in Python for this
- Error raising for `UnicodeDecodeError` because the message does not need to be changed in any way
- `createfile()` method from the main module as it was a useless wrapper
<br>
**Changes:**
- Edit link text in `README.md` as it did not work on github before
- Matched `info` property docstrings to that of the API's
- Reformatted older releases to match the most recent versions
- The way headers are processed in `.requests.request()`, now the `_UrlopenRet.getheaders()` method is used providing a reliable way of obtaining the request data
- Convert `license` property in `.info` to read from the license file instead of having direct text
- Rename 'Roadmap' in `README.md` to 'Planned Features'
- Reformatted the way the method is converted in `.requests` to make sure the correct headers are added depending on if it is post or put
- Reworded main module description in `API.md` to better describe it
- Convert `months` property in the main file to become an unusable constant because it only served as a helper variable
- Reword text in `README.md` describing the code block building tooltils using `!setup.py`
- Convert the installation methods in `README.md` to call the Python binary directly instead of Pip
- Use the `status_codes` property value from `.errors.StatusCodeError` instead of defining it again in `.requests`
- Updated `status_codes` property in `.requests` to the official list as specified by the [Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml)
- Reworded `.requests.connected()` method docstring
- Compacted `.requests.request()` property testing to save around 20-30 lines
- Changed `.errors.StatusCodeError.status_codes` property to a dictionary as it would not return the correct value
- Encode the request JSON data before sending in `.requests`
- Reworded `.errors.StatusCodeError` exception docstring
- Change final line of code in the tooltils example in `README.md` to call the **'User-Agent'** header directly instead of the whole variable
- Update `pyproject.toml` Python versions to support 3.12 (possibly 3.13 in like nov or dec)
- Compacted each http method parameter list in `.requests` in `API.md` to save about 100 lines
- Correct the method called for `.requests.download()` as it would input **'FILE'** instead of **'DOWNLOAD'**
- `self.method` would be assigned to `rmethod` in `.requests.request()`, resulting in the download method not being used and **'GET'** taking its place
- Optimised the ways headers are added to the request in `.requests.request()`
- Renamed `Redirects` class in `.requests` to `NoRedirects`
- Optimised the way the request is setup in `.requests.request()`
- Reformatted the way requests are created in `.requests.request()`, you can initialise the host but you must call `.send(method=...)` to perform the request
- Optimisation on the way the arguments are processed in the `.style()` method in the main module
- Revert MacOS user agent header to the Intel version instead of M1 because it may not be recognised properly by some websites
- Reformatted the way the **"Content-Length"** and **"Content-Type"** headers are included in the request in `.requests.request()`
- Rename `colours` variable to `ANSI_colours` in the main module to reflect the content
- Adapted the way `self.text` is read to make sure it doesn't show up as nothing even when a response was returned
- The user agent has been updated to the correct version including the Python tag in `README.md`
- Implemented a new method of checking for different request outcomes in the `.requests` module, now using more specific exceptions
- Optimise `connected()` method in `.requests` to use httpbin.org, avoiding google's http errors
- Optimise the way the request data is read in `.requests.request()` to avoid re-encoding the text
- Make sure that the base request data in `.requests.request()` cookie is set back to zero when read from either `.read()` or `.readlines()` so it can be read multiple times
- Correct code example in the main module's docstring
- Reword `verified` variable docstring in `.requests` `API.md` module
- The port for connections with `.requests.connected()` has been changed to 80 because it was timing out before, stupid issue
- Reword `.requests` module docstring
- Converted `.sys.system()` method to a class
- Rename `output` variable from `.sys.system()` `shell_response` return to `text`
- The way some system programs are called from various methods, they should call the program directly instead of running a shell command
- Made sure the correct return type is present on every method in `API.md`
- Converted `clean` parameter from `.sys.system()` class to instead be a separate property
- Made text property in `.sys.system()` become a string instead of a list
<br>
**Notes:**
- The current implementation of reading and writing to `cache.json` and `config.json` rely on the file staying open for the duration of the program to speed load times. Though there is no local Python way to call `.close()` on the TextIOWrapper when the program is ended. It is dependent on CPython's garbage collecter to do this for us.
<br><br>