summaryrefslogtreecommitdiff
path: root/pipermail/pycrypto/2010q1/000205.html
blob: 18421ac7608f364fc3019889fb0b76d642c81fd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [pycrypto] Pycrypto working with python 3.0 or 3.1
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20Pycrypto%20working%20with%20python%203.0%20or%203.1&In-Reply-To=4B9E9B61.1090205%40gmx.net">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="000204.html">
   <LINK REL="Next"  HREF="000207.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[pycrypto] Pycrypto working with python 3.0 or 3.1</H1>
    <B>Grail Dane</B> 
    <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20Pycrypto%20working%20with%20python%203.0%20or%203.1&In-Reply-To=4B9E9B61.1090205%40gmx.net"
       TITLE="[pycrypto] Pycrypto working with python 3.0 or 3.1">grail69 at hotmail.com
       </A><BR>
    <I>Tue Mar 16 23:09:52 CST 2010</I>
    <P><UL>
        <LI>Previous message: <A HREF="000204.html">[pycrypto] Pycrypto working with python 3.0 or 3.1
</A></li>
        <LI>Next message: <A HREF="000207.html">[pycrypto] Pycrypto working with python 3.0 or 3.1
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#205">[ date ]</a>
              <a href="thread.html#205">[ thread ]</a>
              <a href="subject.html#205">[ subject ]</a>
              <a href="author.html#205">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>
Hi Christoph
Yes I am running into this issue as well. Another similar one is where2to3 suggests the following change:
from common import make_block_tests
to
from .common import make_block_tests 
In case hard top see the change is to add a full-stop at the start of common which makes thisa relative path reference. The error I get after making this change is:
ValueError: Attempted relative import in non-package
So I am trying to get this working as well. Let me know how you go?
CheersGrail

