I had the same problem and the following fix in the file
runtime/assemblymanager.cs made things work for me. I believe the problem is
that on Win 8.1 there seem to be generic types that aren't in a namespace.
My patch just skips those and thus prevents a crash. I am not sure whether
that is the right way to handle it, but it does fix the crash.
Best,
David
diff --git a/pythonnet/src/runtime/assemblymanager.cs
b/pythonnet/src/runtime/assemblymanager.cs
index 80c838d..2d369b5 100644
--- a/…
[View More]pythonnet/src/runtime/assemblymanager.cs
+++ b/pythonnet/src/runtime/assemblymanager.cs
@@ -283,7 +283,7 @@ internal class AssemblyManager {
namespaces[ns].Add(assembly, String.Empty);
}
- if (t.IsGenericTypeDefinition) {
+ if (ns !=null && t.IsGenericTypeDefinition) {
GenericUtil.Register(t);
}
}
From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com at
python.org] On Behalf Of Mihhail Maslakov
Sent: Wed Nov 6 11:27:45 CET 2013
To: pythondotnet at python.org
Subject: [Python.NET] Python .NET on Windows 8.1
I have been using python.net for about 5 years for my project at work.
Usually everything worked or at least there was a way to fix it. Right now,
there is a situation, that I cannot understand.
Since my PC got upgraded from W7 to W8.1 imports stopped working. It seems
that something happens on clr module initialization stage, because when I
try clr.AddReference("...") python answers: "AttributeError: 'module'
object has no attribute 'AddReference'"
When debugging with freshly built clr.pyd/Python.Runtime.dll I see that
Runtime.Initialize() finishes without exception and clr module methods are
added via InitializeModuleMembers(). Yet still, when I run my program clr
doesn't work properly and seems like import hooks are not there
(breakpoints at AddReference and other methods are not fired).
Do you have any pointers for me in this situation?
Thank you,
Mihhail Maslakov
[View Less]
Alright, I started this now. I created the github organization and the repo.
I will also have a stab at migrating the svn history.
I've marked the github repo as experimental for now so that it is clear that
at this point it is not the official source (yet).
I'll keep the list updated as I make progress.
Cheers,
David
From: PythonDotNet
[mailto:pythondotnet-bounces+davidacoder=hotmail.com@python.org] On Behalf
Of Tony Roberts
Sent: Wednesday, November 27, 2013 6:04 AM
To: …
[View More]pythondotnet(a)python.org
Subject: Re: [Python.NET] PTVS and python.NET
Hi David,
that would seem to fit with the way most other projects work, and should
make it easier for anyone looking for the project on github to find it.
I'm happy to help out with the migration and maintenance if it is decided to
go ahead with this. The fork I created doesn't have the history from svn, so
I think it would be better to start again with the sourceforge project and
pull it into git with all the history and then merge in the various changes
already in github.
cheers,
Tony
On Wed, Nov 27, 2013 at 3:21 AM, davidacoder <davidacoder(a)hotmail.com
<mailto:davidacoder@hotmail.com> > wrote:
I guess my preferred option would be to create a github organization and
host the repo there. So something like github.com/pythonnet/pythonnet
<http://github.com/pythonnet/pythonnet> . In that case the organization can
have multiple owners, so the whole thing is also less dependent on one
person.
If, on the other hand, one of the original maintainers wanted to host it
under their account, I would also understand that, i.e. if this is really
someone's baby.
Finally, I guess the official short name is "pythonnet", right? Or
"pythondotnet", like the mailing list alias?
Cheers,
David
From: Tribble, Brett [mailto:btribble@ea.com <mailto:btribble@ea.com> ]
Sent: Tuesday, November 26, 2013 5:36 PM
To: davidacoder; pythondotnet(a)python.org <mailto:pythondotnet@python.org> ;
brian.lloyd(a)revolution.com <mailto:brian.lloyd@revolution.com>
Subject: RE: [Python.NET] PTVS and python.NET
So, who is willing to be the primary maintainer of the github repository? I
think we should wait for a little while to see if Brian or Barton respond. I
see that tiran has a github account as well: https://github.com/tiran
From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com@python.org]
On Behalf Of davidacoder
Sent: Tuesday, November 26, 2013 6:37 AM
To: pythondotnet(a)python.org <mailto:pythondotnet@python.org>
Subject: Re: [Python.NET] PTVS and python.NET
Great idea!
Best,
David
From: PythonDotNet
[mailto:pythondotnet-bounces+davidacoder=hotmail.com@python.org] On Behalf
Of John Gill
Sent: Tuesday, November 26, 2013 7:47 AM
To: pythondotnet(a)python.org <mailto:pythondotnet@python.org>
Subject: [Python.NET] PTVS and python.NET
Related to a move to github, I have been in touch with the maintainer of
PTVS asking if they are aware of this project. It seems such a natural fit.
He would be happy to:
1. Put a link on our "Related projects" page
2. Identify some interesting scenarios and do a blog post
3. Add a dedicated doc page
4. Etc.
Subject to:
1. The project is actively maintained
2. Up to date docs
3. It "works"
a. Reliable & robust
b. Works with PTVS (eg PTVS doesn't crash, .)
It would be great if PTVS was able to install python .NET for people (the
current install process "copy these dll's" is simple and effective, but a
direct install from PTVS would be good.
I think we would need to resolve the current situation with the code split
between github and sourceforge before we could get the endorsement from
PTVS.
John
This communication and any attachments contain information which is
confidential and may also be legally privileged. It is for the exclusive use
of the intended recipient(s). If you are not the intended recipient(s)
please note that any form of disclosure, distribution, copying, printing or
use of this communication or the information in it or in any attachments is
strictly prohibited and may be unlawful. If you have received this
communication in error, please return it with the title "received in error"
to postmaster(a)tokiomillennium.com <mailto:postmaster@tokiomillennium.com>
and then permanently delete the email and any attachments from your system.
E-mail communications cannot be guaranteed to be secure or error free, as
information could be intercepted, corrupted, amended, lost, destroyed,
arrive late or incomplete, or contain viruses. It is the recipient's
responsibility to ensure that e-mail transmissions and any attachments are
virus free. We do not accept liability for any damages or other consequences
caused by information that is intercepted, corrupted, amended, lost,
destroyed, arrives late or incomplete or contains viruses.
******************************************
_________________________________________________
Python.NET mailing list - PythonDotNet(a)python.org
<mailto:PythonDotNet@python.org>
https://mail.python.org/mailman/listinfo/pythondotnet
[View Less]
For a project I'm working on, I'd like to put Python for .NET in a more
standard Python package that lives in site-packages.
However, the bootstrapping that happens in InitExt() in pythonengine.cs
doesn't work in that case. If I put together a package that looks like:
site-packages
pythonnet
__init__.py
clr.pyd
Python.Runtime.dll
add "from pythonnet" to the lines that the nasty bootstrapping hack looks
for in traceback, then when I call
from pythonnet import clr
…
[View More]Python goes into an infinite recursion loop. The import calls up initclr()
in ClrModule.cs, which calls InitExt() in pythonengine.cs, which calls
Python with the command "from pythonnet import clr", which calls initclr()
in ClrModule.cs, which calls InitExt()....
For whatever reason, this doesn't occur with a straight "import clr", if I
dump clr.pyd and Python.Runtime.dll in my root site-packages directory.
What's going on?
[View Less]
Hi everyone,
if we do migrate to git, we should have a branching scheme for the project.
I would suggest we just go with git flow
(http://nvie.com/posts/a-successful-git-branching-model/). It is widely
used, well documented, lots of people are familiar with it and we don't have
to come up with our own rules or patterns.
I expect that we probably won't be using the hotfix stuff much, if at all.
The feature branches would simply be the pull requests of everyone against
the develop branch. …
[View More]Whoever manages releases (and I would volunteer for that
for a while) would have to follow the release branch stuff, but that also is
not too involved.
Any thoughts?
Best,
David
[View Less]
Hi everyone,
I'm trying to understand what the "official" release history is right now.
PythonNet 2.0 was never officially released, correct? Was the last release
2.0 beta?
In any case, I think it would be great if we released an official 2.0
version, provided binaries for download etc.
My gut sense is that there would be significant benefits of releasing the
current version + any major bug fixes as is, i.e. hold off from adding any
new features. The current version seems to be used by a …
[View More]fair number of
people and useful to them, and I think it would be good to have something
officially released as quickly as possible. But, I don't know the codebase
nor history well, so please chime in if you think that is a silly
suggestion.
Version 2.1 then could incorporate the various work people have done on
forks of the project and maybe get setup.py to work on all supported
platforms. We could also clean up some of the old files, docs etc for that
release.
In my mind such versions 2.0 and 2.1 could happen relatively quickly, i.e.
don't be multi months projects but more like a few weeks at most. In general
I think once we get setup/deployment via pip running, it would make sense to
release new versions fairly frequently, even if they only add a few new
features.
Any thoughts?
Best,
David
[View Less]