Skip to content

Commit

Permalink
chore: prepare Tokio 1.0 release (#3319)
Browse files Browse the repository at this point in the history
  • Loading branch information
carllerche authored Dec 23, 2020
1 parent aa6597b commit a66017f
Show file tree
Hide file tree
Showing 20 changed files with 131 additions and 112 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ the Rust programming language. It is:
[Website](https://tokio.rs) |
[Guides](https://tokio.rs/tokio/tutorial) |
[API Docs](https://docs.rs/tokio/latest/tokio) |
[Roadmap](https://github.com/tokio-rs/tokio/blob/master/ROADMAP.md) |
[Chat](https://discord.gg/tokio)

## Overview
Expand Down
67 changes: 0 additions & 67 deletions ROADMAP.md

This file was deleted.

4 changes: 4 additions & 0 deletions tokio-macros/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.0 (December 23, 2020)

- track `tokio` 1.0 release.

# 0.3.1 (October 25, 2020)

### Fixed
Expand Down
3 changes: 1 addition & 2 deletions tokio-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ authors = ["Tokio Contributors <[email protected]>"]
license = "MIT"
repository = "https://github.com/tokio-rs/tokio"
homepage = "https://tokio.rs"
documentation = "https://docs.rs/tokio-macros/0.3.1/tokio_macros"
documentation = "https://docs.rs/tokio-macros/1.0.0/tokio_macros"
description = """
Tokio's proc macros.
"""
categories = ["asynchronous"]
publish = false

[lib]
proc-macro = true
Expand Down
2 changes: 1 addition & 1 deletion tokio-macros/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2019 Tokio Contributors
Copyright (c) 2020 Tokio Contributors

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
Expand Down
50 changes: 24 additions & 26 deletions tokio-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ mod select;

use proc_macro::TokenStream;

/// Marks async function to be executed by the selected runtime. This macro helps
/// set up a `Runtime` without requiring the user to use
/// Marks async function to be executed by the selected runtime. This macro
/// helps set up a `Runtime` without requiring the user to use
/// [Runtime](../tokio/runtime/struct.Runtime.html) or
/// [Builder](../tokio/runtime/struct.Builder.html) directly.
///
Expand All @@ -36,10 +36,10 @@ use proc_macro::TokenStream;
/// powerful interface.
///
/// Note: This macro can be used on any function and not just the `main`
/// function. Using it on a non-main function makes the function behave
/// as if it was synchronous by starting a new runtime each time it is called.
/// If the function is called often, it is preferable to create the runtime using
/// the runtime builder so the runtime can be reused across calls.
/// function. Using it on a non-main function makes the function behave as if it
/// was synchronous by starting a new runtime each time it is called. If the
/// function is called often, it is preferable to create the runtime using the
/// runtime builder so the runtime can be reused across calls.
///
/// # Multi-threaded runtime
///
Expand All @@ -53,7 +53,8 @@ use proc_macro::TokenStream;
/// The `worker_threads` option configures the number of worker threads, and
/// defaults to the number of cpus on the system. This is the default flavor.
///
/// Note: The multi-threaded runtime requires the `rt-multi-thread` feature flag.
/// Note: The multi-threaded runtime requires the `rt-multi-thread` feature
/// flag.
///
/// # Current thread runtime
///
Expand Down Expand Up @@ -145,10 +146,10 @@ use proc_macro::TokenStream;
///
/// ### NOTE:
///
/// If you rename the tokio crate in your dependencies this macro will not work.
/// If you must rename the 0.3 version of tokio because you're also using the
/// 0.1 version of tokio, you _must_ make the tokio 0.3 crate available as
/// `tokio` in the module where this macro is expanded.
/// If you rename the Tokio crate in your dependencies this macro will not work.
/// If you must rename the current version of Tokio because you're also using an
/// older version of Tokio, you _must_ make the current version of Tokio
/// available as `tokio` in the module where this macro is expanded.
#[proc_macro_attribute]
#[cfg(not(test))] // Work around for rust-lang/rust#62127
pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
Expand Down Expand Up @@ -190,11 +191,10 @@ pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
///
/// ### NOTE:
///
/// If you rename the tokio crate in your dependencies this macro
/// will not work. If you must rename the 0.3 version of tokio because
/// you're also using the 0.1 version of tokio, you _must_ make the
/// tokio 0.3 crate available as `tokio` in the module where this
/// macro is expanded.
/// If you rename the Tokio crate in your dependencies this macro will not work.
/// If you must rename the current version of Tokio because you're also using an
/// older version of Tokio, you _must_ make the current version of Tokio
/// available as `tokio` in the module where this macro is expanded.
#[proc_macro_attribute]
#[cfg(not(test))] // Work around for rust-lang/rust#62127
pub fn main_rt(args: TokenStream, item: TokenStream) -> TokenStream {
Expand Down Expand Up @@ -227,11 +227,10 @@ pub fn main_rt(args: TokenStream, item: TokenStream) -> TokenStream {
///
/// ### NOTE:
///
/// If you rename the tokio crate in your dependencies this macro
/// will not work. If you must rename the 0.3 version of tokio because
/// you're also using the 0.1 version of tokio, you _must_ make the
/// tokio 0.3 crate available as `tokio` in the module where this
/// macro is expanded.
/// If you rename the Tokio crate in your dependencies this macro will not work.
/// If you must rename the current version of Tokio because you're also using an
/// older version of Tokio, you _must_ make the current version of Tokio
/// available as `tokio` in the module where this macro is expanded.
#[proc_macro_attribute]
pub fn test(args: TokenStream, item: TokenStream) -> TokenStream {
entry::test(args, item, true)
Expand All @@ -250,11 +249,10 @@ pub fn test(args: TokenStream, item: TokenStream) -> TokenStream {
///
/// ### NOTE:
///
/// If you rename the tokio crate in your dependencies this macro
/// will not work. If you must rename the 0.3 version of tokio because
/// you're also using the 0.1 version of tokio, you _must_ make the
/// tokio 0.3 crate available as `tokio` in the module where this
/// macro is expanded.
/// If you rename the Tokio crate in your dependencies this macro will not work.
/// If you must rename the current version of Tokio because you're also using an
/// older version of Tokio, you _must_ make the current version of Tokio
/// available as `tokio` in the module where this macro is expanded.
#[proc_macro_attribute]
pub fn test_rt(args: TokenStream, item: TokenStream) -> TokenStream {
entry::test(args, item, false)
Expand Down
3 changes: 3 additions & 0 deletions tokio-stream/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 0.1.0 (December 23, 2020)

- Initial release
1 change: 0 additions & 1 deletion tokio-stream/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ description = """
Utilities to work with `Stream` and `tokio`.
"""
categories = ["asynchronous"]
publish = false

[features]
default = ["time"]
Expand Down
25 changes: 25 additions & 0 deletions tokio-stream/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright (c) 2020 Tokio Contributors

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
4 changes: 4 additions & 0 deletions tokio-test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.4.0 (December 23, 2020)

- Track `tokio` 1.0 release.

# 0.3.0 (October 15, 2020)

- Track `tokio` 0.3 release.
Expand Down
1 change: 0 additions & 1 deletion tokio-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ description = """
Testing utilities for Tokio- and futures-based code
"""
categories = ["asynchronous", "testing"]
publish = false

[dependencies]
tokio = { version = "1.0.0", path = "../tokio", features = ["rt", "sync", "time", "test-util"] }
Expand Down
2 changes: 1 addition & 1 deletion tokio-test/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2019 Tokio Contributors
Copyright (c) 2020 Tokio Contributors

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
Expand Down
8 changes: 8 additions & 0 deletions tokio-util/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 0.6.0 (December 23, 2020)

### Changed
- depend on `tokio` 1.0.

### Added
- rt: add constructors to `TokioContext` (#3221).

# 0.5.1 (December 3, 2020)

### Added
Expand Down
3 changes: 1 addition & 2 deletions tokio-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ authors = ["Tokio Contributors <[email protected]>"]
license = "MIT"
repository = "https://github.com/tokio-rs/tokio"
homepage = "https://tokio.rs"
documentation = "https://docs.rs/tokio-util/0.5.1/tokio_util"
documentation = "https://docs.rs/tokio-util/0.6.0/tokio_util"
description = """
Additional utilities for working with Tokio.
"""
categories = ["asynchronous"]
publish = false

[features]
# No features on by default
Expand Down
2 changes: 1 addition & 1 deletion tokio-util/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2019 Tokio Contributors
Copyright (c) 2020 Tokio Contributors

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
Expand Down
50 changes: 50 additions & 0 deletions tokio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
# 1.0.0 (December 23, 2020)

Commit to the API and long-term support.

### Fixed
- sync: spurious wakeup in `watch` (#3234).

### Changed
- io: rename `AsyncFd::with_io()` to `try_io()` (#3306)
- fs: avoid OS specific `*Ext` traits in favor of conditionally defining the fn (#3264).
- fs: `Sleep` is `!Unpin` (#3278).
- net: pass `SocketAddr` by value (#3125).
- net: `TcpStream::poll_peek` takes `ReadBuf` (#3259).
- rt: rename `runtime::Builder::max_threads()` to `max_blocking_threads()` (#3287).
- time: require `current_thread` runtime when calling `time::pause()` (#3289).

### Removed
- remove `tokio::prelude` (#3299).
- io: remove `AsyncFd::with_poll()` (#3306).
- net: remove `{Tcp,Unix}Stream::shutdown()` in favor of `AsyncWrite::shutdown()` (#3298).
- stream: move all stream utilities to `tokio-stream` until `Stream` is added to
`std` (#3277).
- sync: mpsc `try_recv()` due to unexpected behavior (#3263).
- tracing: make unstable as `tracing-core` is not 1.0 yet (#3266).

### Added
- fs: `poll_*` fns to `DirEntry` (#3308).
- io: `poll_*` fns to `io::Lines`, `io::Split` (#3308).
- io: `_mut` method variants to `AsyncFd` (#3304).
- net: `poll_*` fns to `UnixDatagram` (#3223).
- net: `UnixStream` readiness and non-blocking ops (#3246).
- sync: `UnboundedReceiver::blocking_recv()` (#3262).
- sync: `watch::Sender::borrow()` (#3269).
- sync: `Semaphore::close()` (#3065).
- sync: `poll_recv` fns to `mpsc::Receiver`, `mpsc::UnboundedReceiver` (#3308).
- time: `poll_tick` fn to `time::Interval` (#3316).

# 0.3.6 (December 14, 2020)

### Fixed
- rt: fix deadlock in shutdown (#3228)
- rt: fix panic in task abort when off rt (#3159)
- sync: make `add_permits` panic with usize::MAX >> 3 permits (#3188)
- time: Fix race condition in timer drop (#3229)
- watch: fix spurious wakeup (#3244)

### Added
- example: add back udp-codec example (#3205)
- net: add `TcpStream::into_std` (#3189)

# 0.3.5 (November 30, 2020)

### Fixed
Expand Down
1 change: 0 additions & 1 deletion tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ backed applications.
"""
categories = ["asynchronous", "network-programming"]
keywords = ["io", "async", "non-blocking", "futures"]
publish = false

[features]
# Include nothing by default
Expand Down
2 changes: 1 addition & 1 deletion tokio/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2019 Tokio Contributors
Copyright (c) 2020 Tokio Contributors

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
Expand Down
8 changes: 4 additions & 4 deletions tokio/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
//! that implements [`AsyncRead`] and [`AsyncWrite`] into a `Sink`/`Stream` of
//! your structured data.
//!
//! [tokio-util]: https://docs.rs/tokio-util/0.3/tokio_util/codec/index.html
//! [tokio-util]: https://docs.rs/tokio-util/0.6/tokio_util/codec/index.html
//!
//! # Standard input and output
//!
Expand All @@ -169,9 +169,9 @@
//! [`AsyncWrite`]: trait@AsyncWrite
//! [`AsyncReadExt`]: trait@AsyncReadExt
//! [`AsyncWriteExt`]: trait@AsyncWriteExt
//! ["codec"]: https://docs.rs/tokio-util/0.3/tokio_util/codec/index.html
//! [`Encoder`]: https://docs.rs/tokio-util/0.3/tokio_util/codec/trait.Encoder.html
//! [`Decoder`]: https://docs.rs/tokio-util/0.3/tokio_util/codec/trait.Decoder.html
//! ["codec"]: https://docs.rs/tokio-util/0.6/tokio_util/codec/index.html
//! [`Encoder`]: https://docs.rs/tokio-util/0.6/tokio_util/codec/trait.Encoder.html
//! [`Decoder`]: https://docs.rs/tokio-util/0.6/tokio_util/codec/trait.Decoder.html
//! [`Error`]: struct@Error
//! [`ErrorKind`]: enum@ErrorKind
//! [`Result`]: type@Result
Expand Down
Loading

0 comments on commit a66017f

Please sign in to comment.