&gt;<i> Date: Mon, 15 Mar 2010 21:41:05 +0100
</I>&gt;<i> From: <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">christoph.tapler at gmx.net</A>
</I>&gt;<i> To: <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>
</I>&gt;<i> Subject: Re: [pycrypto] Pycrypto working with python 3.0 or 3.1
</I>&gt;<i> 
</I>&gt;<i> Hi,
</I>&gt;<i> 
</I>&gt;<i> I could find the relevant change documented in 
</I>&gt;<i> <A HREF="http://docs.python.org/py3k/whatsnew/3.0.html">http://docs.python.org/py3k/whatsnew/3.0.html</A> , &quot;Removed Syntax&quot; section.
</I>&gt;<i> Using &quot;from . import X&quot;  instead of &quot;import X&quot; should fix the issue.
</I>&gt;<i> I will try to adapt the Test Suite asap.
</I>&gt;<i> 
</I>&gt;<i> Cheers,
</I>&gt;<i> Christoph
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> On 15.03.2010 02:10, Dwayne C. Litzenberger wrote:
</I>&gt;<i> &gt; Are absolute imports standard in Python 3?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;       <A HREF="http://www.python.org/dev/peps/pep-0328/">http://www.python.org/dev/peps/pep-0328/</A>
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; On Sun, Mar 14, 2010 at 04:11:58PM +0100, Christoph Tapler wrote:
</I>&gt;<i> &gt;&gt; Hi Grail,
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; I have tried to fix the test suite, but I came across a problem,
</I>&gt;<i> &gt;&gt; which seems to be specific to Python 3. It seems to me that Python 3
</I>&gt;<i> &gt;&gt; behaves differently in terms of hierarchical imports.
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; To demonstrate this difference, I have attached a small example (just
</I>&gt;<i> &gt;&gt; start level_test.py in Python 2 / 3). If you execute this example in
</I>&gt;<i> &gt;&gt; Python 2, everything works fine. However, in Python 3, the second
</I>&gt;<i> &gt;&gt; (nested) import fails. I don't understand why.
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Do you (or anybody else of course ;-) ) have an idea how this issue
</I>&gt;<i> &gt;&gt; could be resolved? Btw, this pattern appears several times in the test
</I>&gt;<i> &gt;&gt; suite.
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Kind Regards,
</I>&gt;<i> &gt;&gt; Christoph
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; On 04.03.2010 03:37, Grail Dane wrote:
</I>&gt;<i> &gt;&gt;&gt; Hi Christoph
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; Good to see this is coming together for you, and as one of the users
</I>&gt;<i> &gt;&gt;&gt; mentions,
</I>&gt;<i> &gt;&gt;&gt; using the unified option is a general rule of thumb for patches / diffs.
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; You are correct about the test suite as I have not had a chance to alter
</I>&gt;<i> &gt;&gt;&gt; the tests to Python 3 context.
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; Cheers
</I>&gt;<i> &gt;&gt;&gt; Grail
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; ------------------------------------------------------------------------
</I>&gt;<i> &gt;&gt;&gt; Date: Wed, 3 Mar 2010 21:58:09 +0100
</I>&gt;<i> &gt;&gt;&gt; From: <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">christoph.tapler at gmx.net</A>
</I>&gt;<i> &gt;&gt;&gt; To: <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>
</I>&gt;<i> &gt;&gt;&gt; Subject: Re: [pycrypto] Pycrypto working with python 3.0 or 3.1
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; Hi Grail,
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; I have applied your patch on my Windows machine. Your AES encryption /
</I>&gt;<i> &gt;&gt;&gt; decryption seems to work well - In case
</I>&gt;<i> &gt;&gt;&gt; AZCkZ1wU5d0psrwlaoS5R4tz1dRL6rBBNzjIvK9NHSo= is the result ;-)
</I>&gt;<i> &gt;&gt;&gt; Moreover, I have tried the diff tool. Not sure if the output is usable
</I>&gt;<i> &gt;&gt;&gt; for you. Just
</I>&gt;<i> &gt;&gt;&gt; let me know if this format is okay or not. The patch contains a few
</I>&gt;<i> &gt;&gt;&gt; rather trivial
</I>&gt;<i> &gt;&gt;&gt; fixes for the Windows environment. With those fixes the build is successful.
</I>&gt;<i> &gt;&gt;&gt; However, the test suite doesn't build, needs adaptions as well (but I
</I>&gt;<i> &gt;&gt;&gt; think only
</I>&gt;<i> &gt;&gt;&gt; in Python).
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; Cheers,
</I>&gt;<i> &gt;&gt;&gt; Christoph
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; On 03.03.2010 03:48, Grail Dane wrote:
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt;      OK ... OK ... OK - stop the presses
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt;      Well, maybe not just yet, anyhoo, the attached patch allows the
</I>&gt;<i> &gt;&gt;&gt;      source to compile
</I>&gt;<i> &gt;&gt;&gt;      and run the attached script&lt;woohoo&gt;
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt;      Cheers
</I>&gt;<i> &gt;&gt;&gt;      Grail
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt;      ------------------------------------------------------------------------
</I>&gt;<i> &gt;&gt;&gt;      Meet local singles online. Browse profiles for FREE!
</I>&gt;<i> &gt;&gt;&gt;      &lt;<A HREF="http://clk.atdmt.com/NMN/go/150855801/direct/01/">http://clk.atdmt.com/NMN/go/150855801/direct/01/</A>&gt;
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt;      _______________________________________________
</I>&gt;<i> &gt;&gt;&gt;      pycrypto mailing list
</I>&gt;<i> &gt;&gt;&gt;      <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>&lt;mailto:<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>&gt;
</I>&gt;<i> &gt;&gt;&gt;      <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A>
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; ------------------------------------------------------------------------
</I>&gt;<i> &gt;&gt;&gt; Find out now. Link all your email accounts and social updates with
</I>&gt;<i> &gt;&gt;&gt; Hotmail.&lt;<A HREF="http://windowslive.ninemsn.com.au/oneinbox?ocid=T162MSN05A0710G">http://windowslive.ninemsn.com.au/oneinbox?ocid=T162MSN05A0710G</A>&gt;
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; _______________________________________________
</I>&gt;<i> &gt;&gt;&gt; pycrypto mailing list
</I>&gt;<i> &gt;&gt;&gt; <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>
</I>&gt;<i> &gt;&gt;&gt; <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A>
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;&gt; _______________________________________________
</I>&gt;<i> &gt;&gt; pycrypto mailing list
</I>&gt;<i> &gt;&gt; <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>
</I>&gt;<i> &gt;&gt; <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A>
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> 
</I>&gt;<i> _______________________________________________
</I>&gt;<i> pycrypto mailing list
</I>&gt;<i> <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>
</I>&gt;<i> <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A>
</I> 		 	   		  
_________________________________________________________________
Looking for a new home? With all the latest places, searching has never been easier.
<A HREF="http://clk.atdmt.com/NMN/go/157631292/direct/01/">http://clk.atdmt.com/NMN/go/157631292/direct/01/</A>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <A HREF="http://lists.dlitz.net/pipermail/pycrypto/attachments/20100317/6a12b5a0/attachment.htm">http://lists.dlitz.net/pipermail/pycrypto/attachments/20100317/6a12b5a0/attachment.htm</A> 
</PRE>



<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000204.html">[pycrypto] Pycrypto working with python 3.0 or 3.1
</A></li>
	<LI>Next message: <A HREF="000207.html">[pycrypto] Pycrypto working with python 3.0 or 3.1
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#205">[ date ]</a>
              <a href="thread.html#205">[ thread ]</a>
              <a href="subject.html#205">[ subject ]</a>
              <a href="author.html#205">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">More information about the pycrypto
mailing list</a><br>
</body></html>