diff --git a/CHANGELOG.md b/CHANGELOG.md index ea095f7..193c2bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.17.0 - TBD + +### Breaking changes +- Removed deprecated `Packaging` enum and `packaging` field that's no longer supported + by the API + ## 0.16.0 - 2024-11-12 #### Enhancements diff --git a/src/historical/batch.rs b/src/historical/batch.rs index 0201347..0b4ffbf 100644 --- a/src/historical/batch.rs +++ b/src/historical/batch.rs @@ -1,7 +1,5 @@ //! The historical batch download API. -#![allow(deprecated)] // Packaging - use core::fmt; use std::{ collections::HashMap, @@ -50,12 +48,6 @@ impl BatchClient<'_> { ("map_symbols", params.map_symbols.to_string()), ("split_symbols", params.split_symbols.to_string()), ("split_duration", params.split_duration.to_string()), - ( - "packaging", - params - .packaging - .map_or_else(|| "none".to_owned(), |p| p.to_string()), - ), ("delivery", params.delivery.to_string()), ("stype_in", params.stype_in.to_string()), ("stype_out", params.stype_out.to_string()), @@ -209,20 +201,6 @@ pub enum SplitDuration { Month, } -/// How the batch job will be packaged. -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[deprecated( - since = "0.16.0", - note = "Use the `download()` method to download the whole job`" -)] -pub enum Packaging { - /// ZIP compressed. - Zip, - /// Tarball. - #[deprecated(since = "0.13.0", note = "Users should use Zip instead")] - Tar, -} - /// How the batch job will be delivered. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] pub enum Delivery { @@ -295,13 +273,6 @@ pub struct SubmitJobParams { /// Must be an integer between 1e9 and 10e9 inclusive (1GB - 10GB). Defaults to `None`. #[builder(default, setter(strip_option))] pub split_size: Option, - /// The optional archive type to package all batched data files in. Defaults to `None`. - #[builder(default, setter(strip_option))] - #[deprecated( - since = "0.16.0", - note = "Use the `download()` method to download the whole job`" - )] - pub packaging: Option, /// The delivery mechanism for the batched data files once processed. Defaults to /// [`Download`](Delivery::Download). #[builder(default)] @@ -366,12 +337,6 @@ pub struct BatchJob { pub split_duration: SplitDuration, /// The maximum size for an individual file before splitting into multiple files. pub split_size: Option, - /// The packaging method of the batch data. - #[deprecated( - since = "0.16.0", - note = "Use the `download()` method to download the whole job`" - )] - pub packaging: Option, /// The delivery mechanism of the batch data. pub delivery: Delivery, /// The number of data records (`None` until the job is processed). @@ -485,47 +450,6 @@ impl<'de> Deserialize<'de> for SplitDuration { } } -impl Packaging { - /// Converts the enum to its `str` representation. - pub const fn as_str(&self) -> &'static str { - match self { - Packaging::Zip => "zip", - Packaging::Tar => "tar", - } - } -} - -impl fmt::Display for Packaging { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.as_str()) - } -} - -impl FromStr for Packaging { - type Err = crate::Error; - - fn from_str(s: &str) -> Result { - match s { - "zip" => Ok(Packaging::Zip), - "tar" => Ok(Packaging::Tar), - _ => Err(crate::Error::bad_arg( - "s", - format!( - "{s} does not correspond with any {} variant", - std::any::type_name::() - ), - )), - } - } -} - -impl<'de> Deserialize<'de> for Packaging { - fn deserialize>(deserializer: D) -> Result { - let str = String::deserialize(deserializer)?; - FromStr::from_str(&str).map_err(de::Error::custom) - } -} - impl Delivery { /// Converts the enum to its `str` representation. pub const fn as_str(&self) -> &'static str { @@ -689,7 +613,6 @@ mod tests { "split_symbols": false, "split_duration": "day", "split_size": null, - "packaging": null, "delivery": "download", "state": "queued", "ts_received": "2023-07-19T23:00:04.095538123Z", @@ -754,7 +677,6 @@ mod tests { "split_symbols": false, "split_duration": "day", "split_size": null, - "packaging": null, "delivery": "download", "state": "processing", "ts_received": "2023-07-19 23:00:04.095538+00:00",