Skip to content

Commit

Permalink
Merge #3200
Browse files Browse the repository at this point in the history
3200: RFC: remove copyright headers from source files r=davidhewitt a=davidhewitt

As part of our relicensing effort - I've observed that over time we haven't applied COPYRIGHT headers consistently to source files.

I've seen different organisations take different approaches to this. I note that for [`rust-lang/rust`, headers only exist where code has been moved inside the Rust repo without relicensing](https://github.com/search?q=repo%3Arust-lang%2Frust+copyright+language%3ARust&type=code&l=Rust).

For PyO3, I suggest we follow this and remove COPYRIGHT headers from source. We may wish to consider attributing to `rust-cpython` as the original project from which PyO3 was forked, possibly in the License section of the readme?

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
  • Loading branch information
bors[bot] and davidhewitt committed Jun 3, 2023
2 parents fa949ff + 45b5ede commit 6b85130
Show file tree
Hide file tree
Showing 43 changed files with 0 additions and 95 deletions.
1 change: 0 additions & 1 deletion pyo3-macros-backend/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//! This crate contains the implementation of the proc macro attributes

#![warn(elided_lifetimes_in_paths, unused_lifetimes)]
Expand Down
2 changes: 0 additions & 2 deletions pyo3-macros-backend/src/method.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

use crate::attributes::{TextSignatureAttribute, TextSignatureAttributeValue};
use crate::deprecations::{Deprecation, Deprecations};
use crate::params::impl_arg_params;
Expand Down
1 change: 0 additions & 1 deletion pyo3-macros-backend/src/module.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//! Code generation for the function that initializes a python module and adds classes and function.

