Python: Add deprecation warnings to GPUBatch program usage. #103978

Closed
opened 2023-01-18 19:11:11 +01:00 by Jeroen Bakker · 14 comments
Member

Calls to gpu.types.GPUBatch.draw#program without a program parameter, or a None as value of the program parameter should raise a deprecation warning.
All calls to gpu.types.GPUBatch.program_set should raise a deprecation warning..

Check pygpu_batch__tp_new how to raise a deprecation warning using CPython.

It would be great if you want to work on this topic. If so, assign the task to yourself. If you have questions or require some guidance, please get in contact via #blender-coders or via a reply on this task.

Calls to `gpu.types.GPUBatch.draw#program` without a program parameter, or a None as value of the program parameter should raise a deprecation warning. All calls to `gpu.types.GPUBatch.program_set` should raise a deprecation warning.. Check `pygpu_batch__tp_new` how to raise a deprecation warning using CPython. It would be great if you want to work on this topic. If so, assign the task to yourself. If you have questions or require some guidance, please get in contact via #blender-coders or via a reply on this task.
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jash-Shah

Added subscriber: @Jash-Shah
Jash Shah self-assigned this 2023-01-29 18:46:18 +01:00

Hey, I am new to Blender dev, but this task seems like a good place for me to start since I have some experience working with CPython before!
As mentioned in the task description, I'm assigning the task to myself.

Hey, I am new to Blender dev, but this task seems like a good place for me to start since I have some experience working with CPython before! As mentioned in the task description, I'm assigning the task to myself.
Philipp Oeser removed the
Interest
EEVEE & Viewport
label 2023-02-09 15:11:54 +01:00
Contributor

hey, is this issue still open ??

hey, is this issue still open ??
Author
Member

I think so, I haven't seen any activity on this.

I think so, I haven't seen any activity on this.
Contributor

@Jeroen-Bakker could you guide me to pygpu_batch__tp_new program so i could learn how to raise a depreciation warning

@Jeroen-Bakker could you guide me to pygpu_batch__tp_new program so i could learn how to raise a depreciation warning
Contributor

nvm found it

nvm found it
Author
Member

It is better to ask specific code questions on blender.chat in the blender-coders channel. You can expect quicker response there, as there are more developers present to help you with your questions.

It is better to ask specific code questions on blender.chat in the blender-coders channel. You can expect quicker response there, as there are more developers present to help you with your questions.
Contributor

@Jeroen-Bakker i did some changes in the gpu.py.bacth file i'm attaching the file here could you see through it once and tell me the necessary changes i would have to do

@Jeroen-Bakker i did some changes in the gpu.py.bacth file i'm attaching the file here could you see through it once and tell me the necessary changes i would have to do
Author
Member

@Prakhar-Singh-Chouhan Can you upload it as a pull request? That makes it easier to use review tools provided here.

@Prakhar-Singh-Chouhan Can you upload it as a pull request? That makes it easier to use review tools provided here.

Hi. Is it available for me to work on? If so, I'd like to take it up.

Hi. Is it available for me to work on? If so, I'd like to take it up.
Author
Member

Think so. please refer to the #105295 as it already provides a solution, but needs to be updated and review comments needs to be solved.

Think so. please refer to the #105295 as it already provides a solution, but needs to be updated and review comments needs to be solved.
Contributor

@Jeroen-Bakker I updated the PR and solved the review comments. Can you have a look at it #117299

@Jeroen-Bakker I updated the PR and solved the review comments. Can you have a look at it https://projects.blender.org/blender/blender/pulls/117299
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-03-04 08:34:44 +01:00
Jeroen Bakker added this to the 4.2 LTS milestone 2024-03-04 08:34:53 +01:00
Jeroen Bakker added this to the Python API project 2024-03-04 08:35:03 +01:00
Jash Shah was unassigned by Jeroen Bakker 2024-03-04 08:35:29 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#103978
No description provided.