changeset 41130:d43719bd01f0

rust-cpython: remove invalid __package__ attribute Since mercurial.rustext is a package, its __package__ should be, if set, "mercurial.rustext". AFAIK, we don't have to set this attribute manually as the rustext module will be imported by the system importer. https://stackoverflow.com/a/21233334/10435339
author Yuya Nishihara <yuya@tcha.org>
date Sun, 06 Jan 2019 11:29:44 +0900
parents 074c72a38423
children 486908e691be
files rust/hg-cpython/src/lib.rs
diffstat 1 files changed, 0 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-cpython/src/lib.rs	Mon Jan 07 19:03:23 2019 -0500
+++ b/rust/hg-cpython/src/lib.rs	Sun Jan 06 11:29:44 2019 +0900
@@ -35,7 +35,6 @@
     )?;
 
     let dotted_name: String = m.get(py, "__name__")?.extract(py)?;
-    m.add(py, "__package__", "mercurial")?;
     m.add(py, "ancestor", ancestors::init_module(py, &dotted_name)?)?;
     m.add(py, "GraphError", py.get_type::<exceptions::GraphError>())?;
     Ok(())