summaryrefslogtreecommitdiff
path: root/pipermail/pycrypto/2010q1/000204.html
blob: 7dba3e9b98eb30e2e825f9d2b907044d842383e5 (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
<!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=20100315011040.GA1975%40rivest.dlitz.net">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="000203.html">
   <LINK REL="Next"  HREF="000205.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[pycrypto] Pycrypto working with python 3.0 or 3.1</H1>
    <B>Christoph Tapler</B> 
    <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20Pycrypto%20working%20with%20python%203.0%20or%203.1&In-Reply-To=20100315011040.GA1975%40rivest.dlitz.net"
       TITLE="[pycrypto] Pycrypto working with python 3.0 or 3.1">christoph.tapler at gmx.net
       </A><BR>
    <I>Mon Mar 15 14:41:05 CST 2010</I>
    <P><UL>
        <LI>Previous message: <A HREF="000203.html">[pycrypto] Pycrypto working with python 3.0 or 3.1
</A></li>
        <LI>Next message: <A HREF="000205.html">[pycrypto] Pycrypto working with python 3.0 or 3.1
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#204">[ date ]</a>
              <a href="thread.html#204">[ thread ]</a>
              <a href="subject.html#204">[ subject ]</a>
              <a href="author.html#204">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Hi,

I could find the relevant change documented in 
<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.
Using &quot;from . import X&quot;  instead of &quot;import X&quot; should fix the issue.
I will try to adapt the Test Suite asap.

Cheers,
Christoph


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


<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000203.html">[pycrypto] Pycrypto working with python 3.0 or 3.1
</A></li>
	<LI>Next message: <A HREF="000205.html">[pycrypto] Pycrypto working with python 3.0 or 3.1
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#204">[ date ]</a>
              <a href="thread.html#204">[ thread ]</a>
              <a href="subject.html#204">[ subject ]</a>
              <a href="author.html#204">[ 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>