Skip to content

deprecate q_join, q_split and foldline for icalendar 8 (#1011)#1314

Open
siddhirajkatkar wants to merge 5 commits intocollective:mainfrom
siddhirajkatkar:fix/deprecate-q-join-q-split-foldline
Open

deprecate q_join, q_split and foldline for icalendar 8 (#1011)#1314
siddhirajkatkar wants to merge 5 commits intocollective:mainfrom
siddhirajkatkar:fix/deprecate-q-join-q-split-foldline

Conversation

@siddhirajkatkar
Copy link
Copy Markdown

@siddhirajkatkar siddhirajkatkar commented Apr 11, 2026

Closes #1011

Deprecate the following public functions by renaming them to private
and adding deprecation wrappers:

  • q_join_q_join
  • q_split_q_split
  • foldline_foldline

Changes:

  • Added deprecate_for_version_8 helper in compatibility.py
  • Updated all internal call sites to use private names
  • Added deprecation wrappers that warn users about removal in v8
  • Added changelog entries in CHANGES.rst
  • Updated tests to use private names

📚 Documentation preview 📚: https://icalendar--1314.org.readthedocs.build/

@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented Apr 11, 2026

Documentation build overview

📚 icalendar | 🛠️ Build #32220355 | 📁 Comparing 614bb36 against latest (338072b)

  🔍 Preview build  

Show files changed (34 files in total): 📝 33 modified | ➕ 1 added | ➖ 0 deleted
File Status
404.html 📝 modified
genindex.html 📝 modified
_modules/index.html 📝 modified
reference/changelog.html 📝 modified
_modules/icalendar/caselessdict.html 📝 modified
_modules/icalendar/compatibility.html ➕ added
_modules/icalendar/parser_tools.html 📝 modified
contribute/documentation/style-guide.html 📝 modified
reference/api/icalendar.caselessdict.html 📝 modified
reference/api/icalendar.compatibility.html 📝 modified
reference/api/icalendar.html 📝 modified
reference/api/icalendar.parser.parameter.html 📝 modified
reference/api/icalendar.parser.property.html 📝 modified
reference/api/icalendar.parser.string.html 📝 modified
reference/api/icalendar.parser_tools.html 📝 modified
reference/api/icalendar.prop.broken.html 📝 modified
_modules/icalendar/cal/component.html 📝 modified
_modules/icalendar/parser/content_line.html 📝 modified
_modules/icalendar/parser/parameter.html 📝 modified
_modules/icalendar/parser/property.html 📝 modified
_modules/icalendar/parser/string.html 📝 modified
_modules/icalendar/prop/adr.html 📝 modified
_modules/icalendar/prop/binary.html 📝 modified
_modules/icalendar/prop/cal_address.html 📝 modified
_modules/icalendar/prop/categories.html 📝 modified
_modules/icalendar/prop/inline.html 📝 modified
_modules/icalendar/prop/n.html 📝 modified
_modules/icalendar/prop/org.html 📝 modified
_modules/icalendar/prop/text.html 📝 modified
_modules/icalendar/prop/uri.html 📝 modified
_modules/icalendar/parser/ical/component.html 📝 modified
_modules/icalendar/prop/dt/list.html 📝 modified
_modules/icalendar/prop/recur/frequency.html 📝 modified
_modules/icalendar/prop/recur/weekday.html 📝 modified

Copy link
Copy Markdown
Member

@niccokunzmann niccokunzmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could youplease explain the difference between the issue, the code and why you don't use the helper you created?
If you used an AI model, please disclose it and read our contribution policy.

Comment thread CHANGES.rst Outdated
@niccokunzmann niccokunzmann added the ai-suspicion This contribution is possibly created with lots of AI help without enough human understanding. label Apr 11, 2026
Comment thread src/icalendar/parser/parameter.py
Comment thread src/icalendar/compatibility.py Outdated
@siddhirajkatkar siddhirajkatkar force-pushed the fix/deprecate-q-join-q-split-foldline branch from 647f59e to 77f4dd4 Compare April 11, 2026 16:50
@siddhirajkatkar
Copy link
Copy Markdown
Author

Hi, I have updated the PR:

  1. deprecate_for_version_8 now uses functools.wraps
  2. q_join, q_split and foldline now use the pattern: public_name = deprecate_for_version_8(_private_name)
  3. CHANGES.rst combined into one entry with :issue:1011
  4. No manual warnings.warn calls left inside the private functions

All tests passing and ruff clean. Please review!

siddhirajk and others added 2 commits April 11, 2026 22:23
Keep canonsort_keys, canonsort_items, to_unicode, from_unicode, and
data_encode in tests since the deprecated public wrappers still exist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
git fetch upstream
git merge upstream/mainMerge remote-tracking branch 'upstream/main' into fix/deprecate-q-join-q-split-foldline
@niccokunzmann
Copy link
Copy Markdown
Member

Hi, we created a new release, please move your edits in CHANGES.rst to the new section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-suspicion This contribution is possibly created with lots of AI help without enough human understanding.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make private functions private by adding a _ at the start

3 participants