You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Roman Chyla <ro...@gmail.com> on 2012/07/26 03:19:01 UTC

cpp.py -- AttributeError: 'unicode' object has no attribute 'split_pkg'

Hi

The latest jcc has an error, attached is a patch

I am now using the --use_full_names and it works without greater
problems, even against the latest lucene trunk

The only nuisance is that modules defined in java take over modules
defined in python (I happened to have one name which was the same for
both, so I renamed the java package)

roman

Re: Changing Python class/module layout, dropping --rename ?

Posted by Andi Vajda <va...@apache.org>.
On Wed, 15 Aug 2012, Roman Chyla wrote:

> The full names make things easier and I would also think that the top
> level 'java' package should be optional.
>
> Many thanks from me too!

Cool, so the PyLucene 4.0 build is now using --use_full_names !
The long test and sample rewrite has begun....

Currently, only test/test_Analyzers.py passes. All other test and samples 
remain to be ported to the new API and their imports fixed to fit the new 
generated Python module tree that follows the Lucene java package tree.

Volunteers to help with this would be appreciated !

If you're stumped by a Lucene API change, check the detailed CHANGES.txt and 
even more detailed MIGRATE.txt files for examples and instructions on how to 
port to the new Lucene 4.0 API.

http://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x/lucene/CHANGES.txt
http://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x/lucene/MIGRATE.txt

If you have questions about how to express some of these things with 
Python and JCC, please don't hesitate to ask here.

To avoid having multiple people working on the same files at the same time, 
please send a brief message to the list that you're taking on a particular 
test or directory of tests/samples.

Andi..

Re: Changing Python class/module layout, dropping --rename ?

Posted by Roman Chyla <ro...@gmail.com>.
The full names make things easier and I would also think that the top
level 'java' package should be optional.

Many thanks from me too!

roman

On Wed, Aug 15, 2012 at 1:23 PM, Petrus Hyvönen
<pe...@gmail.com> wrote:
> No objections, my build parameter list got significantly more readable using the full names and managing without the renames. I think it also makes it easier for entry level users to use the jcc wrapper as one doesn't have to track down the duplicate names.
>
> Regarding the addition of a  top level 'java' package, I would prefer it to be optional, so that it is possible to get close to the java examples for the wrapped library.
>
> Many thanks for the work,
> /Petrus
>
>
> On 15 aug 2012, at 11:52, Andi Vajda <va...@apache.org> wrote:
>
>>
>> If there are no objections to the new module layout for Python wrappers around Java classes that follows the Java package structure, I'd like to switch the PyLucene 4.0 build to --use_full_names by default.
>>
>> It makes from longer import statements but eliminates all --rename and --exclude uses from the current PyLucene jcc command line.
>>
>> Any objections, comments, suggestions ?
>>
>> Andi..
>>
>> On Thu, 2 Aug 2012, Andi Vajda wrote:
>>
>>>
>>> On Wed, 25 Jul 2012, Roman Chyla wrote:
>>>
>>>> I am now using the --use_full_names and it works without greater
>>>> problems, even against the latest lucene trunk
>>>> The only nuisance is that modules defined in java take over modules
>>>> defined in python (I happened to have one name which was the same for
>>>> both, so I renamed the java package)
>>>
>>> Maybe a top level 'java' package should be added to all the packages created
>>> when --use_full_names is used ?
>>> Thus
>>> >>> from org.apache.lucene.document import Document
>>> would become
>>> >>> from java.org.apache.lucene.document import Document
>>>
>>> It's even more typing but a little less intrusive on existing package
>>> names ?
>>>
>>> Andi..
>>>
>

Re: Changing Python class/module layout, dropping --rename ?

Posted by Petrus Hyvönen <pe...@gmail.com>.
No objections, my build parameter list got significantly more readable using the full names and managing without the renames. I think it also makes it easier for entry level users to use the jcc wrapper as one doesn't have to track down the duplicate names.

Regarding the addition of a  top level 'java' package, I would prefer it to be optional, so that it is possible to get close to the java examples for the wrapped library.

Many thanks for the work,
/Petrus


On 15 aug 2012, at 11:52, Andi Vajda <va...@apache.org> wrote:

