Grid warnings

Open
#680 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
databases

Research direction

No source file, test, or entry point is named. Start by locating Grid's handling of deprecated functions, parameters, and left joins, then clarify whether DeprecationWarning and UserWarning are appropriate and define the expected warning conditions before implementation.

Written by the indexing model from the issue text.

Description

I want to add some code to Grid that would give developers some helpful warnings. I have 2 use cases so far.

  1. Deprecation - provide deprecation warnings when the code accesses a deprecated function or parameter. I'd like to use the Python warnings.DeprecationWarning for this purpose.
  2. I ran into a situation today where I'd coded a grid with a left join, but forgot to specify the field_id argument to tell grid which is my primary table. I'd like grid to throw a warnings.UserWarning in this situation to notify me that I have a left without a field_id.

I'm looking for input

  • are these valuable to add?
  • Is using the warnings module the right way to go about this?
Dominant language
HTML
Stars
319
Forks
144
Avg merge
6d 20h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from web2py/py4web

All issues in web2py/py4web

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.