Issue 1:
Checklist

I have checked the issues list

for similar or identical enhancement to an existing feature.

I have checked the pull requests list

for existing proposed enhancements.

I have checked the commit log

to find out if the if the same enhancement was already implemented in the

main branch.

I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Brief Summary

celery.utils.iso8601 is historic module which .parse_iso8601() can be replaced by datetime.datetime.fromisoformat() as Python 3.7 or above is now supported.

Suggest deprecate this module and use datetime.datetime.fromisoformat() internally.

Design

Architectural Considerations

None

Proposed Behavior

iso8601 module is still usable before v6.0.0, but with addition of deprecation warning

remove iso8601 module in v6.0.0

replace all usage of parse_iso8601() in the library by datetime.datetime.fromisoformat, with compatibility of Python 3.7 to 3.11

Proposed UI/UX

N/A

Diagrams

N/A

Alternatives

None

Issue 2:
Checklist

I have verified that the issue exists against the master branch of Celery.

This has already been asked to the discussions forum first.

I have read the relevant section in the

contribution guide

on reporting bugs.

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues

in this issue (If there are none, check this box anyway).

Mandatory Debugging Information

I have included the output of celery -A proj report in the issue.

(if you are not able to do this, then at least specify the Celery

version affected).

I have verified that the issue exists against the master branch of Celery.

I have included the contents of pip freeze in the issue.

I have included all the versions of all the external dependencies required

to reproduce this bug.

Optional Debugging Information

I have tried reproducing the issue on more than one Python version

and/or implementation.

I have tried reproducing the issue on more than one message broker and/or

result backend.

I have tried reproducing the issue on more than one version of the message

broker and/or result backend.

I have tried reproducing the issue on more than one operating system.

I have tried reproducing the issue on more than one workers pool.

I have tried reproducing the issue with autoscaling, retries,

ETA/Countdown & rate limits disabled.

I have tried reproducing the issue after downgrading

and/or upgrading Celery and its dependencies.

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Environment & Settings

Celery version:

celery report Output:

5.2.0 (dawn-chorus)

Steps to Reproduce

Required Dependencies

Minimal Python Version: N/A or Unknown

Minimal Celery Version: N/A or Unknown

Minimal Kombu Version: N/A or Unknown

Minimal Broker Version: N/A or Unknown

Minimal Result Backend Version: N/A or Unknown

Minimal OS and/or Kernel Version: N/A or Unknown

Minimal Broker Client Version: N/A or Unknown

Minimal Result Backend Client Version: N/A or Unknown

Python Packages

pip freeze Output:

Other Dependencies

N/A

Minimally Reproducible Test Case

# This executes "as expected" - first the group, then the tasks all one after the other ...
post_processing = (task_doing_nothing.si() | task_doing_nothing.si())
workflow = chain(
group(
task_doing_nothing.si(),
task_doing_nothing.si(),
),
task_doing_nothing.si()
) | post_processing
workflow.delay().get()

# This executes the post processing chain twice ... which I dont understand ...
post_processing = (task_doing_nothing.si() | task_doing_nothing.si())
workflow = chain(
group(
task_doing_nothing.si(),
task_doing_nothing.si(),
),
task_doing_nothing.si()
)
workflow |= post_processing
workflow.delay().get()

Expected Behavior

I would expect no difference in the two approaches detailed above, i.e. I would not expect to post_processing chain to be executed twice.

Actual Behavior

Using the second approach post_processing chain is executed twice.