> 
> If there are no objections to the new module layout for Python wrappers around Java classes that follows the Java package structure, I'd like to switch the PyLucene 4.0 build to --use_full_names by default.
> 
> It makes from longer import statements but eliminates all --rename and --exclude uses from the current PyLucene jcc command line.
> 
> Any objections, comments, suggestions ?
> 
> Andi..
> 
> On Thu, 2 Aug 2012, Andi Vajda wrote:
> 
>> 
>> On Wed, 25 Jul 2012, Roman Chyla wrote:
>> 
>>> I am now using the --use_full_names and it works without greater
>>> problems, even against the latest lucene trunk
>>> The only nuisance is that modules defined in java take over modules
>>> defined in python (I happened to have one name which was the same for
>>> both, so I renamed the java package)
>> 
>> Maybe a top level 'java' package should be added to all the packages created
>> when --use_full_names is used ?
>> Thus
>> >>> from org.apache.lucene.document import Document
>> would become
>> >>> from java.org.apache.lucene.document import Document
>> 
>> It's even more typing but a little less intrusive on existing package
>> names ?
>> 
>> Andi..
>> 


Re: Changing Python class/module layout, dropping --rename ?

Posted by Andi Vajda <va...@apache.org>.
If there are no objections to the new module layout for Python wrappers 
around Java classes that follows the Java package structure, I'd like to 
switch the PyLucene 4.0 build to --use_full_names by default.

It makes from longer import statements but eliminates all --rename and 
--exclude uses from the current PyLucene jcc command line.

Any objections, comments, suggestions ?

Andi..

On Thu, 2 Aug 2012, Andi Vajda wrote:

>
> On Wed, 25 Jul 2012, Roman Chyla wrote:
>
>> I am now using the --use_full_names and it works without greater
>> problems, even against the latest lucene trunk
>> 
>> The only nuisance is that modules defined in java take over modules
>> defined in python (I happened to have one name which was the same for
>> both, so I renamed the java package)
>
> Maybe a top level 'java' package should be added to all the packages created
> when --use_full_names is used ?
> Thus
> >>> from org.apache.lucene.document import Document
> would become
> >>> from java.org.apache.lucene.document import Document
>
> It's even more typing but a little less intrusive on existing package
> names ?
>
> Andi..
>

Re: Changing Python class/module layout, dropping --rename ?

Posted by Andi Vajda <va...@apache.org>.
On Wed, 25 Jul 2012, Roman Chyla wrote:

> I am now using the --use_full_names and it works without greater
> problems, even against the latest lucene trunk
>
> The only nuisance is that modules defined in java take over modules
> defined in python (I happened to have one name which was the same for
> both, so I renamed the java package)

Maybe a top level 'java' package should be added to all the packages created
when --use_full_names is used ?
Thus
  >>> from org.apache.lucene.document import Document
would become
  >>> from java.org.apache.lucene.document import Document

It's even more typing but a little less intrusive on existing package
names ?

Andi..

Re: cpp.py -- AttributeError: 'unicode' object has no attribute 'split_pkg'

Posted by Roman Chyla <ro...@gmail.com>.
I have create a JIRA ticket - https://issues.apache.org/jira/browse/PYLUCENE-20

roman

On Wed, Jul 25, 2012 at 9:21 PM, Patrick J. McNerthney
<pm...@ncircle.com> wrote:
> Roman,
>
> I don't see a patch attached to your email.
>
> Pat
>
>
> On 07/25/2012 03:19 PM, Roman Chyla wrote:
>>
>> Hi
>>
>> The latest jcc has an error, attached is a patch
>>
>> I am now using the --use_full_names and it works without greater
>> problems, even against the latest lucene trunk
>>
>> The only nuisance is that modules defined in java take over modules
>> defined in python (I happened to have one name which was the same for
>> both, so I renamed the java package)
>>
>> roman
>
>
>
> --
> Patrick J. McNerthney
> Chief Architect
> nCircle, Inc.
> +1 808 268 2821 (office)
> pmcnerthney@ncircle.com
> Join, Participate & Connect
> /It’s the security conference that never ends/
> http://connect.ncircle.com

Re: cpp.py -- AttributeError: 'unicode' object has no attribute 'split_pkg'

Posted by "Patrick J. McNerthney" <pm...@ncircle.com>.
Roman,

I don't see a patch attached to your email.

Pat

On 07/25/2012 03:19 PM, Roman Chyla wrote:
> Hi
>
> The latest jcc has an error, attached is a patch
>
> I am now using the --use_full_names and it works without greater
> problems, even against the latest lucene trunk
>
> The only nuisance is that modules defined in java take over modules
> defined in python (I happened to have one name which was the same for
> both, so I renamed the java package)
>
> roman


-- 
Patrick J. McNerthney
Chief Architect
nCircle, Inc.
+1 808 268 2821 (office)
pmcnerthney@ncircle.com
Join, Participate & Connect
/It’s the security conference that never ends/
http://connect.ncircle.com