use crate::{
Expand Down
2 changes: 0 additions & 2 deletions pyo3-macros-backend/src/params.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

use crate::{
method::{FnArg, FnSpec},
pyfunction::FunctionSignature,
Expand Down
2 changes: 0 additions & 2 deletions pyo3-macros-backend/src/pyclass.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

use std::borrow::Cow;

use crate::attributes::{
Expand Down
2 changes: 0 additions & 2 deletions pyo3-macros-backend/src/pyfunction.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

use crate::{
attributes::{
self, get_pyo3_options, take_attributes, take_pyo3_options, CrateAttribute,
Expand Down
2 changes: 0 additions & 2 deletions pyo3-macros-backend/src/pyimpl.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

use std::collections::HashSet;

use crate::{
Expand Down
2 changes: 0 additions & 2 deletions pyo3-macros-backend/src/pymethod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

use std::borrow::Cow;

use crate::attributes::NameAttribute;
Expand Down
1 change: 0 additions & 1 deletion pyo3-macros-backend/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
use proc_macro2::{Span, TokenStream};
use quote::ToTokens;
use syn::{punctuated::Punctuated, spanned::Spanned, Token};
Expand Down
1 change: 0 additions & 1 deletion pyo3-macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//! This crate declares only the proc macro attributes, as a crate defining proc macro attributes
//! must not contain any other public items.

Expand Down
2 changes: 0 additions & 2 deletions src/callback.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

//! Utilities for a Python callable object that invokes a Rust function.

use crate::err::{PyErr, PyResult};
Expand Down
2 changes: 0 additions & 2 deletions src/conversion.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

//! Defines conversions between Rust and Python types.
use crate::err::{self, PyDowncastError, PyResult};
#[cfg(feature = "experimental-inspect")]
Expand Down
4 changes: 0 additions & 4 deletions src/conversions/num_bigint.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//
// based on Daniel Grunwald's https://github.com/dgrunwald/rust-cpython

#![cfg(feature = "num-bigint")]
//! Conversions to and from [num-bigint](https://docs.rs/num-bigint)’s [`BigInt`] and [`BigUint`] types.
//!
Expand Down
4 changes: 0 additions & 4 deletions src/derive_utils.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//
// based on Daniel Grunwald's https://github.com/dgrunwald/rust-cpython

//! Functionality for the code generated by the derive backend

use crate::{types::PyModule, Python};
Expand Down
2 changes: 0 additions & 2 deletions src/err/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

use crate::panic::PanicException;
use crate::type_object::PyTypeInfo;
use crate::types::{PyTraceback, PyType};
Expand Down
2 changes: 0 additions & 2 deletions src/exceptions.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

//! Exception and warning types defined by Python.
//!
//! The structs in this module represent Python's built-in exceptions and
Expand Down
2 changes: 0 additions & 2 deletions src/gil.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

//! Interaction with Python's global interpreter lock

use crate::impl_::not_send::{NotSend, NOT_SEND};
Expand Down
2 changes: 0 additions & 2 deletions src/impl_/freelist.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

//! Support for [free allocation lists][1].
//!
//! This can improve performance for types that are often created and deleted in quick succession.
Expand Down
1 change: 0 additions & 1 deletion src/instance.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
use crate::conversion::PyTryFrom;
use crate::err::{self, PyDowncastError, PyErr, PyResult};
use crate::gil;
Expand Down
4 changes: 0 additions & 4 deletions src/marker.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//
// based on Daniel Grunwald's https://github.com/dgrunwald/rust-cpython

//! Fundamental properties of objects tied to the Python interpreter.
//!
//! The Python interpreter is not threadsafe. To protect the Python interpreter in multithreaded
Expand Down
2 changes: 0 additions & 2 deletions src/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

//! PyO3's prelude.
//!
//! The purpose of this module is to alleviate imports of many commonly used items of the PyO3 crate
Expand Down
1 change: 0 additions & 1 deletion src/type_object.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//! Python type object information

use crate::types::{PyAny, PyType};
Expand Down
1 change: 0 additions & 1 deletion src/types/boolobject.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
#[cfg(feature = "experimental-inspect")]
use crate::inspect::types::TypeInfo;
use crate::{
Expand Down
1 change: 0 additions & 1 deletion src/types/bytearray.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
use crate::err::{PyErr, PyResult};
use crate::{ffi, AsPyPointer, Py, PyAny, Python};
use std::os::raw::c_char;
Expand Down
1 change: 0 additions & 1 deletion src/types/capsule.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
use crate::Python;
use crate::{ffi, AsPyPointer, PyAny};
use crate::{pyobject_native_type_core, PyErr, PyResult};
Expand Down
2 changes: 0 additions & 2 deletions src/types/code.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2022-present PyO3 Project and Contributors

use crate::ffi;
use crate::PyAny;

Expand Down
2 changes: 0 additions & 2 deletions src/types/dict.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

use super::PyMapping;
use crate::err::{self, PyErr, PyResult};
use crate::ffi::Py_ssize_t;
Expand Down
3 changes: 0 additions & 3 deletions src/types/floatob.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//
// based on Daniel Grunwald's https://github.com/dgrunwald/rust-cpython
#[cfg(feature = "experimental-inspect")]
use crate::inspect::types::TypeInfo;
use crate::{
Expand Down
2 changes: 0 additions & 2 deletions src/types/frame.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2022-present PyO3 Project and Contributors

use crate::ffi;
use crate::PyAny;

Expand Down
3 changes: 0 additions & 3 deletions src/types/frozenset.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//

#[cfg(Py_LIMITED_API)]
use crate::types::PyIterator;
use crate::{
Expand Down
4 changes: 0 additions & 4 deletions src/types/iterator.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//
// based on Daniel Grunwald's https://github.com/dgrunwald/rust-cpython

use crate::{ffi, AsPyPointer, IntoPyPointer, Py, PyAny, PyErr, PyNativeType, PyResult, Python};
use crate::{PyDowncastError, PyTryFrom};

Expand Down
4 changes: 0 additions & 4 deletions src/types/list.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//
// based on Daniel Grunwald's https://github.com/dgrunwald/rust-cpython

use std::convert::TryInto;

use crate::err::{self, PyResult};
Expand Down
2 changes: 0 additions & 2 deletions src/types/mapping.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

use crate::err::{PyDowncastError, PyErr, PyResult};
use crate::sync::GILOnceCell;
use crate::type_object::PyTypeInfo;
Expand Down
2 changes: 0 additions & 2 deletions src/types/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

//! Various types defined by the Python interpreter such as `int`, `str` and `tuple`.

pub use self::any::PyAny;
Expand Down
4 changes: 0 additions & 4 deletions src/types/module.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//
// based on Daniel Grunwald's https://github.com/dgrunwald/rust-cpython

use crate::callback::IntoPyCallbackOutput;
use crate::err::{PyErr, PyResult};
use crate::exceptions;
Expand Down
4 changes: 0 additions & 4 deletions src/types/num.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//
// based on Daniel Grunwald's https://github.com/dgrunwald/rust-cpython

use crate::{ffi, PyAny};

/// Represents a Python `int` object.
Expand Down
1 change: 0 additions & 1 deletion src/types/sequence.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
use crate::err::{self, PyDowncastError, PyErr, PyResult};
use crate::exceptions::PyTypeError;
#[cfg(feature = "experimental-inspect")]
Expand Down
3 changes: 0 additions & 3 deletions src/types/set.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//

#[cfg(Py_LIMITED_API)]
use crate::types::PyIterator;
use crate::{
Expand Down
2 changes: 0 additions & 2 deletions src/types/slice.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

use crate::err::{PyErr, PyResult};
use crate::ffi::{self, Py_ssize_t};
use crate::{AsPyPointer, PyAny, PyObject, Python, ToPyObject};
Expand Down
2 changes: 0 additions & 2 deletions src/types/string.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

#[cfg(not(Py_LIMITED_API))]
use crate::exceptions::PyUnicodeDecodeError;
use crate::types::PyBytes;
Expand Down
2 changes: 0 additions & 2 deletions src/types/traceback.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

use crate::err::{error_on_minusone, PyResult};
use crate::ffi;
use crate::types::PyString;
Expand Down
2 changes: 0 additions & 2 deletions src/types/tuple.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors

use std::convert::TryInto;

use crate::ffi::{self, Py_ssize_t};
Expand Down
4 changes: 0 additions & 4 deletions src/types/typeobject.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
//
// based on Daniel Grunwald's https://github.com/dgrunwald/rust-cpython

use crate::err::{self, PyResult};
use crate::{ffi, AsPyPointer, PyAny, PyTypeInfo, Python};

Expand Down

0 comments on commit 6b85130

Please sign in to comment.