You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Jeff Hammerbacher (JIRA)" <ji...@apache.org> on 2009/11/16 12:15:39 UTC

[jira] Created: (AVRO-202) Add __all__ listing to avro module

Add __all__ listing to avro module
----------------------------------

                 Key: AVRO-202
                 URL: https://issues.apache.org/jira/browse/AVRO-202
             Project: Avro
          Issue Type: Task
          Components: python
            Reporter: Jeff Hammerbacher
         Attachments: AVRO-202.patch

Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-202) Add __all__ listing to avro module

Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780270#action_12780270 ] 

Jeff Hammerbacher commented on AVRO-202:
----------------------------------------

bq. I saw that but assumed that datafile is an internal detail that you typically don't want to expose through import *, no?

It's not clear to me how you would write Avro data to a file without this module. I believe it needs to be public.

bq. python WTF!

FTW, I hope!

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Improvement
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>            Priority: Minor
>         Attachments: AVRO-202.patch, AVRO-202.patch, AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AVRO-202) Add __all__ listing to avro module

Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Hammerbacher reassigned AVRO-202:
--------------------------------------

    Assignee: Jeff Hammerbacher

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-202) Add __all__ listing to avro module

Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Hammerbacher updated AVRO-202:
-----------------------------------

    Attachment: AVRO-202.patch

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>         Attachments: AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-202) Add __all__ listing to avro module

Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Hammerbacher updated AVRO-202:
-----------------------------------

      Priority: Minor  (was: Major)
    Issue Type: Improvement  (was: Task)

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Improvement
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>            Priority: Minor
>         Attachments: AVRO-202.patch, AVRO-202.patch, AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-202) Add __all__ listing to avro module

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated AVRO-202:
------------------------------

    Status: Open  (was: Patch Available)

-1, please add a test for this

I reviewed the patch and tested in an interactive shell and it worked fine, just add a test and we should be good to go.


> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-202) Add __all__ listing to avro module

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated AVRO-202:
------------------------------

    Hadoop Flags: [Reviewed]

I'm fine with the patch the way it is currently, +1. I don't see how to resolve testing the import * w/o actually testing it fully.

Jeff FF to submit the patch if you are ok with the way it stands currently, or change and I can review addl if you like, once
"submitted" I'm sure someone will commit.


> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch, AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-202) Add __all__ listing to avro module

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-202:
------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0
           Status: Resolved  (was: Patch Available)

I just committed this.  Thanks, Jeff.

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Improvement
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>            Priority: Minor
>             Fix For: 1.3.0
>
>         Attachments: AVRO-202.patch, AVRO-202.patch, AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-202) Add __all__ listing to avro module

Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779763#action_12779763 ] 

Jeff Hammerbacher commented on AVRO-202:
----------------------------------------

Would you want a test to ensure that the appropriate modules are in the namespace, or do you just want the import * code path exercised? I don't even see a good place in testioreflect.py to test this feature.

Sorry for being dense. I come from a world where there are no tests for code, and this piece of code is particularly hard to test.

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-202) Add __all__ listing to avro module

Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Hammerbacher updated AVRO-202:
-----------------------------------

    Status: Patch Available  (was: Open)

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-202) Add __all__ listing to avro module

Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Hammerbacher updated AVRO-202:
-----------------------------------

    Status: Patch Available  (was: Open)

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch, AVRO-202.patch, AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-202) Add __all__ listing to avro module

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated AVRO-202:
------------------------------

    Attachment: AVRO-202.patch

fixed two issues with the patch
1) patch failed to apply against latest trunk
2) test failed (m should have been module_)


> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch, AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-202) Add __all__ listing to avro module

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780150#action_12780150 ] 

Doug Cutting commented on AVRO-202:
-----------------------------------

> flakiest SVN repository evar this week

This was mostly scheduled downtime, although perhaps poorly communicated.

For alerts, befriend http://twitter.com/infrabot

To check server status, visit http://monitoring.apache.org/status/

For real-time answers, go to #asfinfra on irc.freenode.net.


> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Improvement
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>            Priority: Minor
>         Attachments: AVRO-202.patch, AVRO-202.patch, AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-202) Add __all__ listing to avro module

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780282#action_12780282 ] 

Patrick Hunt commented on AVRO-202:
-----------------------------------

wow. wrong tla there ;-) "dyslexics of the world untie!"

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Improvement
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>            Priority: Minor
>         Attachments: AVRO-202.patch, AVRO-202.patch, AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-202) Add __all__ listing to avro module

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780160#action_12780160 ] 

Patrick Hunt commented on AVRO-202:
-----------------------------------

Re "Added 'datafile' to module list in both (see AVRO-201)"

I saw that but assumed that datafile is an internal detail that you typically don't want to expose through import *, no?

Re "heroic work" 

all in a days work for a commiter - as Doug often reminds me that's the primary responsibility of a commiter. ;-)

As I mentioned (doug correct me if I'm wrong, but this is the way ZK works), I think you'll find reviews come quicker if you "submit" the JIRA once you are satisfied with your patch. earlier reviews are fine too, but submission raises the issue on the radar since the JIRA will show up on the "patch available" list.

Good work, nice to see you contributing changes, python WTF!

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Improvement
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>            Priority: Minor
>         Attachments: AVRO-202.patch, AVRO-202.patch, AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-202) Add __all__ listing to avro module

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779753#action_12779753 ] 

Patrick Hunt commented on AVRO-202:
-----------------------------------

instead you could change a test like src/test/py/testioreflect.py it's already doing import as, you could piggyback on that test (to do import *)

neither option is great, I don't know though if it's necessary to test that all files are imported, perhaps this is a good middleground?

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-202) Add __all__ listing to avro module

Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779899#action_12779899 ] 

Jeff Hammerbacher commented on AVRO-202:
----------------------------------------

Hey Patrick,

I'll clean this up and mark ready to submit as soon as the Apache SVN comes back (flakiest SVN repository evar this week). Thanks for your heroic work on reviewing today.

Regards,
Jeff

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch, AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-202) Add __all__ listing to avro module

Posted by "Philip Zeyliger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779845#action_12779845 ] 

Philip Zeyliger commented on AVRO-202:
--------------------------------------

+1.

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch, AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-202) Add __all__ listing to avro module

Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Hammerbacher updated AVRO-202:
-----------------------------------

    Attachment: AVRO-202.patch

Added 'datafile' to module list in both (see AVRO-201)

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch, AVRO-202.patch, AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-202) Add __all__ listing to avro module

Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Hammerbacher updated AVRO-202:
-----------------------------------

    Attachment: AVRO-202.patch

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-202) Add __all__ listing to avro module

Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779734#action_12779734 ] 

Jeff Hammerbacher commented on AVRO-202:
----------------------------------------

Thanks for the review, Patrick. I added a test, but have a few qualms about it:

1) You can only execute "import *" at the module level; I'd rather just do this in the test.
2) We need to maintain a list of exported modules in two places now: __init__.py and testimport.py.

Let me know what you think.

Thanks,
Jeff

> Add __all__ listing to avro module
> ----------------------------------
>
>                 Key: AVRO-202
>                 URL: https://issues.apache.org/jira/browse/AVRO-202
>             Project: Avro
>          Issue Type: Task
>          Components: python
>            Reporter: Jeff Hammerbacher
>            Assignee: Jeff Hammerbacher
>         Attachments: AVRO-202.patch, AVRO-202.patch
>
>
> Folks who want to say "from avro import *" will need this listing: http://docs.python.org/tutorial/modules.html#importing-from-a-package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.