Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

sre.py backward compatibility and PEP 291

 

 

Python dev RSS feed   Index | Next | Previous | View Threaded


barry at python

Aug 24, 2004, 12:42 PM

Post #1 of 4 (732 views)
Permalink
sre.py backward compatibility and PEP 291

PEP 291 says that sre.py needs to be backward compatible with Python
2.1. sre.py says:

# this module works under 1.5.2 and later. don't use string methods
import string

Which is it? Raymond has seen some circular reference problems between
my PEP 292 string.py patch and re.py (really, by way of sre.py and
friends). Even though I haven't seen the same problems, I'd like to
avoid any direct circular references by changing the few string module
function calls in sre*.py to string methods. But the comment above
stopped me, until I read PEP 291.

The PEP should be the definitive answer, and I'm willing to
string-meth-ify sre*.py, if there are no objections.

out-posting-phillip-ly y'rs,
-Barry
Attachments: signature.asc (0.30 KB)


fredrik at pythonware

Aug 24, 2004, 2:05 PM

Post #2 of 4 (728 views)
Permalink
Re: sre.py backward compatibility and PEP 291 [In reply to]

Barry wrote:

> PEP 291 says that sre.py needs to be backward compatible with Python
> 2.1. sre.py says:
>
> # this module works under 1.5.2 and later. don't use string methods
> import string
>
> Which is it?

Martin changed the PEP last week (or so), but forgot to remove the
comment.

Note that you can remove some code from _sre.c as well (see join_list,
and perhaps other places that checks for >= 1.6).

cheers /F



_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


barry at python

Aug 24, 2004, 2:37 PM

Post #3 of 4 (712 views)
Permalink
Re: Re: sre.py backward compatibility and PEP 291 [In reply to]

On Tue, 2004-08-24 at 17:05, Fredrik Lundh wrote:

> Martin changed the PEP last week (or so), but forgot to remove the
> comment.
>
> Note that you can remove some code from _sre.c as well (see join_list,
> and perhaps other places that checks for >= 1.6).

Awesome, thanks.
-Barry
Attachments: signature.asc (0.30 KB)


martin at v

Aug 24, 2004, 2:42 PM

Post #4 of 4 (713 views)
Permalink
Re: Re: sre.py backward compatibility and PEP 291 [In reply to]

Fredrik Lundh wrote:
> Barry wrote:

>>PEP 291 says that sre.py needs to be backward compatible with Python
>>2.1. sre.py says:
>>
>># this module works under 1.5.2 and later. don't use string methods
>>import string
>>
>>Which is it?
>
>
> Martin changed the PEP last week (or so), but forgot to remove the
> comment.

I only changed it for xmlrpclib, and changed the comment in that module.

Just made the change for sre in pep-0291.txt 1.5, on 02-Jul-03. The
commit message there says

Bumped sre's "baseline" to 2.1, per /F's recommendation in bug #764548

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.